This shows you the differences between two versions of the page.
iothings:proiecte:2025sric:babymonitorsystem [2025/05/26 13:13] catalin.patrascu99 [Hardware] |
iothings:proiecte:2025sric:babymonitorsystem [2025/05/26 17:06] (current) catalin.patrascu99 [App] |
||
---|---|---|---|
Line 9: | Line 9: | ||
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. | 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 ====== | ====== Architecture ====== | ||
- | {{ :iothings:proiecte:2025sric:baby-monitor.drawio.png |}} | + | {{ :iothings:proiecte:2025sric:baby-monitor-flow.drawio.png |}} |
====== Hardware ====== | ====== Hardware ====== | ||
* ESP-WROVER-32 board | * ESP-WROVER-32 board | ||
Line 16: | Line 16: | ||
* Cables | * Cables | ||
+ | |||
+ | === Setup === | ||
{{ :iothings:proiecte:2025sric:real-life-view-baby-monitor.png |}} | {{ :iothings:proiecte:2025sric:real-life-view-baby-monitor.png |}} | ||
+ | |||
+ | === Wiring scheme === | ||
+ | {{ :iothings:proiecte:2025sric:wiring-scheme.drawio.png |}} | ||
====== Software ====== | ====== Software ====== | ||
+ | * Arduino IDE | ||
+ | * Blynk cloud desktop and mobile | ||
=== Code Snippets === | === Code Snippets === | ||
+ | 2 pins are used for the 2 sensors: 4 and 34 | ||
+ | <code> | ||
+ | #define DHTPIN 4 | ||
+ | #define DHTTYPE DHT11 | ||
+ | #define SOUND_ANALOG_PIN 34 | ||
+ | |||
+ | </code> | ||
+ | |||
+ | Sensor reading and writing | ||
+ | <code> | ||
+ | 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); | ||
+ | </code> | ||
+ | |||
+ | Event generation | ||
+ | <code> | ||
+ | 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!"); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </code> | ||
====== App ====== | ====== App ====== | ||
+ | |||
+ | Blynk is a tool that lets you build and manage your own IoT projects easily. It was used to create custom dashboards on the desktop and mobile app. | ||
+ | |||
+ | With it I added gauges that I dragged onto the screen and use to control or check the devices from anywhere. Blynk connects everything over Wi-Fi, so you get real-time updates and control without needing to mess with complex setups. It was used to alsop send notifications over email and in-app | ||
+ | |||
+ | === Functionalities === | ||
+ | |||
+ | In this project, the ESP32 collects data from a DHT11 sensor to measure temperature and humidity, and from a sound sensor to check noise levels. It sends that data to the Blynk app, where you can see live values on your phone using gauges and other widgets. | ||
+ | |||
+ | You can also set up notifications — for example, get an email if the temperature gets too high or if there’s too much noise. Everything works over Wi-Fi, so you can monitor things remotely without being near the device. | ||
{{ :iothings:proiecte:2025sric:blynk-app1.png |}} | {{ :iothings:proiecte:2025sric:blynk-app1.png |}} | ||
+ | |||
+ | {{ :iothings:proiecte:2025sric:high-temp.png |}} | ||
+ | |||
+ | {{ :iothings:proiecte:2025sric:mail-notification.png |}} | ||
====== References ====== | ====== References ====== | ||
+ | |||
+ | DHT11 Sensor: | ||
+ | *https://www.mouser.com/datasheet/2/758/DHT11-Technical-Data-Sheet-Translated-Version-1143054.pdf?srsltid=AfmBOoqV_7f-O5_81wa86uw0G8xZHDAm9nsilDFuUwfnBUqEm2UTZy6k | ||
+ | *https://components101.com/sensors/dht11-temperature-sensor | ||
+ | Sound sensor: | ||
+ | *https://components101.com/modules/lm393-sound-detection-sensor-module | ||
+ | *https://energiazero.org/cartelle/arduino_sensori/sound_sensor_module.pdf | ||
+ | Drawio: https://app.diagrams.net/ | ||
+ | Blynk: https://docs.blynk.io/en/getting-started/what-do-i-need-to-blynk |