Illustration of the IoT smart pill dispenser with an 8-compartment rotating carousel, buzzer reminders and the caregiver app.
More project photos (2)

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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

Download abstract (PDF)

Related guides

All guides
Blueprint-style technical illustration of an ESP32 development board at the centre, with sensor nodes, data-flow arrows and a circuit-brain motif representing an AI agent reasoning and sending decisions back.Engineering students building IoT or embedded final-year projects who want to add local AI agent behaviour with ESP32, MQTT and a small language model.

AI Agents on ESP32: Agentic IoT Final-Year Projects

An agentic IoT system observes, reasons, acts, remembers and explains. On ESP32 that means a split architecture: the chip senses and acts while a small local model (Ollama on your laptop) reasons over MQTT — a full LLM needs gigabytes of RAM the chip doesn't have. This guide covers three working patterns (host-reasoned agent, on-device tinyML on ESP32-S3, and a hybrid of both), plus Wi-Fi CSI presence sensing, parts and budget for India, code shapes, and honest limits to state in your report.

Read guide
Technical illustration of three electronic control units linked by a twisted-pair CAN bus cable carrying signal pulses between them.Electronics, E&TC, IoT and robotics students who keep hearing “CAN bus” in EV, automotive and industrial project ideas and want to understand it properly before wiring anything

CAN Bus Basics for Students: How ECUs Communicate

CAN bus is the shared network that lets dozens of controllers in a car, EV or robot communicate over two wires. This guide explains message IDs, arbitration, the physical layer, frame structure, error handling and CAN FD, then walks through building a working two-node bench network with an ESP32 and a transceiver.

Read guide
Illustration of a quadcopter drone build showing labeled parts including frame, motors, propellers, ESCs, flight controller, and battery.B.E./B.Tech Electronics, Mechanical, and Computer Science students planning to build a quadcopter drone who need to select compatible parts without wasting money on mismatched

Drone Build: Parts Selection Guide

Picking drone parts that actually work together is a sizing problem, not a shopping problem. This guide walks the compatibility chain — frame to props to motors to ESCs to battery — with the thrust math, firmware choices, LiPo safety, and the bench-test order that prevents disasters.

Read guide
Get a quotation