Skip to content

DadeJahnavi/Smart-Medication-Reminder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

💊 Smart Medication Reminder System (ESP32 + IoT)

An embedded IoT system that combines real-time scheduling, event-driven sensing, and automated dispensing to improve medication adherence.


🎯 Problem Statement

Medication adherence failures are common due to:

  • Missed reminders
  • Manual tracking inefficiency
  • Lack of real-time feedback

This system provides a low-cost, automated solution that handles:

  • Scheduling
  • Alerting
  • Dispensing
  • Logging

🚀 System Overview

The system integrates multiple subsystems:

  • ESP32 → control + WiFi interface
  • RTC (DS3231) → precise time scheduling
  • Servo Motor → pill dispensing mechanism
  • IR Sensor → user interaction detection
  • Keypad → runtime configuration
  • LCD Display → real-time feedback
  • Buzzer → alert system
  • Web Interface → monitoring + logging

🧠 System Architecture

User Input (Keypad / Web UI)
            ↓
        ESP32 Controller
   ┌────────┼────────┐
   ↓        ↓        ↓
 RTC     IR Sensor   Web Server (WiFi AP)
   ↓        ↓
Scheduler   Event Trigger
       ↓
   Control Logic
       ↓
 Servo Actuation → Tablet Dispense
       ↓
 LCD + Buzzer Feedback

⚙️ Core System Logic

⏰ Time-Triggered Execution

  • RTC continuously tracks real-time
  • At scheduled time → automatic dispensing
  • Daily reset of medication state

👋 Event-Driven Interaction

  • IR sensor detects user presence
  • Implements cooldown to prevent repeated triggers
  • Enables manual override dispensing

🎛️ Runtime Configuration

  • Keypad allows dynamic time setting
  • No need to reprogram ESP32

🌐 Local Web Interface

  • ESP32 hosts WiFi Access Point
  • Browser-based logging interface
  • No internet dependency

🔄 System Workflow

  1. User sets schedule via keypad

  2. RTC monitors real-time clock

  3. At scheduled time:

    • Buzzer alert triggered
    • LCD displays reminder
    • Servo dispenses tablet
  4. IR sensor detects interaction:

    • Allows manual dispensing
  5. System logs and updates status


▶️ How to Run

  1. Upload firmware (med_tracker.ino) to ESP32

  2. Connect hardware components

  3. Power system (external supply recommended)

  4. Connect to WiFi:

    SSID: MedicationTracker
    Password: 123456789
    
  5. Open browser → ESP32 IP (shown in serial monitor)

  6. Use keypad + web UI


⚙️ Hardware Components

Component Qty Cost (INR)
ESP32 1 ₹400
RTC DS3231 1 ₹120
LCD (I2C) 1 ₹180
IR Sensor 1 ₹60
Servo Motor 1 ₹150
Keypad (4x4) 1 ₹100
Buzzer 1 ₹20
Misc - ₹100

Total: ₹1200–₹1400


🔑 Key Features

  • Hybrid time-triggered + event-driven system
  • Embedded real-time scheduling
  • Local WiFi interface (no internet required)
  • Automated dispensing mechanism
  • Runtime configurable (no reflashing needed)
  • Multi-modal feedback (LCD + buzzer)

🧪 Results

  • Accurate time-based dispensing achieved
  • Reliable IR-based triggering with cooldown logic
  • Stable ESP32 web server hosting
  • Successful integration of hardware + UI

⚠️ Limitations

  • No cloud sync (local-only system)
  • No user authentication
  • Open-loop system (no confirmation of pill intake)

🔮 Future Improvements

  • Cloud integration (Firebase / MQTT)
  • Mobile notifications
  • Multi-user support
  • Intake verification (weight sensor / camera)
  • Data analytics dashboard

📌 Note

This project demonstrates embedded systems integration, real-time control, and IoT-based human interaction design, combining hardware and software into a complete working system.

About

ESP32-based smart medication reminder system with real-time scheduling, automated dispensing, and web-based logging interface.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors