Automatic Pill Dispenser
Dana Silverbush and Nir Atias
Complex and chronic diseases require a frequent administration
of drugs as part of the treatment. Often, this treatment would
ideally consist of different types of medications and different
dosage at different time of the day (e.g. night time medication
could be more aggressive and induce drowsiness whereas such
a treatment is often problematic during the day).
Keeping track of the exact schedule is challenging for healthy persons,
let alone in disabled or elderly populations where regular
medication is more prevalent relative to the general population.
Currently, the method of choice for avoiding such errors is to use
a designated packaging where pills are grouped by a daily schedule.
Alternatively, a caretaker could administer the pills
at the required times.
However, both solutions suffer from similar shortcomings: firstly,
a human error could lead to the wrong pill being administered or
packaged and, secondly, the patient or caretaker might miss
We present a proof-of-concept system that dispense pills automatically
according to a given schedule and dosage/type combinations.
The system is designed so that mistakes could be identified and reported
to an operator or even a medical professional so that the risk
to the patient is minimized.
The pill dispensing system can control several dispensers
each dispenser has a storage for a single type of drug. The system
also monitors treatments
, each may include different drugs
given at designated times.
A pill dispensing system should have the following submodules:
- Controller: monitoring + communication
- Dispenser: motor + pill detector + cartridge id
- Holder: cup + weight sensor
- User interface
- Manual override
The controller is a programmable component (embedded system) that coordinates
the peripheral component, monitors the treatments and communicates with the
user. The controller activates other components such as the correct dispenser
in order to administer the drug.
The controller realizes the following state machine:
A dispening unit extracts a pill from a cartirdge at a given time. Ideally, the dispening unit
should be able to communicate with the cartirdge to validate the correct drug was inserted in the
correct unit. Additionally, the dispenser should be able to drop exactly one pill upon request
and communicate a failure to do so.
The holder is a receptor for the pills of a single treatment at a given schedule.
The holder additionally contains a sensor to detect that drugs were indeed taken
from the device and communicates a failure to do so.
The user interface allows for communication with the users of the system. The status
of the system is displayed to the user: date and time when system is idle or the status and
progress of pill administration when the system is active.
The module additionally
communicates error messages in the following conditions:
- A failure to detect that a pill was dropped
- A failure to detect that pills were taken from the cup
- Termination message when pill detection mechanism is malfunctioned
When pills are not removed from the device for a long time a notification is
send to a caretaker.
We allow manual override at different stages of operation when technical difficulties
occur. For example, the user can signal that a pill was dropped when the detection
For this project, we used an LPC2148 educational board connected to a step-motor.
The LPC2148 is mounted with an LCD and can receive input via a button on a GPIO port.
We used Contiki to implement the controller state machine. The Contiki OS does not
work on ARM processors and, therefore, we converted the core Contiki modules to this
We used three processes to implement the state machine:
- Clock - a process that keeps the LCD updated with the current time and date.
- Scheduler - a process that tracks the schedule and initiates the pill dispensing in
the appropriate times.
- Logic - a process that dispenses pills for a single prescription at a time.
If multiple events overlap in time, this process will handle one of them and, when
it is completed (i.e., the pills were taken), will handle the additional, waiting events.
We tested two alternatives for the implementation of the pill extraction mechanism.
- Conveyor based design where the pills are dropped onto a rotating belt.
The pills are dropped off the edge of the belt into a container.
- Wheel based design where the pills are dropped onto a wheel. The pills
are removed using a pin into a container.
We have focused mainly on the wheel based design.
At first we mounted the wheel onto
the step motor. However, the erratic movement of the step motor, especially during
initialization caused the pills to drop off the wheel. In addition, during operation
the centrifugal force generated by the motor also caused the pills to dislodge and
drop off the wheel. To circumvent this issue we mounter a barrier around the wheel
but had to come with a different solution due to recurring jams.
To achieve a smoother movement and to control the rotation speed we
separated the wheel from the driving motor. One option to transmit the
force from the motor to the wheel is via cogwheels however, we chose to
to connect the motor and the wheel with an elastic band as the band
absorbs the jittery movement of the motor.
We also had to fine tune the number of steps so that only one pill would be dropped.
Our wheel was designed with four slots so the number of steps had to complete a 90
Ideally, a dispensing unit should also monitor the how many pills were actually dropped
and report it to the controller. We planned to implement this functionality using a pair
of IR transmitter and receiver. However, instead we used a button to emulate the signal
that should have been generated by the receiver.
The holder is a container for the pills arriving from multiple dispensing units.
A switch (or a weight sensor) reports that the container was picked and signals the
completion of the dispensing operation.
In our implementation we used the button present on the LPC2148 and pressed it manually.
We used the LCD interface to communicate with the user.
At idle the LCD displays the date and time, and an appropriate message indicated pill dispensing and errors.
- A set of prescriptions that treats a specific medical condition
- The amount, type and schedule for drug administration
- The timetable for a given prescription
- A cartridge for a single type of drug