Smart Dose

The Smart Pill Dispenser is an innovative way to track and control the distribution of medication more efficiently and flexibly than is currently done.

It accomplishes this by using IoT and embedded system principles to automate the process of dispensing pills and add smart functionality that allows physicians to track whether patients collect their medication regularly.

Motivation

This project aims to solve two major problems related to routine medication that IoT is well positioned to solve: non-compliance and the trend towards more mobile interactions with doctors.

Non-compliance is a major issue for the medical community and is extremely difficult to solve. Patients often forget or skip taking medications that are critical to their wellbeing and don't admit this to their physician. Sometimes they make a genuine mistake and just don't know which pills to take when. This degrades the physicians ability to diagnose the problems they face due to lack of information on how well the patient follows their instructions. One way this is addressed is by having authorised personal track and dispense the correct medication but this is resource intensive and not an option in many cases.

Another issue that faces the community is that while the increase in online consultations offers people much easier access to medical help, the ability to change and deliver perscriptions lags behind. A simple search shows many new services that offer the expertise of a medical professional online or by phone call but getting actually getting the perscription remains an issue. Being able to call ones family doctor to update them on circumstances and have access to an immediately updated perscription would remove a barrier to healthcare that millions of people could benefit from.

These issues are most prevalent in places where chronic healthcares issues are the main problem. Thus, an ideal place to test whether this device would be useful is a retirement village where it could be placed in a central location to allow all citizens easy access to their medication. From here, the convenience and efficiency could scale up to use in pharmacies and possibly even private use.

System

Our proposal is for a pill dispenser that connects to an online app that will control which and how many pills are dispensed. This project uses both IoT and embedded systems to implement the desired functionality. The combination allows for the connectivity and ability to accurately dispense that will be critical in making this feasible.

Architecture

The cornerstone of this project is the Doctor-Patient app, which allows convenient access for both parties. Patients can log-in to see whether they have taken their required medication and what they can expect to be provided with in the future. Doctors can log in to view the data related to each patient and even change what will be dispensed.

Link to Github repository for Smart IoT App.

In order to actuate the physical side of this project, an embedded layer will control how the pills are actually dispensed and the peripheral systems associated with it. This requires controlled use of servos, displays, and numerous sensors.

Technical Components

Application:

Embedded Systems:

Our physical design is the backbone of the project and used plywood towers to hold funnels that allow a single pill to be collected by a cavity below it. When rotated by a servo motor, this pill is is moved above the ramp and falls down towards it. The ramp is directed towards a central collection hub for all of the pills.

We use an ESP8266 to interface with the database associated with the app. It requests updates to it regularly to keep track of what each patient should receive and then communicates this to the Arduino Nano which controls the physical dispensing.

The hub of most of the control in this section is controlled by an Arduino Nano. This board takes in information from the limit switches, IR detectors, alarm, and ESP8266 which it then uses to activate the servos when required to dispense the various pills. A secondary Nano turns on an alarm when the lids of the pill holders are taken off without authorization.

Servo motors provided the means by which the pills were moved. They were controlled by a PWM signal that was generated by the Nano.

To track whether pills were dispensed or not, IR detectors were placed below the towers such that if a pill fell down it would trigger the sensor. This was then interpreted by the Nano as a successful dispense. If it was not detected, the system would wait in position for a while and then show an error.

Limit switches placed on the lids of the pill holders allow for an alarm to alert staff to anyone wishing to steal medications. The alarm is currently implemented with a noise emitting alarm but could just as easily be a message sent to the relevant authorities.

Patient identification is accomplished through the use of a fingerprint scanner. The one we have used can store up to 127 finger prints and allows patients to easily access the pill dispenser without fear of someone stealing their medications.

Prototype

Our prototype was designed to be able to dispense three types of pills with a storage capacity of around 50 pills each. Since the fingerprint sensor requires enrollment outside normal functioning, we used our three fingerprints as the configured users. Both of these aspects could easily be scaled up for permanent use. The goal of this prototype is to be a proof of concept that pills can be dispensed as directed by the application.

Caption

Results

Our prototype was a success and was able to dispense pills correctly after interacting with the parent app. The application executed its function perfectly and provided the data to accurately execute in the physical space. While some reliability issues remain in they physical space, the device is able to identify patients and dispense the correct dosages in a time effective mannar and while tracking if the pills were dispensed as desired.

There were a few ways this project could have been improved. By finding a microcontroller with more I/O pins and integrated WiFi the need to communicate across controllers would have been reduced. This would allow for more efficient control and collision avoidance. Another way to improve this project would be to use better parts. A serious consideration in this project was the limited movement range of the servos and the limited sensing capability of the IR sensors. Finally, 3D printing the structure would have reduced the natural tolerances invokes by working with plywood and allow more reliability.

References

Patient Non-Compliance: https://jaoa.org/article.aspx?articleid=2538817

Examples of Private Pill Dispensers: https://www.epill.com

Our Team

Alex Kim

Software: Designed Doctor-Patient App and connection to ESP8266.

Sabin Zarrandikoetxea

Hardware: Designed structure and PCBs.

Ryan Davies

Embedded Systems: Designed control systems for electric components.

Contact

Alex Kim: agk2144@columbia.edu
Ryan Davies: rtd2119@columbia.edu
Sabin Zarrandikoetxea: sz2859@columbia.edu

Columbia University Department of Electrical Engineering
Instructor: Professor Xiaofan (Fred) Jiang