This is an old revision of the document!


Baby Monitor System

  • Author: Catalin Lucian Patrascu
  • Email: catalinptr3@gmail.com
  • Master: SRIC

Introduction

The baby monitoring system provides a way for parents to track the baby's sleeping environment by tracking the light levels, the sound and the temperature. When a certain threshold is reached the system alerts the parents by email. The system also stores the sensor data and generates weekly reports for the parents.

Architecture

Hardware

  • ESP-WROVER-32 board
  • Analog sound sensor module
  • DHT11 temperature and humidity sensor
  • Cables

View

Software

Code Snippets

2 pins are used for the 2 sensors: 4 and 34

#define DHTPIN 4
#define DHTTYPE DHT11
#define SOUND_ANALOG_PIN 34

Sensor reading and writing

void sendSensorData() {
  float temp = dht.readTemperature();
  float hum = dht.readHumidity();
  int soundLevel = analogRead(SOUND_ANALOG_PIN);  

  if (isnan(temp) || isnan(hum)) {
    Serial.println("Failed to read from DHT sensor");
    return;
  }

  Serial.printf("Temp: %.1f °C | Humidity: %.1f %% | Sound: %d\n", temp, hum, soundLevel);

  Blynk.virtualWrite(V1, temp);
  Blynk.virtualWrite(V2, hum);
  Blynk.virtualWrite(V3, soundLevel);

Event generation

  if (temp > 21) {
    Blynk.logEvent("high_temperature", "Temperature too high!");
    Serial.println("Temp big enough");
  }
  if (hum < 30) {
    Blynk.logEvent("low_humidity", " Humidity too low!");
  }
  if (soundLevel > 40) {
    Blynk.logEvent("high_noise", "High noise level detected!");
  }
}

App

References

iothings/proiecte/2025sric/babymonitorsystem.1748256799.txt.gz · Last modified: 2025/05/26 13:53 by catalin.patrascu99
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0