Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP32-Based Battery-Powered Health Monitoring System with Wi-Fi Connectivity

View and Edit Project In Cirkit DesignerImage of ESP32-Based Battery-Powered Health Monitoring System with Wi-Fi Connectivity

Circuit Documentation

Summary

This circuit is designed to monitor temperature and pulse rate using an ESP32 microcontroller. The temperature is measured using a DS18B20 sensor, and the pulse rate is measured using a pulse sensor. The data is then sent to a Blynk application for remote monitoring. The circuit is powered by a 3.7V LiPo battery, which is regulated to 3.3V using an MP1584EN power regulator board.

Component List

  1. ESP32

    • Description: A powerful microcontroller with WiFi and Bluetooth capabilities.
    • Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, VIN, 3V3, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23, BOOT
  2. Pulse Sensor

    • Description: A sensor used to measure pulse rate.
    • Pins: gnd, vcc, ao
  3. DS18B20

    • Description: A digital temperature sensor.
    • Pins: signal, GND, vcc
  4. 3.7V LiPo Battery

    • Description: A rechargeable lithium polymer battery.
    • Pins: +Ve, GND
  5. MP1584EN Power Regulator Board

    • Description: A power regulator board used to step down voltage.
    • Pins: IN -, IN +, OUT +, OUT -

Wiring Details

ESP32

Pulse Sensor

DS18B20

3.7V LiPo Battery

MP1584EN Power Regulator Board

Code Documentation

Sketch Code (sketch.ino)

#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include <OneWire.h>
#include <DallasTemperature.h>

// Blynk Auth Token
char auth[] = "YourAuthToken";

// Your WiFi credentials.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

// DS18B20 Temperature Sensor
#define ONE_WIRE_BUS 15 // DS18B20 signal pin
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

// Pulse Sensor
#define PULSE_PIN 34 // Pulse sensor analog output pin

BlynkTimer timer;

void sendSensorData()
{
  // Request temperature from DS18B20
  sensors.requestTemperatures();
  float temperature = sensors.getTempCByIndex(0);

  // Read pulse value from Pulse Sensor
  int pulseValue = analogRead(PULSE_PIN);

  // Send data to Blynk
  Blynk.virtualWrite(V1, temperature); // Send temperature to Blynk app
  Blynk.virtualWrite(V2, pulseValue);  // Send pulse value to Blynk app

  // Debug prints
  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.print(" °C, Pulse: ");
  Serial.println(pulseValue);
}

void setup()
{
  // Debug console
  Serial.begin(115200);

  // Initialize Blynk
  Blynk.begin(auth, ssid, pass);

  // Initialize DS18B20 sensor
  sensors.begin();

  // Setup a function to be called every second
  timer.setInterval(1000L, sendSensorData);
}

void loop()
{
  // Run Blynk
  Blynk.run();

  // Run timer
  timer.run();
}

This code initializes the ESP32 microcontroller, connects to a WiFi network, and sets up the DS18B20 temperature sensor and the pulse sensor. It reads the temperature and pulse values every second and sends the data to the Blynk application for remote monitoring. The data is also printed to the serial console for debugging purposes.