The IoT-Based Smart Tablet Dispenser is an innovative healthcare solution using Raspberry Pi Zero 2 W, servo motors, and Firebase to automate medication dispensing. It ensures timely intake, inventory tracking, and real-time alerts via a mobile app.
- Dispense tablets automatically using servo motors.
- Store & sync data with Firebase Realtime Database.
- Notify users via mobile app and buzzer/speaker.
- Work independently using a Li-Po battery.
- Improve medication adherence (especially for elderly).
- Allow remote monitoring for caregivers.
- Enable future enhancements (e.g., AI, sensors).
| Component | Purpose |
|---|---|
| Raspberry Pi Zero 2 W | Main controller (Wi-Fi + GPIO) |
| 2Γ Servo Motors | Dispense tablets from compartments |
| Speaker/Buzzer | Audio alerts |
| Li-Po Battery | Portable power supply |
| Bluetooth Module | Optional local communication |
- Python 3
- Libraries:
requests,time,json,threading
- Libraries:
- Firebase Realtime Database
- Flutter App (Android/iOS)
- MQTT (optional for real-time messaging)
- Schedule Setup:
- User or caregiver sets medication time and frequency via the mobile app.
- Firebase Sync:
- Data is pushed to Firebase in real-time.
- Raspberry Pi Actions:
- Fetches schedule from Firebase.
- Compares current time.
- Dispenses tablet using servo motor.
- Triggers buzzer/speaker.
- Updates database with success/failure and inventory count.
- Mobile App Alerts:
- User receives notification on dosage, missed doses, or low stock.
- Set & manage schedules.
- View dosage history.
- Receive real-time alerts (e.g., "Tablet Dispensed", "Inventory Low").
- Update tablet stock remotely.
sudo apt update
sudo apt install python3-pip
pip3 install requests firebase-admin
OT
