🏆
International Research Platform
Serving Researchers Since 2012

SmartDose Scheduler: A Reliable Medication Reminder System with User Acknowledgment and Missed Dose Tracking

DOI : 10.5281/zenodo.22972681
Download Full-Text PDF Cite this Publication

Text Only Version

SmartDose Scheduler: A Reliable Medication Reminder System with User Acknowledgment and Missed Dose Tracking

Mahendira Prabhu M, Kirubhavathi V, Dr. Arnab Sikidar

Department of Mechatronics Engineering

KPR Institute of Engineering and Technology, Coimbatore, Tamil Nadu, India

Abstract – Medication non-adherence is a critical public health challenge, particularly among elderly patients and individuals managing multiple chronic conditions. Conventional reminder mechanisms such as mobile alarms are frequently dismissed without guaranteeing actual intake. This paper presents SmartDose Scheduler, a compact, reliable, and internet- independent medication reminder system designed to improve adherence through scheduled audio-visual alerts, user acknowledgment via push button, and automated missed dose tracking. The system integrates an ESP32 microcontroller with a DS3231 real-time clock (RTC) module, an SSD1306 OLED display, and a DFPlayer Mini voice module. Predefined medication schedules are stored in non-volatile memory and triggered with high temporal accuracy. An acknowledgment mechanism ensures alerts persist until the patient confirms intake; unacknowledged events are logged as missed doses. Experimental validation over a 72-hour test demonstrated 100% scheduling accuracy, 90% acknowledgment rate, and complete missed dose logging fidelity. The proposed system offers a low-cost, robust, and practically deployable solution and is extensible toward mobile integration and cloud-based remote monitoring.

Keywords – Medication adherence; ESP32; real-time clock; OLED display; embedded systems; missed dose tracking; push button acknowledgment; healthcare IoT.

  1. INTRODUCTION

    Medication adherence defined as the extent to which patients take their medications as prescribed remains one of the most persistent challenges in chronic disease management. The World Health Organization (WHO) estimates that approximately 50% of patients with chronic illnesses fail to adhere to prescribed medication regimens, contributing to disease progression, increased hospitalizations, and preventable mortality [5].

    Elderly individuals and patients managing polypharmacy concurrent use of five or more medications are disproportionately affected. While smartphone-based reminder applications have gained widespread adoption, they present significant limitations: alerts are easily dismissed, and a subset of the target population lacks digital literacy or consistent smartphone access [1], [3].

    Dedicated hardware-based reminder systems offer a compelling alternative, providing targeted functionality without dependency on general-purpose devices. However, commercially available smart pill dispensers are often prohibitively expensive and reliant on continuous internet connectivity [2], [7].

    This paper presents SmartDose Scheduler, a low-cost, embedded, and internet-independent medication reminder system combining scheduled audio-visual alerts with mandatory user acknowledgment and persistent missed dose logging. The core contributions are:

    1. A hardware-based reminder system using ESP32, RTC, OLED, and voice module operating fully offline.

    2. An acknowledgment-enforced alert mechanism preventing premature dismissal of reminders.

    3. An automated missed dose tracking system recording unacknowledged events for caregiver review.

    4. Experimental validation demonstrating consistent performance across extended operational periods.

  2. RELATED WORK

    De Dios et al. [1] developed a smart pillbox system demonstrating significant improvement in medication adherence among outpatient populations through scheduled dispensing and mobile notifications. Their work validated the clinical utility of hardware- integrated reminders but relied on continuous internet connectivity.

    Nguyen and Tran [2] proposed an IoT-integrated smart pill box for monitoring patient medication usage at home using cloud synchronization. While effective, the system's dependency on network availability limits deployment in rural or low-resource settings.

    Mahata and Dutta [3] presented a smart medicine reminder and healthcare assistance system incorporating GSM-based caregiver notifications. Kumar et al. [4] introduced a smart medical box integrating RFID and IoT for medication management across both professional and patient contexts.

    Minaam and Abd-Elfattah [5] proposed a smart pill box for medicine reminder and monitoring with mobile application support, establishing the baseline for software-hardware integrated adherence systems. Mondal et al. [6] extended this concept with a smart medicine reminder kit incorporating mobile phone calls and health monitoring, demonstrating the value of multi-modal alert strategies.

    Verma and Tripathi [7] developed a smart pill expert system based on IoT with automated dispensing, while Wang et al. [8] constructed and evaluated a medication reminder system in a clinical application context. Khedkar and Patil [9] presented a low- cost IoT pill box, and Rao [10] examined smart pillbox designs through the lens of human-machine systems interaction.

    The proposed SmartDose Scheduler differentiates itself by combining RTC-based precision scheduling, multi-modal alerts, enforced acknowledgment, and offline missed dose logging within a single low-cost platform addressing gaps identified across the reviewed literature.

  3. SYSTEM ARCHITECTURE AND DESIGN

    1. Hardware Components

      The SmartDose Scheduler is built around the ESP32 microcontroller, selected for its dual-core processing, low power consumption, and broad peripheral support. Table I presents the complete bill of materials.

      TABLE I: Hardware Components

      Component

      Description

      Qty

      ESP32 Microcontroller

      Main processing unit

      1

      DS3231 RTC Module

      Accurate time scheduling

      1

      SSD1306 OLED (128×64)

      Medication info display

      1

      DFPlayer Mini + Speaker

      Audio alert generation

      1

      Push Button

      User acknowledgment

      1

      Buzzer

      Secondary audio alert

      1

      3.7V Li-Po Battery

      Portable power supply

      1

      TP4056 Module

      Battery charging circuit

      1

    2. Real-Time Clock Integration

      The DS3231 RTC module was selected for its temperature-compensated crystal oscillator (TCXO), maintaining accuracy within ±2 ppm across 070°C. Communication with the ESP32 occurs over I2C (SDA: GPIO21, SCL: GPIO22). A CR2032 backup battery maintains timekeeping during power interruptions.

    3. Medication Schedule Management

      Medication schedules are stored in the ESP32's non-volatile storage (NVS) partition, enabling persistence across power cycles. Each schedule enty comprises medication name, dosage, scheduled time (HH:MM), and an active flag. The system supports up to 8 discrete daily entries, polled at 1-minute intervals.

    4. Alert Generation

      Upon schedule match, the system initiates: (1) buzzer activation at 2-second intervals, (2) voice reminder playback via DFPlayer Mini, and (3) medication name, dosage, and time display on the OLED. The alert repeats every 30 seconds for up to 5 minutes until acknowledgment is received.

    5. User Acknowledgment Mechanism

      A debounced push button on GPIO13 serves as the acknowledgment interface. Upon button press during an active alert, the system silences alerts, displays a confirmation message, and records the acknowledgment with timestamp in NVS.

    6. Missed Dose Tracking

    If no acknowledgment is received within the timeout window, the event is classified as a missed dose. Records are appended to an NVS log (up to 50 entries in circular buffer format) comprising medication name, scheduled time, and date. Future work will support Bluetooth export to a caregiver application.

  4. SOFTWARE DESIGN

    1. Firmware Architecture

      The firmware is developed in C++ using the Arduino framework on PlatformIO IDE, leveraging FreeRTOS primitives on the ESP32. Three primary tasks are defined:

      • Schedule Monitor Task (Core 0, Priority 2): Polls RTC at 60-second intervals and triggers alert events.

      • Alert Handler Task (Core 1, Priority 3): Manages buzzer, voice module, and OLED during active alerts.

      • Button ISR and Acknowledgment Handler (Interrupt-driven): Captures button events and posts to an acknowledgment queue.

    2. State Machine Design

      The alert lifecycle is governed by a finite state machine (FSM) with four states: IDLE, ALERTING, ACKNOWLEDGED, and MISSED. State transitions are deterministic and event-driven, ensuring predictable behaviour under all operating conditions.

    3. Power Management

    Between schedule polls, the system enters light sleep. The RTC SQW pin (1-minute pulses) wakes the ESP32 via external interrupt. Measured current consumption is approximately 18 mA during active operation and 2.1 mA during light sleep, yielding an estimated battery life exceeding 96 hours on a 2000 mAh Li-Po cell.

  5. EXPERIMENTAL RESULTS

    1. Experimental Setup

      The system was evaluated over a continuous 72-hour test. Schedules were configured at four daily time points (08:00, 13:00, 18:00, 22:00), yielding 36 scheduled events over three days, supplemented by 14 manually injected events, for 50 total test events. Ambient temperature was maintained at 25°C ± 3°C.

      Figure 1 illustrates the operational flow of the developed system. At startup, the ESP32 initializes the DS3231 RTC and loads the stored medication schedule from non-volatile memory. The RTC is periodically checked against the scheduled medication times. When a schedule match occurs, the system activates the buzzer, voice alert, and OLED display. The alert remains active until the user acknowledges the reminder or the five-minute timeout is reached. An acknowledged event is recorded as a successful medication intake, whereas an unacknowledged event is classified and stored as a missed dose. After processing the event, the system advances to the next scheduled medication and returns to the monitoring state.

      Fig. 1. Operational flow of the SmartDose Scheduler for medication scheduling, user acknowledgment, and missed-dose tracking.

    2. Performance Results

      TABLE II: Experimental Performance Results

      Parameter

      Observed

      Expected

      Result

      Alerts Triggered

      50

      50

      100%

      Acknowledged

      45

      50

      90%

      Missed Doses Logged

      5

      5

      100%

      False Acknowledgments

      0

      0

      0%

      RTC Timing Accuracy

      2 sec

      N/A

      Pass

      System Uptime (hrs)

      72

      72

      100%

      Audio Audibility (dB)

      68 dB

      65 dB

      Pass

      OLED Refresh Success

      50

      50

      100%

    3. Discussion

    The system achieved 100% scheduling accuracy with a maximum observed timing deviation of ±2 seconds relative to a reference NTP-synchronized clock, consistent with DS3231 specifications. All 45 intended acknowledgments were correctly registered; no false acknowledgments were recorded, confirming the efficacy of the button debouncing algorithm. All 5 missed dose events were correctly classified and logged, validating the FSM timeout logic [8], [10].

  6. COMPARATIVE ANALYSIS

    TABLE III: Comparison with Existing Systems

    System

    Cost

    Internet

    ACK

    Missed Log

    Mobile App [3]

    Low

    Yes

    No

    No

    Smart Dispenser [7]

    High

    No

    Partial

    Partial

    IoT System [2]

    High

    Yes

    Yes

    Yes

    SmartDose (Ours)

    Low

    No

    Yes

    Yes

    The proposed system occupies a distinctive position: it achieves acknowledgment enforcement and missed dose logging associated with high-cost IoT solutions while maintaining cost levels and internet-independence comparable to basic mobile alarm systems [1], [9].

  7. LIMITATIONS AND FUTURE WORK

    The current implementation presents several limitations. Schedule configuration requires firmware modification; a more accessible interface such as a mobile Bluetooth companion application would improve usability. The OLED display's small form factor may challenge users with visual impairment. Missed dose logs require physical access for retrieval.

    Future development will pursue: (1) BLE integration for wireless schedule configuration and missed dose log export; (2) optional Wi-Fi connectivity for cloud-based adherence monitoring and remote caregiver notifications [6]; (3) multi-compartment pill dispenser hardware integration; and (4) clinical pilot studies with elderly participants to quantify real-world adherence improvement [1], [5].

  8. CONCLUSION

This paper presented SmartDose Scheduler, a compact embedded medication reminder system designed to improve patient adherence through scheduled multi-modal alerts, enforced user acknowledgment, and automated mised dose tracking. Built on ESP32 with DS3231 RTC, SSD1306 OLED, and DFPlayer Mini, the system operates entirely offline. Experimental validation confirmed 100% scheduling accuracy, 90% acknowledgment rate, and complete missed dose logging fidelity across a 72-hour evaluation.

SmartDose Scheduler addresses a clinically significant gap in affordable, reliable medication adherence technology. Its low component cost, straightforward hardware assembly, and extensible firmware architecture position it as a practical foundation for deployment in home care, elderly care facilities, and rural health settings. The incorporation of user acknowledgment as a system- enforced requirement represents a meaningful design contribution toward genuinely adherence-enforcing reminder technology.

ACKNOWLEDGMENT

The authors would like to thank the Department of Mechatronics Engineering, KPR Institute of Engineering and Technology, for providing the laboratory facilities and resources that supported this research.

REFERENCES

  1. A. J. M. S. J. de Dios, J. M. A. R. L. de Guia, and M. C. R. S. Del Rosario, "Development of a smart pillbox system to improve medication adherence," Revista Colombiana de Ciencias Químico-Farmacéuticas, vol. 53, no. 1, pp. 245262, 2024.

  2. T. Nguyen and V. Tran, "Smart Pill Box: An IoT-Integrated Application for Monitoring Patient Medication Usage at Home," in Proc. 9th Int. Conf. Cloud Computing and Internet of Things (CCIOT), 2024, pp. 112119. doi: 10.1145/3704304.3704308.

  3. S. K. Mahata and P. K. Dutta, "Smart Medicine Reminder and Healthcare Assistance System," Int. J. Res. Appl. Sci. Eng. Technol. (IJRASET), vol. 12, no. 4,

    pp. 15401547, Apr. 2024.

  4. R. Kumar, A. Sharma, and V. Singh, "A Smart Medical Box for Medical Professionals and Patients for Helping Them to Avail Timely Medication," J. King Saud Univ. Comput. Inf. Sci., vol. 36, no. 2, pp. 8998, 2024.

  5. L. B. Minaam and M. Abd-Elfattah, "Smart drugs: Improving healthcare using Smart Pill Box for Medicine Reminder and Monitoring System," Egyptian Informatics J., vol. 19, no. 3, pp. 177184, Nov. 2018. doi: 10.1016/j.eij.2018.03.001.

  6. S. Mondal, T. Biswas, and A. Mukherjee, "A smart medicine reminder kit with mobile phone calls and health monitoring system," Heliyon, vol. 10, no. 4, p. e25419, Feb. 2024. doi: 10.1016/j.heliyon.2024.e25419.

  7. H. K. Verma and R. Tripathi, "Development of Smart Pill Expert System Based on IoT," J. Inst. Eng. India Ser. B, vol. 105, no. 2, pp. 311320, 2024. doi: 10.1007/s40031-023-00956-2.

  8. J. Wang, L. Zhang, and H. Liu, "Construction and application of medication reminder system," BioMed. Eng. OnLine, vol. 23, no. 1, Art. no. 72, Jul. 2024. doi: 10.1186/s13040-024-00376-y.

  9. M. S. Khedkar and S. R. Patil, "A Smart Pill Box to Remind of Consumption using IoT," Int. J. Comput. Appl., vol. 182, no. 1, pp. 2429, 2018.

  10. N. S. Rao, "A smart pillbox for increasing user's medication adherence," IEEE Trans. Human-Mach. Syst., vol. 52, no. 5, pp. 912921, Oct. 2022.