Auto baby cry detector using arduino
Auto baby cry detector using arduino
INTRODUCTION
CONTENTS
2024
CHAPTER 1 - INTRODUCTION
CHAPTER 2-BLOCK DIAGRAM
Block Diagram
Component
Used In Block Diagram
Block Diagram Description
CHAPTER 3 – Circuit Diagram
Circuit Diagram
CHAPTER 4- INTRODUCTION OF ATMEGA328P
Introduction
Pin Diagram
Features
CHAPTER 5 –HARDWARE DESCIPTION
Power Supply
Sound Sensor
LED
Relay Module
CHAPTER 6- PROGRAMMING
Algorithm
Flowchart
Program
CHAPTER 7– RESULT, CONCLUSION AND FUTURE SCOPE
Result
Conclusions
2024
BLOCK DIAGRAM:
1. Arduino (Atmega328p)
2. DC Power Supply.
3. Sound sensor
4. Relay module
5. Music player
6. Connecting wires
CIRCUIT DIAGRAM:-
2024
Pin Descriptions:-
1. Power USB:- Arduino board can be powered by using the USB cable from your
computer. All you need to do is connect the USB cable to the USB connection.
5. Arduino Reset:-You can reset your Arduino board, i.e., start your program from
the beginning. You can reset the UNO board in two ways. First, by using the reset
2024
button on the board. Second, you can connect an external reset button to the
Arduino pin labelled RESET.
6. Analog pins:-The Arduino UNO board has six analog input pins A0 through A5.
These pins can read the signal from an analog sensor like the humidity sensor or
temperature sensor and convert it into a digital value that can be read by the
microprocessor.
7. Digital I/O:-The Arduino UNO board has 14 digital I/O pins (15) (of which 6
provide PWM (Pulse Width Modulation) output. These pins can be configured to
work as input digital pins to read logic values (0 or 1) or as digital output pins to
drive different modules like LEDs, relays, etc. The pins labeled “~” can be used to
generate PWM.
FEATURES:-
6v to 20V
Digital input/output pins are 14
Analog i/p pins are 7
DC Current for each input/output pin is 40 mA
DC Current for 3.3V Pin is 50 mA
Flash Memory is 32 KB
SRAM is 2 KB
EEPROM is 1 KB
CLK Speed is 16 MHz
2024
Bridge rectifier:
A bridge rectifier can be made using four individual diodes, but it is also available in
special packages containing the four diodes required. It is called a full-wave Rectifier
because it uses the entire AC wave (both positive and negative sections).
1.4V is used up in the bridge rectifier because each diode uses 0.7V when conducting
and there are always two diodes conducting, as shown in the diagram below. Bridge
rectifiers are rated by the maximum current they can pass and then maximum reverse
voltage they can withstand (this must be at least three times the supply RMS voltage
so the rectifier can withstand the peak voltages
2024
Smoothing:
Voltage regulator:
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable
output voltages. They are also rated by the maximum current they can pass. Negative
voltage regulators are available, mainly for use in dual supplies. Most regulators
include some automatic protection from excessive current ('overload protection') and
overheating ('thermal protection'). Below is the circuit diagram of power supply
which gives output of 5V, as only that much is required for microcontroller. Its circuit
diagram are given below.
The +5 volt power supply is based on the commercial 7805 voltage regulator
IC. This IC contains all the circuitry needed to accept any input voltage from 9 to
12 volts and produce a steady +5 volt output, accurate to within 5% (0.25 volt).
2024
You can set a threshold value using a potentiometer so that when the amplitude of
the sound exceeds the threshold value, the module will output LOW otherwise
HIGH.
One object of this design is to provide a system for coin identification that does
not require close tolerances, and therefore cannot be so readily jammed as prior
systems.
LED:-
2024
ALGORITHM:
2024
1) Start
4) If baby is not crying then turn off relay to stop the music
5) End
6.3 PROGRAM:
2024
include<one.sheeld.h>
String account = "imtheparent2015";// The parent account on twitter
String Message0 ="Arduino Now is on Monitoring Mode , Stay tuned for any
updates";
String Message1 = "The baby is crying ,The Arduino is on SleepingMode right
now stay Tuned For any updates";// The Arduino message for the parent at the
Sleeping Mode
String Message2 = "The baby is awake ,The Arduino is on WakingMode right
now , and playing some songs";// The Arduino message for the parent at the
Waking Mode
String Message3 = "The baby is now asleep ,You Are Safe :D";// The Arduino
message for the parent at the Sleeping Mode
String Message4 ="The Baby is still crying ,Stay tuned for any updates";
int green=13;//Green LED (Checking LED)
int red=12;//Red LED (Alert LED)
int toy=10;//Toy relay pin
int cry=0;//Checking if the baby is crying,If cry ==10 so the baby is crying
int x=0;//For checking if the program passes through sleepingMode 1
int y=1;//For checking if the program passes through sleepingMode 2
int z=0;//For checking if the program passes through WakingMode
booleanmon=true;//For the monitoring mode to run it only one time
////////////////////////////////////////////
void setup()
{
pinMode(toy,OUTPUT);//Toy relay circuit
pinMode(green,OUTPUT);//Green for Monitoring Mode
pinMode(red,OUTPUT);//red for alert
OneSheeld.begin();//Begining of 1SHEELD
}
2024
////////////////////////////////////////////
bool Crying()//Responsible for getting the value of the Mic(Crying Sound)
{
//Getting the sound
if(Mic.getValue() >=80)// Sound of the crying baby (Measured by dBs)
return true; // True = Baby is crying
else
return false; //False = Baby is sleeping
}
///////////////////////////////////////////
void MonitoringMode()//send the message to confirm that arduino is working
{
if(mon==true)
{
Twitter.sendMessage(account,Message0);//sending message
mon=false;//to insure that the program doesn't run it again
}
}
///////////////////////////////////////////
void SleepingMode()//First function that the program passes by`if the baby is
crying
{
MusicPlayer.play();//Playing some quiet music for the baby
Twitter.sendMessage(account,Message1);// Sending a message on twitter for the
parents
delay(30000);//Delay for playing Quiet music for 5 Mins
MusicPlayer.pause(); //Pause the music to check whether the baby slept or not
x=1;//Confirm that the program passes thourght this function
y=0;//to avoid looping
2024
}
//////////////////////////////////////////
if((Crying())&&(x==1))//if baby is crying and the program passed through
sleepingMode 1
SleepingMode2();//Starts the SleepingMode2
else if((!Crying())&&(x==1))//if the baby isn't crying and the program passed
through sleepingMode 1
{
Twitter.sendMessage(account,Message3);// Send a message on twitter for the
parents \
cry=0;//Reset the value to the intial value
z=0;//Reset the value to the intial value
y=1;//Reset the value to the intial value
x=0;//Reset the value to the intial value
}
///////////////////////////////////////////
if(cry==10)//If the cry=10 means the baby is crying
{
digitalWrite(green,LOW);//Turn off the green LED
SleepingMode();//starts the SleepingMode 1
}
}
2024
7.2CONCLUSION:
cradle was capable of detecting the baby crying sound while ignoring
other sounds like clap, sneeze, fan, sudden sounds, environment sounds
sensor and turn on music player until baby doesn’t stop crying and it
will turn on music player. This product is mainly useful for working