Objective and Design Philosophy

The goal of this device is to develop an easy way to dispense medication to patients that might struggle with memory or motor function. The system is designed to be easy to use and access for as many client profiles as possible.

Core Components

The system is built around the following hardware and software elements:

  • Raspberry Pi Pico W: Communicates with motor driver to spin spindle
  • 28BYJ-48 Stepper Motor: Turns the Pill Box Spindle a set number of degrees
  • ULN2003 Motor Driver: Acts as a bridge between the Raspberry Pi Pico W and the Stepper Motor
  • AccelStepper Library for Arduino: Helps code the Pico to communicate with the motor driver
  • Wi-Fi & MQTT: The Pico W uses Wi-Fi to connect to the Smart Hub (Home Assistant) and publishes messages via MQTT.
  • Home Assistant: Open-source smart home hub that receives MQTT messages.

Implementation Strategy:

The main method of dispensing pills is the premade stepper motor and motor driver kit. The driver is able to be directly hooked into the Raspberry Pi Pico W GPIO pins. The Raspberry Pi Pico W GPIO pins are then controlled using code based on the PicoW_HomeAssistant_Starter project.

Engineering Challenges and Solutions

  • The pills would initially fall into the tray with too much velocity and go flying out the side. We had to add a barrier to the tray.

Performance:

The device is able to dispense pills when remotely prompted. It can either be commanded to immediately dispense from the Smart Mobile Device, Kick Buttons, and Remote Support Station. It can also be scheduled to dispense pills at a given time from the Remote Support Station. When dispensed, pills land in the tray to be consumed. The spindle is able to be easily removed for cleaning of the device.