2025CruzHacks, Best Hardware Hack
PillWatch
A face-recognition pill dispenser with caregiver alerts. I wrote Arduino firmware for servo dispensing and ultrasonic wake and pickup checks, plus an ESP32 touchscreen interface with separate SPI buses for the display and touch controller.
Read the full build story
What I built
I wrote Arduino firmware for two servo dispensers and two ultrasonic sensors, with commands sent over 9600-baud UART. An ESP32 runs an ILI9341 TFT display on a 55 MHz SPI bus and an XPT2046 touch controller on a second bus. A Flask server handles face recognition, sends each patient's doses for three daily times and emails the caregiver.
The problem I worked through
The dispenser, face-recognition server and touchscreen ran on three separate devices. The ultrasonic sensors also had different jobs: waking the device and checking whether medication had been picked up.
How I improved it
I put the display and touch controller on separate SPI buses and wrote the Arduino side to handle dispensing and sensor checks. I also separated the pill channel from the electronics bay in the chassis so the mechanism and electronics could be reached for adjustments.
Tools: ESP32, Arduino, Python, C++, Flask, servos, ultrasonic sensors, UART, SPI, ILI9341 TFT, XPT2046 touch, Fusion 360
View project