Project Overview
Smart Medibox is an IoT-enabled intelligent medicine dispenser developed as part of the Embedded Systems module.
The system helps patients maintain their medication schedules with automated reminders, environmental monitoring,
and real-time dashboard visualization through Node-RED.
Built on the ESP32 microcontroller platform and simulated using Wokwi, this project demonstrates the integration
of embedded systems, IoT protocols, sensor networks, and user interface design for healthcare applications.
Key Features
Scheduled Reminders
Configurable medication alarms with visual and audio notifications at prescribed times
Environmental Monitoring
Temperature and humidity tracking to ensure optimal medicine storage conditions
Node-RED Dashboard
Real-time visualization of sensor data, medication schedule, and system status
IoT Connectivity
WiFi-based remote monitoring and control through MQTT protocol
Wokwi Simulation
Complete virtual hardware simulation for testing and demonstration
Alert System
Multi-level alerts for missed doses, environmental warnings, and system status
System Architecture & Wokwi Simulation
The Smart Medibox system was designed and simulated using Wokwi, an online electronics simulator that supports ESP32 and various sensors/actuators.
Wokwi Simulation Setup
Complete virtual circuit showing ESP32 and all peripheral components with interactive simulation capabilities.
Hardware Components
Details to be added: ESP32 specifications, sensors used, actuators, display modules
Core Components
- Microcontroller: ESP32 (WiFi + Bluetooth capabilities)
- Sensors: To be specified (DHT22, LDR, etc.)
- Actuators: To be specified (buzzer, LEDs, servo motor)
- Display: To be specified (OLED/LCD display)
- Input Devices: To be specified (buttons, keypad)
Software Implementation
Firmware Development
Details to be added: Programming approach, libraries used, code structure
- Development Environment: Arduino IDE / PlatformIO
- Programming Language: C/C++ (Arduino framework)
- WiFi Connectivity: ESP32 WiFi library
- MQTT Communication: PubSubClient library
- Time Management: NTP time synchronization
- Sensor Libraries: To be specified
Node-RED Dashboard
The Node-RED dashboard provides a visual interface for monitoring and controlling the Smart Medibox system in real-time.
Node-RED Dashboard Interface
Real-time monitoring dashboard showing sensor data visualization and system control interface.
Medication Scheduling System
Details to be added: Alarm configuration, schedule storage, reminder logic
- Time-based Alarms: RTC or NTP-based scheduling
- Multiple Slots: Support for multiple daily medication times
- Snooze Function: Temporary alarm postponement
- Missed Dose Tracking: Alert system for skipped medications
Environmental Monitoring
Details to be added: Sensor specifications, threshold values, alert conditions
- Temperature Monitoring: Continuous temperature logging with alerts for unsafe conditions
- Humidity Tracking: Moisture level monitoring to prevent medicine degradation
- Light Detection: If applicable - ambient light monitoring
- Data Logging: Historical data storage for trend analysis
Wokwi Simulation
The entire project was developed and tested using Wokwi, an online electronics simulator that supports ESP32
and various sensors/actuators. This allowed for rapid prototyping and debugging without physical hardware.
Wokwi Project Link:
To be added by user
Simulation Features
- Complete virtual circuit with ESP32 and all peripherals
- Real-time firmware debugging and serial monitor
- Virtual WiFi connectivity for MQTT testing
- Interactive component testing (buttons, sensors, displays)
- Logic analyzer for signal debugging
IoT Integration
MQTT Communication
Details to be added: MQTT broker, topics, message format
- MQTT Broker: To be specified (HiveMQ, Mosquitto, etc.)
- Topics: To be specified (medibox/sensor, medibox/alarm, etc.)
- QoS Level: Quality of Service configuration
- Data Format: JSON payloads for structured data
Node-RED Flow
Details to be added: Flow structure, nodes used, data processing
- MQTT input nodes for sensor data reception
- Function nodes for data processing and logic
- Dashboard nodes for visualization (gauges, charts, buttons)
- Notification nodes for alerts
Embedded Systems Concepts Applied
- Real-Time Operating System (RTOS): FreeRTOS task management on ESP32
- Interrupt Handling: Button inputs and timer interrupts for alarms
- Peripheral Interfacing: I2C/SPI communication with sensors and displays
- Power Management: Sleep modes and power optimization strategies
- Memory Management: Efficient use of SRAM and flash memory
- State Machines: System state management for different operational modes
- Error Handling: Robust exception handling and recovery mechanisms
Key Achievements
- Successfully developed a fully functional IoT healthcare device in simulation
- Implemented reliable medication scheduling with multiple daily alarms
- Created an intuitive Node-RED dashboard for remote monitoring
- Achieved stable WiFi connectivity and MQTT communication
- Demonstrated practical application of embedded systems concepts
- Additional achievements to be added by user
Challenges & Solutions
Details to be added by user: Technical challenges faced and how they were resolved
- Challenge: Example: WiFi connectivity issues in Wokwi
- Solution: Example: Implemented connection retry logic with exponential backoff
Key Learnings
- ESP32 Platform: Deep understanding of ESP32 capabilities and limitations
- IoT Protocols: MQTT publish-subscribe pattern and QoS levels
- Sensor Integration: Calibration and data filtering techniques
- Node-RED Development: Visual programming and dashboard creation
- Healthcare IoT: Design considerations for medical device applications
- Simulation Tools: Virtual prototyping and testing methodologies
- Additional learnings to be added by user
Technologies Used
ESP32
Wokwi
Node-RED
MQTT
Arduino C/C++
WiFi
IoT
Embedded Systems
FreeRTOS
Future Enhancements
- Mobile App: Dedicated smartphone application for caregivers
- Cloud Integration: Database storage for long-term data analytics
- AI Predictions: Machine learning for medication adherence patterns
- Voice Reminders: Audio announcements for medication names
- Pill Counting: Automated inventory tracking with weight sensors
- Multi-User Support: Multiple patient profiles on single device
- Physical Prototype: PCB design and 3D-printed enclosure
- Additional ideas to be added by user
Project Links
- Wokwi Simulation: Link to be added by user
- GitHub Repository: Link to be added if available
- Video Demo: Link to be added if available
Content Pending
This page has been structured with placeholders for detailed content. Please provide:
- Wokwi project link
- 2 images: Wokwi simulation setup and Node-RED dashboard presentation
- Detailed descriptions for system architecture, hardware components, and software implementation
- Medication scheduling algorithm details
- Environmental monitoring thresholds and sensor specifications
- MQTT topic structure and Node-RED flow details
- Challenges faced and solutions implemented
- Any additional achievements or learnings