The problem
Missed medication is one of medicine's costliest failures. Studies find that many patients — especially elderly patients managing several prescriptions — skip doses, take them at the wrong time or stop a course early, and the consequences range from uncontrolled blood pressure to hospital readmission. Pill organizers help, but they are passive plastic: they cannot remind anyone, cannot tell a caregiver what was missed, and cannot distinguish Tuesday's dose from Thursday's. Smartphone alarms help the patient but leave the family blind. What is missing is a small, honest bridge between the prescription schedule and the people who care — a device that presents the right compartment at the right time, reminds loudly until acknowledged, and tells a caregiver when a dose goes untaken. This project builds that bridge with an ESP32, a rotating 8-compartment carousel and a battery-backed real-time clock, turning adherence from a guess into logged fact.
How it works
The caregiver loads pills into the labeled carousel compartments and sets the dose schedule in the app; it syncs to the ESP32 and is stored in non-volatile memory.
At each scheduled time (tracked by the battery-backed DS3231 RTC, accurate without internet), the motor rotates the carousel so the correct compartment aligns with the dispensing chute.
The buzzer sounds and the OLED shows the dose name and time; the pill is accessible through the chute.
The user presses the confirm button after taking the dose, which logs the event with a timestamp.
If no confirmation arrives within the grace window (default 30 minutes), the unit re-alerts and notifies the caregiver via the app.
Project features
8-compartment rotating carousel — one labeled slot per scheduled dose
Stepper/servo motor indexes the carousel to the correct compartment at dose time
DS3231 RTC keeps the schedule accurate without WiFi or mains power
Buzzer + OLED reminders at each dose time, repeating until acknowledged
Dispense confirmation button — user presses after taking the pill
Missed-dose detection: no acknowledgment within the grace window triggers a caregiver alert
Caregiver app: schedule management, adherence-percentage ring, missed-dose alerts
Per-dose dispense log with timestamps for adherence reporting
Multi-schedule support: morning/noon/evening/night templates
Position calibration at startup so the carousel never drifts out of alignment
What is included
Fully assembled pill dispenser unit
Complete firmware source code (Arduino IDE, well-commented)
Circuit diagram and wiring schematic
Carousel calibration and schedule-setup guide
Project report PDF (synopsis, design, adherence-reporting procedure, conclusion)
PPT presentation for final review
Viva Q&A preparation document
Caregiver app setup and alert-configuration guide
FAQs
- How does it know a dose was missed? Each dose has a grace window (default 30 minutes). If the confirm button isn't pressed in that window, the unit logs a missed dose, re-sounds the buzzer, and notifies the caregiver through the app.
- Does it work during power or internet outages? Yes for the core job: the battery-backed RTC keeps the schedule and the buzzer/OLED reminders fire regardless. Only remote caregiver alerts need WiFi.
- How many doses per day can it handle? The 8-compartment carousel covers typical 3–4 dose/day regimens for two days, or a full week of once-daily dosing. The report includes a loading-plan table.
- Is it safe for elderly users? The interface is deliberately simple: one loud buzzer, a clear OLED message, and a single big confirm button. The caregiver app handles all the complexity remotely.
- Can I demo it? Yes — set a dose one minute out, watch the carousel index, hear the reminder, press confirm, and show the adherence log updating. Then demo a missed dose by ignoring it.
- How can I extend this project? Common extensions include: fingerprint-locked access per patient, weight-sensor dose verification, medicine-expiry tracking, and integration with a pharmacy refill service.
Limitations & prerequisites
Sized for standard tablets and capsules (~20 mm max); very large pills may not fit the compartments.
Pills must be loaded manually into compartments — the unit dispenses and reminds, it doesn't sort prescriptions.
This is an adherence aid, not a medical device — it cannot verify that the correct medication was taken.
Remote caregiver alerts need a stable 2.4 GHz WiFi connection; on-device reminders work offline.
Components & software requirements
ESP32 DevKit microcontroller (WiFi + Bluetooth, dual-core 240 MHz)
Stepper/servo motor with driver for carousel indexing
8-compartment rotating pill carousel with dispensing chute
DS3231 RTC module (±2 ppm, battery-backed)
0.96" OLED display (dose reminders and status)
Active buzzer + confirm push-button
Caregiver cloud/mobile app (schedules, adherence ring, alerts)
5 V USB power with RTC battery backup, enclosure, wiring
Specifications
| Parameter | Value |
|---|---|
| Microcontroller | ESP32 (240 MHz dual-core, WiFi 802.11 b/g/n) |
| Compartments | 8 labeled slots, one per dose |
| Indexing | Stepper/servo with position calibration at startup |
| Timekeeping | DS3231 RTC, ±2 ppm, battery-backed |
| Reminder | Buzzer + OLED, repeats until acknowledged |
| Missed-dose window | 30 min grace (configurable), then caregiver alert |
| Adherence tracking | Per-dose log, daily/weekly adherence % |
| Alerts | App push + SMS option for missed doses |
| Power | 5 V USB; RTC keeps time during outages |
| Pill size | Standard tablets/capsules up to ~20 mm |