
Smart Medicine Dispenser
The Smart Medicine Dispenser is an Internet of Things product that keeps track of your medication, reminds you to take your medicines and dispenses it in a timely manner.
The product allows you to take a picture of any prescription using a custom made Android App. The product analyses the prescription to store relavent information. The device then automatically dispenses the required medications based on the medicine and time mentioned in the patient's prescription. Multiple users can use this product to remind themselves to take their pills. This product offers some security features including a fingerprint sensor to ensure that only the authorized individual accesses the pill. Further functionalities include pill tracking, reminders to take your pills, storage of prescription data in a secure server, and metrics about pill consumption, pill adherance and more.
Motivation
Millions of people all over the world are on some kind of medication for various health ailments. Such individuals take different medications at different times of the day and can forget due to various reasons, such as busy schedules, forgetfulness or suffering from mental ill-health.
The Smart Medicine Dispenser is a user-friendly product designed to improve lives of such individuals. the device helps to keep track of their pills, reminds them to take it and even notifies them when they miss a dose. Added security on the device ensures that the pills are dispensed to the specific user at times noted in the prescription, leaving the patient and their loved ones at ease.
System
The project is divided into 3 main areas:
The Embedded System - Pill dispenser mechanism using Raspberry Pi 4B, Fingerprint Sensor and Stepper Motors
Cloud Server and Interfacing - Android App to take pictures of prescriptions, Google Firebase to store prescription data
Data Processing and Analytics - Google Cloud Platform to perform Optical Chracter Recognition (OCR) to extract and populate the database, ThingSpeak API to track pill consumption, pill counts and pill adherance.
Architecture
The block diagram below gives a brief idea about the various components used in our device.
The Raspberry Pi controls the various actuators (Stepper Motors) over the GPIO communication and the AdaFruit fingerprint sensor over the UART interface. The Raspberry Pi reads data off the the Google Firebase/Google Sheets database using REST APIs to keep track of the pill dispensation times.
The Android App created using Android Studio is connected to the Google Firebase server which stores the prescription images in a secure manner. The app is written in Java and connects to Firebase using the Google's internal infrastructure.
The VM instance on GCP runs our Optical Character Recognition algorithm. We use Pytorch libraries and EasyOCR libraries to perform the text extraction on a cloud instance with GPU support to allow accelaration using CUDA.
The extracted text is then used to populate the Google Firebase/Google Sheet database from where the Raspberry Pi eventually reads it. A shell script ensures the images are deleted from the VM instance the moment they are processed and keeps no record of the data that was processed.
The feedback mechanism through an audible buzzer connected to Raspberry Pi over ADC, as well as text messages using the Twilio REST API provide reminders to the patients.
Prototype

3D Printed Dispensing Models

Android Application

Google Firebase
References
1. OCR - https://github.com/JaidedAI/EasyOCR
2. Google Cloud - https://cloud.google.com/storage/docs/uploading-objects#storage-upload-object-java
3. Google Spreadsheets - https://medium.com/game-of-data/play-with-google-spreadsheets-with-python-301dd4ee36eb
4. Stepper Motor - https://joy-it.net/files/files/Produkte/SBC-Moto1/SBC-Moto1-Manual.pdf
Contact
Rahul Shanbhag: rns2166@columbia.edu
Prathamesh Sahasrabudhe: ps3320@columbia.edu
Sakshi Gulgulia: sag2267@columbia.edu
Columbia University Department of Electrical Engineering
Instructor: Professsor Xiaofan (Fred) Jiang