Use-Case
The patient has been prescribed a medication to be taken twice a day with the first an hour before the user actually wakes up and the second precisely at noon.
The Problem:
The awkward timing for the first dose requires significant preplanning to ensure the pills are within easy reach and can be swallowed with water. Planning is often overlooked and significant confusion results in locating the correct medication, finding a glass of water and swallowing it. Leaving an open glass of water by bedside can spill and ruin electronics or medications while leaving medication outside a container risks accidental ingestion by small children or pets. Often times the user snoozes alarm and misses dose. The 12:00PM dose is often missed if user is busy driving, working etc… He sometimes forgets if dosage was taken either leading to missed dose or accidentally taking more than was prescribed.
Solution
Leverage methods developed for home automation, wearable technology, quantified life, 3D printing and the "Internet of Things".
Pill Dispensing Lid
A special pill dispensing lid is designed to hold the pill in place before swallowing it with water. The lid is 3D printed and can fit on a standard Mason jar.
A cup holder is also specially designed to fit a ring of programmable, multicolor LEDs and printed before attaching the LEDs to an Arduino YUN.
When placed on its base, the water glass lights up with the color of the LED ring and can be dynamically controlled by the Arduino YUN.
Smart Alarm
A Pebble smartwatch uses an accelermoter to track sleep cycles by sensing patterns in body movements and calculates optimal wake up time using a companion Android app called "Sleep as Android". With an open API, the Android app then triggers a sophisticated wake up routine designed to ensure the early dosage is taken before the actual wake up alarm. A special app called "Tasker" allows the normal alarm routine to trigger a message via MQTT to a webserver interface called "NodeRED" running on a Raspberry Pi. A custom routine signals the Arduino YUN to blink the LED base in Red when the first alarm sequence has been triggered. As a result the user is woken up by the watch vibration and is immediately drawn to the brightly colored cup with medication dispensing lid. The pill can now be swallowed in a single movement. An NFC tag on the bottom of the cup can now be scanned to turn off the alarm sequence and simultaneously log that the dosage has been taken.
The next routine is triggered by the same NFC tag and triggers a gradual "sunrise alarm" through a system of "smart light bulbs" connected to a wifi base station by UDP commands. When the final wake up alarm triggers an hour later the master lights will have changed from the calming blue colors in night mode to a bright orange/yellow wake up mode.
Update-
The original configuration consisted of using an original Pebble Watch, Sleep as Android for Android and Pebble, Tasker w/ MQTTSender plugin, a Raspberry Pi hosting NodeRED w/ MQTT and an Arduino Yun w/Neopixel Ring. A new project configuration is currently in the works which simplifies the workflow considerably. Furthermore I have since updated the hardware for some of the original components.
The new configuration will utilize a Pebble Time watch, Sleep as Android for Android and Pebble, Tasker w/MQTTPublisher Plugin, a Raspberry Pi hosting HomeAssistant.io/MQTT, Adafruit.IO server, and Huzzah ESP8266 with Neopixel Ring.
Repo-
A dedicated repo has been set up with code for this project at https://github.com/Cribstone/MedAlarm. As of 11/17/15 it hosts the Arduino sketch for triggering the LED alarm via MQTT event and the XML for the Tasker profile which publishes an MQTT topic when triggered by the Sleep as Android Alarm. However, the XML is addressed to the original MQTT server which has since been updated. The Adafruit MQTT sketch is also in vanilla form and must be configured with new information. Necessary updates will be added to the repo very soon.
Next Steps-
The medication alert will be most effective when integrated into a comprehensive health management system which not only notifies the patient when to take their medication but also tracks daily usage and in the case of medications taken "as-needed" will alert the patient if their intake is too much to maintain supplies before a refill date. The sensitive nature of this data requires a rethinking of such applications in the context of "Personal Health Records" (PHRs)
Comments
Please log in or sign up to comment.