top of page
smart cradle banner.png

IoT Based Baby Monitoring System for Smart Cradle

IoT
OVERVIEW

This project aims to solve the challenge of monitoring babies for working parents by proposing an IoT-based baby monitoring system for a smart cradle. The smart cradle is equipped with a fan, a musical toy, and automatic swinging support. This system will be able to monitor baby's condition in terms of various parameters such as crying, moisture, and temperature and it will automatically perform appropriate actions when some parameters exceed their threshold values. Additionally, parents will be able to see live data captured by sensors and the state of various actuators through a user interface and they could control the fan, musical toy and the swinging of the cradle remotely from anywhere and anytime.

DURATION
PLATFORM
MY ROLE
TECHNOLOGIES USED

February 2021 - April 2021
(1 month - in a team of 2)

Desktop

IoT system designer

HTML, CSS, JavaScript,
TinkerCAD, Firebase

Problem Domain

Problem

To design a smart cradle which can allow remote monitoring of a baby

At present, the number of working mothers has been increasing quite rapidly. This raises a critical question of their baby care as both parents go to work and deal with household chores afterwards. Some parents might also want to accustom their baby to sleeping alone. Parents can not continuously monitor their baby in normal or abnormal situations. This project aims to solve this challenge by proposing an IoT based baby monitoring system for a smart cradle.

Architecture

Architecture

The control system is programmed onto the Arduino UNO (With ESP8266 wifi module). All the sensors and actuators  are connected to the Arduino UNO board through relays. Multiple sensors will be exploited to detect the baby's various conditions such as crying, moisture level (humidity) and temperature. Various values detected by these sensors such as noise level (dB), temperature (Celcius) and humidity (%) are being uploaded to the firebase real time database in real time.

​

ink.png
Following actions will be taken automatically using the data collected by various sensors :
  • If the temperature of the room exceeds 30° C or humidity level exceeds 70%, the fan will be turned on. Threshold values have been chosen based on what circumstances are adequate for the baby.
  • If noise level exceeds 90 dB, it will be counted as crying. As a result, the cradle will start swinging. Additionally, an alert will be shown on the interface and a mail will be sent to parents if the crying is detected.
These data are accessible to parents through an application interface. They will be able to see current values of temperature, humidity and noise level and the state of swing, fan and the musical toy. If they find any abnormal situation, they can control these actions through the app remotely from anywhere.

Implemented system architecture

For the implementation of the proposed system, we have generated random values of three parameters: temperature, noise pressure and humidity by using a random number generator javascript function given below.

ink (2).png
ink (2).png

These random values of all three parameters are being uploaded to the firebase realtime database periodically ( i.e. 5 seconds ) to make this virtual system work as close as possible to an actual control system with real sensors and actuators.

According to the algorithm,
  • If the value of noise pressure exceeds 90 dB, then swinging (toggle switch) value is set to “1” in the database indicating swinging has been started automatically.
  • If the value of temperature exceeds 30° C or humidity exceeds 70%, fan value is set to “1” in the database indicating fan has been switched on automatically.
These values are also shown to the user interface in real time, parameters through values and actuators through toggle switches. User interface is made using HTML, CSS and javascript.
Users can toggle switch of any actuators form the interface to turn them on if needed. The response will be then sent to firebase to set the respective actuator’s state ( 0 or 1).
ink (3).png

These values are also shown to the user interface in real time, parameters through values and actuators through toggle switches. User interface is made using HTML, CSS and javascript.

Circut Implementation

Circuit Implementation

ink (4).png
Parts used:
​
Electret Microphone Breakout board
  • Microphone and amplifier detects sound in the environment and returns values from 0 (no sound) to 1023 (maximal sound) - It works with regular ambient noises, silence vs. fall or knock, etc
​
AM2303 Humidity and Temperature Sensor
  • Simple I2C Digital Humidity and Temperature sensor, it has 2-5% humidity accuracy and 0.5C temperature accuracy.
 
Arduino Uno
  • It is a microcontroller board based on the ATmega328P (datasheet).
  • It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button.
 
Wifi Module
  • ESP8266 is a low-cost Wi-Fi board
  • The microcontroller communicates with the module using AT commands, either via Software Serial or Hardware Serial.
  • Returned Values: from 0 (completely dry) to 1023 (completely moist). (air/soil humidity - ambient conditions).
Results

Results

ink (6).png

The user interface shows values of different parameters and state of actuators through toggle switches in real time. It also shows a red alert if the crying is detected.

ink (5).png

A mail is also sent to the user if crying is detected. Javascript library called EmailJS has been used to send emails.

ink (7).png

Randomly generated values of different parameters such as temperature, humidity and noise pressure are uploaded to firebase in real time. Also, if the user changes the state of any actuator through toggle switch, the state value of that actuator also gets uploaded to firebase in real-time.

Reflection

What did I learn?

I gained a basic understanding of the concept of IoT - Internet of Things and how it can be used to automate tasks and reduce human effort. I learnt about programming the arduino board and making a circuit with sensors and actuators.

What would have I done differently?

Due to covid, this course and project was conducted online. We used TinkerCAD for simulating the IoT circuit. Since my partner and I were in differently cities, we could not build the circuit physically, but I would like to actually use a mock cradle and build this whole system to gain a better understanding of how it all works.

I'm always looking for new and exciting opportunities. Let's connect for projects, chit-chat, or dog memes! :)

Parita.png
Parita Patel
  • LinkedIn
  • Instagram
bottom of page