Wen Cao

Back to projects

Fall 2024 ME 100

IoT smart pillbox

A compact, travel-friendly pillbox that reminds you when to take each medication, watches the temperature and humidity your pills are stored in, and opens only the compartment you need.

Team
Wen Cao, Emily Harris, Abdel Zaro
Hardware
ESP32, DC motor, temperature and humidity sensor, LEDs, buzzer
Video
Watch the demo

The gap

Managing several medications a day is hard. Existing pill organizers tend to be either simple but not smart, or smart but expensive and tied to a monthly subscription. We wanted something simple, useful, and affordable.

Concept sketch of the pillbox
The concept: a rotating disk uncovers one compartment at a time.
CAD model of the pillbox
The CAD model.

Reminders

The ESP32 keeps track of the real time over Wi-Fi. When a dose is due, say 4:00 PM, the LED for that compartment lights up and blinks, and an email reminder goes to the user’s phone. Each LED is tied to one compartment, so it is obvious which pills to take.

ESP32 and LEDs on a breadboard
The LED reminder circuit on a breadboard before soldering.

Storage monitoring

A sensor logs the temperature and humidity inside the box every 30 minutes. If either goes out of a safe range, a buzzer, amplified with an op-amp, sounds and an email alert goes out. Caretakers or doctors can check live readings on an Adafruit IO dashboard.

Soldered sensor and speaker circuit
The speaker, sensor, and ESP32 soldered to a protoboard.
Adafruit IO dashboard gauges
Live humidity and temperature gauges on Adafruit IO.

Opening the right compartment

A compartment opens only when its button is pressed: a motor turns a disk to the right lid, and torsion springs pop it open. We made this a local action instead of controlling it over the internet, so the box still works when the Wi-Fi does not, which was a real concern on campus.

Labeled top view of the pillbox
Top view: the three lids, the rotating disk, the button, and the limit switch.
Labeled photo of the internal mechanism
Inside: the motor, gears, shaft, and torsion springs.

Electronics

Circuit diagram
The full circuit, drawn on one ESP32 for readability. The real build used three, one per teammate’s subsystem.

Back to projects