Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
12 views

Auto baby cry detector using arduino

Gysufsxfwuxfuwxchyffychcgcgcch

Uploaded by

Md samee Jamadar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Auto baby cry detector using arduino

Gysufsxfwuxfuwxchyffychcgcgcch

Uploaded by

Md samee Jamadar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

2024

INTRODUCTION

Parents in the present world are busy in their professional


life, so they do not get sufficient time to take care of their
babies. it is inconvenient for parents to constantly watch over
their newborn baby while doing their work or chores. So we
have designed an simple system which helps parents in taking
care of baby. This system proposes a simple voice detection
system which can be applied practically for designing a device
with capability to detect a babys cry.The system is based on
Arduino microcontroller. Whenever the baby cries it is
detected by the controller with the help of Mic and in order to
that turns on the music and sleep mechanism which creates
soothing sound as well as dim lights which makes baby sleep
again gently. In this project a program is implemented to detect
an infant’s crying. It can detect baby’s cry while ignoring other
sounds like clap, sneeze, fan, sudden sounds, environment
sounds etc.

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:

BLOCK DIAGRAM DESCRIPTION:

In this block diagram, weshows how to work the project in a


simple method. In the project the main part is controller that is
Arduino board. we will connect different peripherals to the
Arduino. In this we connect Sound Sensor, Relay Module, etc.
this project will helpful for baby sheeter. So here we use sound
sensor to detect the voice of crying baby. Then the relay
module is used to turn on or off the music system. In music
player we added some music which will helpful to sleep the
baby. Whenever the baby will cry the sound sensor will detect
it and send signal to the Arduino. Then Arduino send signal to
the relay. The relay will turn on so automatically music will be
playing. And this process will continuously happen until baby
isn’t stop crying.
2024

COMPONENT USED IN PROJECT:

1. Arduino (Atmega328p)

2. DC Power Supply.

3. Sound sensor

4. Relay module

5. Music player

6. Connecting wires

CIRCUIT DIAGRAM:-
2024

INTRODUCTION TO THE ATMEGA328P:-

Fig: Pin diagram of Arduino(ATMEGA328P)

 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.

2. Power (Barrel Jack):-Arduino boards can be powered directly from the AC


mains power supply by connecting it to the Barrel Jack.

3. Voltage Regulator:-The function of the voltage regulator is to control the voltage


given to the Arduino board and stabilize the DC voltages used by the processor
and other elements.

4. Crystal Oscillator:-The crystal oscillator helps Arduino in dealing with time


issues. How does Arduino calculate time? The answer is, by using the crystal
oscillator. The number printed on top of the Arduino crystal is 16.000H9H. It tells
us that the frequency is 16,000,000 Hertz or 16 MHz.

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

5.1 POWER SUPPLY CIRCUIT:-

Fig: Block diagram of Power Supply

Each of the blocks is described in more detail below:

 Transformer - steps down high voltage AC mains to low voltage AC.

 Rectifier - converts AC to DC, but the DC output is varying.

 Smoothing - smoothes the DC from varying greatly to a small ripple.

 Regulator - eliminates ripple by setting DC output to a fixed voltage.

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:

Smoothing is performed by a large value electrolytic capacitor connected across the


DC supply to act as a reservoir, supplying current to the output when the varying DC
voltage from the rectifier is falling. The diagram shows the unsmoothed varying DC
(dotted line) and the smoothed DC (solid line). The capacitor charges quickly near the
peak of the varying DC, and then discharges as it supplies current to the output.

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.

Circuit diagram of 5V Power Supply

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

5.2 SOUND SENSOR :-

The sound sensor consist of Microphone as a transducer, potentionmeter to adjust


the intensity, LM386 low power audio amlifier, LED and other passive
components like resistors and capacitors.

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.

This sensor includes 3 pins and they are,

 Pin1 (VCC): 3.3V DC to 5V DC


 Pin2 (GND): This is aground pin
 Pin3 (OUT): This is an output pin. It provides high signal when there is no
sound and goes LOW when sound is detected. You can connect it to any
digital pin on an Arduino or directly to a 5V relay or similar device.

LED:-
2024

A light-emitting diode (LED) is a semiconductor light source that emits light


when current flows through it. Electrons in the semiconductor recombine
with electron holes, releasing energy in the form of photons. The color of the light
(corresponding to the energy of the photons) is determined by the energy required
for electrons to cross the band gap of the semiconductor.[5] White light is
obtained by using multiple semiconductors or a layer of light-emitting phosphor
on the semiconductor device.

Fig: Light Emitting Diode

5.3 RELAY MODULE

A power relay module is an electrical switch that is operated by an


electromagnet.The electromagnet is activated by a separate low-power signal from
a micro controller. When activated, the electromagnet pulls to either open or close
an electrical circuit.

ALGORITHM:
2024

1) Start

2) Check baby is crying or not

3) If baby is crying then turn on relay to play the music

4) If baby is not crying then turn off relay to stop the music

5) End

6.2 FLOW CHART:

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

delay(5000);//Silent delay to check whether the baby still crying or not


}
///////////////////////////////////////////
void WakingMode()//Third Fn that the program passes by if the baby still crying
{
digitalWrite(green,LOW);//Turn off the green light
Twitter.sendMessage(account,Message2);// Sending a message on twitter for the
parents
MusicPlayer.next();//switch to WakingMode songs (Ex:Old MacDonald Had A
Farm )
MusicPlayer.play();//Playing songs for the baby
digitalWrite(toy,HIGH);//turn on the Children toy
delay(30000);//Delay for the songs
MusicPlayer.previous();//Back to the previous Song(Quiet songs)
MusicPlayer.stop();//stops the MusicPlayer
digitalWrite(toy,LOW);//turn it off
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
}
//////////////////////////////////////////
void SleepingMode2()//Second Fn that the program passes by if the baby still
crying
{
digitalWrite(green,LOW);//turn off the monitoring LED
Twitter.sendMessage(account,Message4);//Sending a message on twitter for the
parents
MusicPlayer.play();//Continuing the quiet music for the baby
2024

delay(30000);//Delay for music


MusicPlayer.pause();//Pause the music for checking
z=1;////Confirm that the program passes thourght this function
x=0//for preventing the program to run these function again
}
///////////////////////////////////////////
void loop()
{
MonitoringMode();
////////////////////////////////////////////
if(y==1)//If the baby is sleeping
{
digitalWrite(green,HIGH);//Turning on the Green LED(Checking LED)
////////////////////////////////////////////
if(Crying())//If the baby is crying
{
digitalWrite(red,HIGH);//Turn on the Sound LED
delay(100);
digitalWrite(red,LOW);//Turn off the Sound LED
cry++;//Increment the cry value intial value =0,The program starts at cry =10
delay(300);//Delay to cancel the noise
}
}
///////////////////////////////////////////
if ((Crying())&&(z))//if baby is crying and the program passes through
sleepingMode 2
{
WakingMode();//starts the WakingMode
delay(5000);//Delay before 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:

In this paper, an intelligent baby cradle system was developed. The

cradle was capable of detecting the baby crying sound while ignoring

other sounds like clap, sneeze, fan, sudden sounds, environment sounds

etc.The individual devices were assembled and was observed to be

working efficiently at the time of baby’s cry detected by the sound

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

parents, hearing impaired & blind parents.

You might also like