The goal for this week was to define the final project clearly: what it will do, what it
needs, what I will make myself, what questions are still open, and how I will evaluate if it works.
The general workflow was:
Define the scope of the pill dispenser and simplify it into a realistic build.
List the components, materials, fabrication processes, and sources needed for the project.
Separate what will be designed and fabricated from what will be bought.
Identify remaining technical questions, risks, and evaluation criteria.
Final project: 16-day pill dispenser
My final project is a pill dispenser for my grandfather. It stores medication in a
16-compartment carousel. The RTC keeps the time and triggers an alarm. The buzzer keeps sounding
until the user presses the blue confirmation button. Only after that button press does the stepper
rotate the carousel and dispense the pills by gravity.
The first idea was a 31-day dispenser, and I also explored two-dose versions with separate morning
and night rings. I simplified the build to one 16-day ring because it is more realistic for the time,
easier to print, and easier to troubleshoot. Future versions can repeat the same 16-slot system:
two rings for 32 days with one dose, or four rings for two daily doses across one month.
I also kept the networking idea from Week 11. The XIAO ESP32-C6 can create its own Wi-Fi access point
and serve a small offline web interface, so family members or caregivers can connect from a phone
without internet. The interface can be used to set alarm times, check the last dose status, and reset
the schedule.
Current working principle
Alarm sounds, user presses the blue button, the 28BYJ-48 stepper moves 512 steps,
one compartment aligns with the acrylic opening, and the pills fall into the tray.
The red button is reserved for snooze, skip, or simple settings. A line follower or IR sensor
can be added later to check if pills fell.
What will it do?
It will remind the user to take medication and dispense one dose when the user confirms the alarm.
It is not meant to replace a caregiver completely. It is meant to reduce daily dependence by making
the routine clearer: alarm, press button, collect pills.
1
Clock
The DS3231 RTC keeps the current time and the OLED displays it.
2
Alarm
At the programmed time, the passive buzzer plays a repeated beep pattern.
3
Confirmation
The blue push button stops the alarm and starts the dispense movement.
4
Dispensing
The carousel advances one compartment and the pills fall by gravity.
Who's done what beforehand?
Commercial pill dispensers already exist, but many are closed products and can be expensive.
I also reviewed open-source pill dispenser ideas, including rotating and stacked mechanisms.
Those references helped me understand the basic problem, but I changed my design so it is flat,
compact, and easier to fabricate with the parts I already had.
What sources will I use?
My Week 14 interface and embedded programming work.
My Week 15 system integration plan.
My Week 11 networking work with the XIAO ESP32-C6 access point and offline web interface.
XIAO ESP32-C6 pinout and power information.
DS3231 RTC examples using RTClib.
Adafruit SH110X examples for the OLED screen.
AccelStepper examples for the 28BYJ-48 motor.
Fab Academy documentation about final project requirements.
What will I design?
3D printed carousel
One 16-compartment ring for medication storage. Each compartment holds one dose.
Gear transmission
A 32-tooth internal ring gear and an 8-tooth pinion, both module 2.
Laser-cut cover
Transparent acrylic cover with a fixed dispensing opening, held with magnets.
Plywood base
CNC-cut plywood base for the structure. It holds the electronics and mechanical mechanism.
Custom electronics
XIAO ESP32-C6 hub board with connections for I²C, motor driver, buttons, buzzer, and optional sensor.
Offline web interface
Local interface hosted by the XIAO ESP32-C6 in access point mode for caregivers and family members.
Firmware
Alarm logic, OLED screens, stepper movement, button debounce, buzzer patterns, and motor idle behavior.
Materials and cost
Item
Use
Source
Estimated cost
XIAO ESP32-C6
Main controller
Already available
$180 MXN
Custom hub PCB
Electronics integration
Milled in the lab
$40 MXN
28BYJ-48 stepper motor
Carousel movement
Electronics kit
$50 MXN
ULN2003 driver
Stepper driver
Electronics kit
$30 MXN
DS3231 RTC
Timekeeping
Already available
$80 MXN
OLED SH1106
Display
Already available
$80 MXN
Passive buzzer
Alarm sound
Arduino sensor kit
$15 MXN
2 tactile push buttons
Confirm and secondary input
Electronics kit
$20 MXN
Line follower / IR sensor
Optional pill fall detection
Arduino sensor kit
$25 MXN
PLA filament
Carousel, gears, tray, supports
Home printer / lab stock
$120 MXN
Acrylic sheet
Transparent cover
Lab or local supplier, laser cut
$80 MXN
Plywood / triplay
Structural base
Local supplier, cut on CNC
$60 MXN
Magnets
Removable cover
Local supplier
$30 MXN
M3 screws and nuts
Assembly
Hardware store
$50 MXN
USB-C 5 V charger
Power
Already available
$0 MXN
Total estimated
About $730 MXN
What processes will be used?
Process
Part or system
Reason
2D design
Acrylic cover and plywood base profiles
These flat profiles are prepared for laser cutting and CNC machining.
3D design
Carousel, gear, pinion, tray, supports
These parts need curved geometry and mechanical fit.
Additive fabrication
PLA printed mechanism
Fast iteration for the carousel and gear system.
Subtractive fabrication
Milled PCB, laser-cut acrylic, and CNC-cut triplay
Uses the lab machines and creates clean final parts in the right material.
Electronics production
Custom XIAO hub board
Removes loose breadboard wiring from the final build.
Embedded programming
RTC, OLED, stepper, buzzer, buttons, and offline web interface
Controls the system behavior, local display, and caregiver interface.
System integration
Final dispenser assembly
Combines power, structure, electronics, and mechanism in one object.
What questions need to be answered?
Can the gear and carousel move one compartment reliably with 512 steps?
Will the pills fall by gravity through the acrylic opening without getting stuck?
Is the buzzer loud enough inside the dispenser enclosure?
Does the magnetic cover hold well while still being easy to remove for refilling?
Can the XIAO power the OLED, RTC, buzzer, and stepper driver from one USB-C charger?
Can the XIAO host the caregiver interface in access point mode while still running the alarm and motor logic?
Is the optional line follower useful enough to include, or does it add more complexity than value?
Can the user understand the blue button interaction without extra instructions?
How can the 16-day ring become modular in a future version?
How will it be evaluated?
Test
Success criteria
Priority
Alarm
RTC triggers the buzzer and OLED alarm screen at the programmed time.
High
Blue button
Button stops the alarm and starts the dispense movement.
High
Stepper
Carousel advances one compartment without losing alignment.
High
Gravity dispensing
Five pills fall into the tray without help.
High
USB-C power
System runs from a 5 V USB-C charger while the motor moves.
Medium
Offline interface
Caregiver connects to the XIAO access point and opens the local page without internet.
Medium
Magnetic cover
Cover stays attached but can be removed by hand.
Medium
Refill
All 16 compartments can be refilled in under five minutes.
Medium
User test
User understands that the blue button confirms and dispenses.
High
Learning outcomes
Define the scope of a project: I reduced the final build from a 31-day dual-dose system to a 16-day single-ring prototype that I can actually finish and test.
Develop a project plan: I listed the made parts, bought parts, processes, remaining questions, and evaluation tests.
Make rather than buy where possible: The carousel, gears, cover, base, PCB, tray, and supports are designed and fabricated by me.
Keep future work honest: Modularity is still a future improvement, not something I claim is fully solved in this version.