Smart Pill Dispenser

About the project

Dispenses the tablet for elder people with Voice control (Alexa Skills)

Items used in this project

Hardware components

Cy8ckit-062-wifi-bt Psoc 6 Pioneer Kit Cy8ckit-062-wifi-bt Psoc 6 Pioneer Kit x 1
LEGO Mindstorms Ev3 LEGO Mindstorms Ev3 Medium Servo Motor and Parts x 1
Micro Servo Micro Servo x 1
H-BRIDGE MOTOR DRIVER H-BRIDGE MOTOR DRIVER L293D or TB6612 x 1
General Purpose PCB General Purpose PCB x 1

Software apps and online services

Amazon Eco Amazon Eco
AWS Services AWS Services
Twilio Services Twilio Services

Hand tools and fabrication machines

Hot Glue Gun Hot Glue Gun x 1
Soldering Station Soldering Station x 1

Story

Introduction

One day we will all become older , we struggle to walk , we struggle to grab , we struggle to remember yes it will happen one day . In today most of elders runs their daily life with tablets/pills. I had seen my grand parents who struggle to open and take tablets. In sometime they took wrong one. These things made me to design "Smart Pill Dispenser". There are plenty of pill dispenser available in market but nothing is standardized. My idea is to make a well structured standard device  something like IEEE compiled. This project is seed for the future. Earlier i was mentoring the student and made an 1st attempt  of this pill dispenser. This time i came with the LEGO based design.

Blocks

Hardware

Hardware I have received the kit  PSoC6 Wifi-BT Pioneer Kit

Unfortunately the kit went bad after upgrading the KitProg3 firmware. Then i have taken my old kits started using it. For driving DC motors and servo i used PWM and H - Bridge driver so i hand-soldered on the small general purpose pcb board. The entire design is build with LEGO mindstorms blocks. I used the medium servo motor to drive the dispenser plate. The plate is made up of Balsa wood sheet. Attached with lego parts using glue. The PSoC6 and PCB's are attached to the lego blocks. Mini Servo motor is used to trigger the tablet.

Software

Implemented the MQTT Client and PWM on the PSoC6. To drive SERVO i have used two different PWM outputs. The TFT Display is drived using emWin Graphics driver. This kit has limited memory with 1MB so my application does not works after integration. Then i removed the Graphic animation to reduce the memory size. Finally taken the video with and without animation. AWS lambda service is used for publishing MQTT messages and sends SMS with twilio apis. Alexa skills is developed to give voice comand to trigger the lambda events.

How it works

The tablets are loaded in the slots , each slots has different colors and its defined in the AWS cloud with timing information. The time comes the amazon echo remind the user to take tablets. Asking the alexa simply by "TABLET" will dispense the tablet from corresponding slot. The timing displays and counts are displayed on the TFT screen. After taking tablets the notification sends to user2 (family member).

The working demo video is here

Schematics, diagrams and documents

Schematic

Code

Main Code

Full Code

Download

Credits

Photo of ashokr

ashokr

Hello! I’m Ashok. I’m currently working as software engineer. passionate about doing Hobbies Projects and Animations works.

   

Leave your feedback...