Adults onlyESP32Level 3/3
Smart Medicine Dispenser
A 3D-printed 21-slot wheel drops each dose on time, an IR sensor sees it taken, and the family is alerted if it isn't.

Adults only
Involves handling medicines. Keep medicines and the device out of children's reach.
Not for children. Build at your own risk.
This is a DIY reminder aid, not a medical device. Always follow your doctor and check the doses you load.
Strictly follow the description given with this video.
Video
The video link will be added here soon.
How it works
- At dose time the stepper turns the wheel one slot and the dose drops into the cup with a beep.
- The IR sensor in the cup bay sees when the pill is picked up and marks it TAKEN.
- Not taken in 15 minutes: the family gets a Telegram alert, and the next dose is never dropped on top.
- A hall sensor and magnet find the wheel's HOME position after every power cut.
Parts you need
- ESP32 dev board× 1Buy
- DS3231 clock module× 1Buy
- 28BYJ-48 stepper + ULN2003 driver× 1Buy
- IR obstacle sensor (cup bay)× 1Buy
- Hall sensor module + 6×3 mm magnet× 1Buy
- Active buzzer× 1Buy
- 5V 2A adapter× 1Buy
Kit for this projectPrice on request
Get the kitWiring

PowerGroundSignal
| # | From | Connect to |
|---|---|---|
| 1 Power | Adapter +5V | 5V rail |
| 2 Ground | Adapter GND | GND rail |
| 3 Power | ESP32 VIN | 5V rail |
| 4 Signal | Driver IN1 | ESP32 D15 |
| 5 Signal | Driver IN2 | ESP32 D4 |
| 6 Signal | Driver IN3 | ESP32 D5 |
| 7 Signal | Driver IN4 | ESP32 D18 |
| 8 Power | Driver + | 5V rail |
| 9 Ground | Driver − | GND rail |
| 10 Signal | Clock SDA | ESP32 D21 |
| 11 Signal | Clock SCL | ESP32 D22 |
| 12 Power | Clock VCC | ESP32 3V3 |
| 13 Signal | Buzzer + | ESP32 D23 |
| 14 Signal | IR OUT | ESP32 D34 |
| 15 Power | IR VCC | ESP32 3V3 |
| 16 Signal | Hall DO | ESP32 D35 |
| 17 Power | Hall VCC | ESP32 3V3 |
| 18 Ground | All module GND | GND rail |
3D print files
- pill_carousel_21.stlPLA / PETG · 0.2 mm · 25% · no supports · ~2 h 30 minLink at launch
- dispenser_base.stlPLA / PETG · 0.24 mm · 20% · supports under the cup bay · ~5 hLink at launch
Code
The tested Arduino / ESP32 code for this project will be posted here, ready to copy.