Introduction:
Smart pill dispenser to make the life easy for the aging population. As people age it will become difficult to keep track of the prescribed medication and follow a schedule. Most senior citizens follow a daily routine of taking tablets at a schedule time slot, not following may result in unwanted drug reaction. This smart pill dispenser simplifies the process and make decision for the user based on the set schedule and loaded tablets.
Block Diagram:
How the Dispenser works?
The are many types dispenser available in market with timer based, this design is completely smart one with aws cloud connectivity. Skill set for the dispenser is defined in the alexa skill developer portal.
we have created 3 type of instants for demo.
1. TABLET
2. NEXT_SLOT
3. SCHEDULE
Alexa Skills setup:
These 3 intents invoke the lambda functions which is configured here, from the lambda function we check INTENTS and timer flag and publish the data through MQTT.
The messages are write into MQTT shadow file.
AWS Lambda Function:
IoT Thing for Hardware & Integration:
The Certificates required for the board is created from AWS IoT Thing (IoT Core). The Shadow file is created and it will have the status of servo and led's in json format.
PSOC 6 wifi board comes with TFT shield board, PSOC 6 is connected to internet via router and its subscribes the data from aws cloud via MQTT broker. The subscribed data is screened in psoc6 then its control the servo motor via PWM. And for demonstration we kept the setup is simple. We received the board before a week and due to covid situation couldn't setup the hardware well. we had to stick with single servo to showcase the output. And the blog written on cypress community was very useful for setting up the aws and skills.
PSOC wifi board side the MQTT example project is flashed into the board and used emwin library for graphics and displays. The code will be uploaded to github and link will be provided in this blog . Still we continue to work for full hardware design setup with 3d printed design.
The following things can be asked to Alexa,
Alexa, ask pill dispenser to get my schedule.
Alexa, ask pill dispenser to get my next time slot.
Future Enhancements:
- Multi-user mode
- Integration to E-ink paper
- Logging medical history on the cloud
- Offline mode with manual button interface
- Ask to doctor help and suggestion for tablet change
Working video: