Skip to content

Chathura-Jayasinghe/ESP32-Medibox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-Medibox

This repo includes the simulation of the Medibox using ESP32.

The ESP32 Medibox is a smart medicine box designed to help users effectively manage their medication schedules. Utilizing an ESP32 microcontroller, it integrates various sensors, actuators, and communication modules to offer a comprehensive medication management solution.

Overview

Built using the following tools and technologies:

VS Code C++ Node-RED Wokwi

Table of Contents

Circuit Diagram

You can view the complete circuit diagram and simulation on [Wokwi]https://wokwi.com/projects/391493988516700161).

image

Features

  • WiFi Connectivity: Enables remote monitoring and control via MQTT.
  • Temperature and Humidity Monitoring: Uses the DHT22 sensor to track environmental conditions.
  • Light Intensity Measurement: Detects ambient light levels with LDRs and adjusts the servo motor accordingly.
  • Servo Motor Control: Modulates the position of the shaded window based on light intensity.
  • Buzzer Notifications: Alerts users for scheduled medication times.
  • Button Interface: Allows user interaction for canceling alarms or confirming actions.
  • Customizable Settings: Adjusts the servo motor’s minimum angle and control factor through MQTT.

Components

  • ESP32: The central microcontroller for the system.
  • DHT22: Sensor for measuring temperature and humidity.
  • LDRs: Light-dependent resistors to measure light intensity.
  • Servo Motor: Controls the shaded window's position.
  • Buzzer: Emits audio notifications.
  • Buttons: Facilitates user interaction.

How It Works

The ESP32 Medibox assists with medication management through:

  1. Monitoring: Continuously tracks temperature, humidity, and light intensity.
  2. Notifications: Provides timely reminders via a buzzer for medication.
  3. Remote Control: Enables remote adjustment and monitoring via MQTT.

The system is adaptable, allowing users to customize parameters like the servo motor’s minimum angle and control factor.

Node-RED Flow

You can find the Node-RED flow for this project in the node-red-flow.json file. Import this file into your Node-RED setup to interact with the ESP32 Medibox through MQTT.

image

Running Node-RED

To set up Node-RED:

  1. Install Node-RED:

    • First, install Node.js.
    • Then, run this command to install Node-RED:
      npm install -g --unsafe-perm node-red
  2. Start Node-RED:

  3. Create and Deploy Flows:

    • Design and deploy flows in the Node-RED interface to interact with your ESP32.

Node-RED allows you to build interactive dashboards and control mechanisms for enhanced functionality.

MQTT Topics

This project utilizes the following MQTT topics:

  • MQTT-ON-OFF: Controls the buzzer (ON/OFF).
  • MQTT-SCH-ON: Manages buzzer notification schedules.
  • MQTT-TEMP: Receives temperature readings.
  • MQTT-LDR: Receives light intensity data.
  • MQTT-MIN-ANG: Sets the servo motor’s minimum angle.
  • MQTT-CTRL-FAC: Adjusts the servo motor’s control factor.
  • MQTT-DROP-DOWN: Chooses predefined settings for the servo motor.

Getting Started

To begin with the ESP32 Medibox:

  1. Clone the Repository:
    git clone https://github.com/Chathura-Jayasinghe/ESP32-Medibox

About

This repo includes the simulation of the Medibox using ESP32

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages