Built to order

ESP32 Baby Cradle with Cry Sensing Auto Swing and Lullaby Playback

This project builds an ESP32 baby cradle that listens for a baby's cry with a MAX9814 microphone module, then automatically swings the cradle with an MG996R servo and plays a lullaby through a DFPlayer Mini while sending an SMS alert to the parent through a SIM800L GSM module. A DHT11 sensor tracks room temperature and humidity for the parent app. Suitable for B.E./B.Tech final-year projects in Electronics, IoT and Embedded Systems.

Chat on WhatsApp — get a quotation

IoT & Embedded ESP32Arduino IDESIM800L GSM moduleDHT11 temperature · humidity sensorMG996R servo motorDFPlayer Mini MP3 moduleMAX9814 microphone amplifier moduleHTML CSS JavaScript parent appHybrid
ESP32 Baby Cradle with Cry Sensing Auto Swing and Lullaby Playback — project thumbnail preview
More project photos (2)

The problem

Parents cannot watch a sleeping baby every minute, and a baby who wakes crying needs a response within seconds — yet the parent may be in another room, asleep, or away from the house. The ESP32 Baby Cradle with Cry Sensing Auto Swing and Lullaby Playback closes that gap by listening and reacting on its own: a MAX9814 microphone module feeds sound levels to an ESP32, which compares them with a set threshold, then starts a gentle servo-driven swing, plays a lullaby through a DFPlayer Mini, and sends an SMS alert to the parent through a SIM800L GSM module. A DHT11 sensor adds room temperature and humidity to the parent app, so the parent can check whether the room itself is uncomfortable. The build is honest about its role: it is an academic prototype that demonstrates sound sensing, threshold logic, servo control, GSM messaging and app monitoring, and it is not a substitute for parental supervision or certified baby-care equipment.

SYSTEM FLOW

6 components 5 connections

Live flow
Drag to explore
100%
sensorMAX9814 Microphone

Listens to room sound and measures the level in decibels.

Follow the working sequence

How it works

Sound is the input, and a calm baby with an informed parent is the output. The MAX9814 microphone module converts room sound into an electrical signal with automatic gain control, and the ESP32 samples that signal continuously, turning it into a decibel level. When the level stays above the 65 dB threshold for a short confirmation window, the ESP32 treats it as crying and acts on three channels at once: it drives the MG996R servo with a PWM signal so the cradle rocks gently, it tells the DFPlayer Mini to play the selected lullaby from its microSD card, and it instructs the SIM800L GSM module to text the parent. Meanwhile the DHT11 reports room temperature and humidity every few minutes, and the parent app shows live status and lets the parent change swing speed, timer and lullaby. The swing stops when the timer ends or when the room has stayed quiet long enough.

  1. The MAX9814 microphone module listens continuously and the ESP32 samples the sound level several times per second.
  2. The ESP32 compares the level with the 65 dB cry threshold (configurable); only sound that stays above it for a short confirmation window counts as crying, so a single clap or a door closing does not trigger the cradle.
  3. On a confirmed cry, the ESP32 drives the MG996R servo with a PWM signal, rocking the cradle through its linkage arm at the selected speed — Gentle, Medium or Brisk.
  4. The DFPlayer Mini plays the selected lullaby from the microSD card through the 3 W speaker at the set volume.
  5. The SIM800L GSM module sends an SMS alert to the parent's phone, and the parent app updates with the cry event, swing state and alert time.
  6. The DHT11 measures room temperature and humidity every 5 minutes (design target) and the app displays both; the swing stops automatically when the timer ends or when the sound level stays below the threshold for a set quiet period.

Tech stack:

  • ESP32 DevKit
  • Arduino IDE · ESP32 core
  • MAX9814 microphone amplifier module
  • MG996R servo motor
  • DFPlayer Mini · 3 W speaker
  • SIM800L GSM module
  • DHT11 temperature · humidity sensor
  • Parent app dashboard (HTML · CSS · JavaScript)
Parameter Value
Controller ESP32 DevKit, dual-core 240 MHz (datasheet value)
Sound sensing MAX9814 microphone amplifier module with automatic gain control
Cry threshold 65 dB (configurable, design target)
Swing actuator MG996R servo, 9.4 kg·cm stall torque at 4.8 V (datasheet value)
Swing speed 3 levels: Gentle · Medium · Brisk (configurable)
Swing timer 15 · 30 · 45 min auto-stop (configurable)
Lullaby playback DFPlayer Mini + 3 W speaker, 4 tracks on microSD card
Room sensing DHT11, ±2°C temperature and ±5% RH accuracy (datasheet values)
Alerts SIM800L GSM module, SMS to 1 parent number (configurable)
Power supply 12 V / 5 V DC adapter; SIM800L needs 3.4–4.4 V at up to 2 A peak (datasheet value)
App Parent app dashboard over Wi-Fi
Cradle Wooden rocking cradle, approximately 60 × 40 cm (design target)

Project features

The cradle's four capabilities work as one chain: cry sensing, a servo swing that soothes, lullaby playback that calms, and GSM alerts that reach the parent anywhere. A MAX9814 microphone module with automatic gain control listens for crying and hands sound levels to the ESP32, which applies a configurable threshold so ordinary room noise does not trigger it. When crying is confirmed, an MG996R servo rocks the cradle at one of three speeds for a timed period, while a DFPlayer Mini plays one of four stored lullabies through a small speaker. A SIM800L GSM module then sends an SMS to the parent's phone, and the parent app updates live with cry status, swing state, room climate from the DHT11, and a history of every alert. Builder note: the microphone sits on the cradle rail near the head end, away from the servo, because servo gear noise kept tripping the cry threshold when the microphone sat beside the motor.

  • [Cry sensing with auto response] The MAX9814 microphone module measures room sound continuously, and when the level stays above the configurable 65 dB threshold for a short confirmation window, the ESP32 treats it as crying and starts the soothing response on its own.
  • [Servo auto swing with speed and timer] An MG996R servo rocks the cradle through a metal linkage arm at three speeds — Gentle, Medium or Brisk — and stops automatically after a 15, 30 or 45 minute timer, or when the room has stayed quiet.
  • [Lullaby playback] A DFPlayer Mini plays one of four stored lullabies from a microSD card through a 3 W speaker, with volume control from the parent app, so the baby hears music without a phone left beside the cradle.
  • [GSM SMS alert to parents] A SIM800L GSM module sends an SMS to the parent's phone the moment crying is confirmed, so the alert arrives even when the parent is away from home or the home Wi-Fi is down.
  • [Room climate display] A DHT11 sensor measures room temperature and humidity every 5 minutes (design target) and the parent app shows both readings, so the parent can tell whether the room is too warm or too damp.
  • [Parent app monitoring and alerts] The parent app shows live cry status, swing state, room climate and a timestamped history of every cry event and SMS sent, and lets the parent change swing speed, timer, lullaby and volume.
  • [Manual soothe control] The parent can start the swing and lullaby from the app at any time without waiting for a cry, useful for settling the baby before sleep or testing the mechanism during a demonstration.

What is included

  • Working wooden rocking cradle prototype with ESP32, MAX9814 microphone module, MG996R servo, DFPlayer Mini, DHT11 and SIM800L wired and labelled
  • Firmware source code (Arduino IDE) with configurable cry threshold, swing speeds and timers
  • Parent app dashboard with live cry status, swing control, lullaby selection, climate display and alert history
  • 4 lullaby audio tracks on microSD card
  • Circuit diagram, wiring list and component list
  • Project abstract PDF and full project report
  • Demonstration guidance and viva Q&A notes

Limitations & prerequisites

  • Academic prototype, not certified baby-care equipment; never a substitute for parental supervision, and never left running with a real baby unsupervised.
  • Cry detection is threshold-based sound-level sensing, not cry classification — loud household noise above the 65 dB threshold can trigger a false response.
  • DHT11 accuracy is ±2°C and ±5% RH (datasheet values), so its readings indicate room comfort only, not precise climate measurement.
  • The MG996R swing is gentle rocking of a light prototype cradle; swing strength depends on cradle weight and linkage geometry.
  • GSM SMS needs a valid SIM with balance and network coverage; no SMS is sent without signal.
  • Swing and lullaby run only while mains power is connected; there is no battery backup in the base build.
  • App monitoring needs Wi-Fi; SMS alerts keep working without Wi-Fi but need GSM coverage.

Frequently Asked Questions

Is this project suitable for a final-year project?

Yes. It fits final-year programmes in Electronics, E&TC, Electrical and IoT, because it combines embedded sensing, threshold-based decision logic, servo actuation, GSM communication and a mobile monitoring app in one working prototype, and every subsystem can be demonstrated and questioned separately in the viva. The report documents the sound-threshold method, the servo linkage, the SMS flow and the app, so the team can explain the full chain from microphone to parent's phone.

How does the cradle know the baby is crying?

It does not recognise a cry the way a person does. The MAX9814 microphone measures room sound level, and the ESP32 treats sound that stays above the 65 dB threshold for a short confirmation window as crying, which filters out brief noises such as a clap or a door closing. The threshold is configurable, so the team can tune it for a quiet room or a noisier home, and the demonstration triggers the response with a recorded cry or a loud sound.

Can this cradle be used with a real baby?

No. This is an academic prototype built for demonstration and evaluation, not certified baby-care equipment, and it must never be left running with a real baby unsupervised because it has no safety certification, redundancy or testing for infant use at all. Demonstrations use a doll or a weighted model in the cradle, and no real baby is placed in it during testing or exhibition. The servo swing, sound threshold and SMS alert are student-grade systems without the safety certification, redundancy or testing that real infant products require.

Does it work without Wi-Fi?

Yes, partly: cry sensing, auto swing, lullaby playback and the GSM SMS alert all run locally on the ESP32 and SIM800L with no Wi-Fi at all, and only the live app dashboard needs Wi-Fi. The app reads status from the ESP32 over the local network. If the home Wi-Fi drops, the cradle keeps soothing and the parent still gets the SMS; the app simply shows the last known status until the connection returns.

What power supply does it need?

A 12 V / 5 V DC adapter powers the build, with the ESP32 and DFPlayer Mini running from the 5 V rail and the MG996R servo from its own supply line. The SIM800L GSM module needs a 3.4–4.4 V supply that can deliver up to 2 A peak current (datasheet value), so it is fed through a dedicated buck converter rather than the ESP32's regulator. There is no battery backup in the base build, so a power cut stops the swing, the lullaby and the app, and adding a battery pack is listed as future scope.

Can the swing speed, timer and lullaby be changed?

Yes. The parent app offers three swing speeds — Gentle, Medium and Brisk — a 15, 30 or 45 minute auto-stop timer, four stored lullabies and a volume control, and the cry threshold itself is adjustable in the firmware for quiet or noisy rooms. New lullabies can be added by copying MP3 files onto the DFPlayer Mini's microSD card, and the servo linkage can be re-tuned for a different cradle size.

Components & software requirements
  • ESP32 DevKit
  • Arduino IDE · ESP32 core
  • MAX9814 microphone amplifier module
  • MG996R servo motor
  • DFPlayer Mini · 3 W speaker
  • SIM800L GSM module
  • DHT11 temperature · humidity sensor
  • Parent app dashboard (HTML · CSS · JavaScript)
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Get a quotation