Project: Alarm system with Sound sensor
Project summary:
In this project
we would interface our sound detector sensor and make alarm system which would
detect any sound in the room of any kind of noise disturbance, by beeping up a
buzzer. And also we would able to see the result on the Serial monitor of
Arduino Software (IDE).
Figure 1:alarm system with Sound detector sensor.
Figure 1:alarm system with Sound detector sensor.
Component & tools required: -
In this project
we would required the component and tools which are described below.
·
Arduino board.
·
Arduino Software (IDE).
·
Sound detector sensor.
·
Red led 1, and Green
led 1.
·
Buzzer.
·
1K resisters 2.
·
Jumper wires.
·
Bread board.
Figure 2: component required in this project. |
Connection: -
In this project
we would connect a Arduino board with the sound detector sensor and buzzer alarm
to detect rather the sound or noise is detected or not in the sensor and according to that out would be see
on the hard ware and the software.
Table of
connection: -
S no.
|
Components Pin
|
Arduino Pins
|
1
|
Sound sensor VCC
|
5.v supply.
|
2.
|
Sound sensor GND
|
GND
|
3.
|
Sound sensor output
|
A0 pin
|
4.
|
Red Led
|
D2 pin
|
5.
|
Green Led.
|
D3 pin
|
6
|
Buzzer
|
D4 pin.
|
Figure 3: Connections. |
Follow the following steps to perform this experiment: -
Step 1: -
Gather the entire components and make connection as show above. Open up the
Arduino Software and copy the below code Alarm system with sound detector
sensor.
Step 2: - Go
to tools and check the right board and Com Port. If it doesn’t show up like
this than go to device manager and update the driver of Arduino on USB com
device. and if everything is fine upload the code.
Figure 4: - uploading the code in Arduino. |
Result: -
if you have done
everything correctly than you would have same results which are shown below.
When the sounder
sensor does not hear any noise than buzzer remain silent and Green Led glows,
this means that Alarm is off. This result can be seen of Hardware and software
both.
Figure 6: Hardware result when sound sensor doesn't hear anything. |
Result on the serial monitor of Arduino software.
Figure 7:Software result when sound sensor doesn't hear anything. |
When the sound sensor
detects the noise in environment then output voltage of it get dropped and
Alarm get on. In this condition Red Led get turn on and buzzer start to buzzing
a high pitch noise to detect the alarm. Output of hardware and software in this
condition is shown below in the pictures.
Figure 8: Hardware result when sound sensor hears something. |
And this result can be seen on the serial monitor of the Arduino software too.
Figure 9: Software result when sound sensor hears something |
Project specification: -
Alarm system with sound sensor can be really a use fully sensor if it’s used creatively
to solve in daily life problems.
·
Cab be establish in
babies cradle to detect if is crying or not if he is alone. This system would
inform his parent by alarm or a text massage in their cell phone if it’s gets
used with GSM.
·
Can be also used in the
thief alarm system. And etc uses can be with different purpose.
Future extension of this project: -
This project can be really use full
if this is used with different sensor and comm. device to extent this project
for further.
·
Can be used with Bluetooth
and RF for sending alarm to signal remotely.
·
This project can be extended
with GSM for massage alarm system for different purpose.
·
And also can be interface
with LCD to print the massage of alarm.
Here is the code which you can use in you project: -
//Alarm system with SOUND Sensor
int sensorPin= A0; //Microphone Sensor Pin on analog 0
int RedLed = 2; // voice detection led.
int greenLed = 3;
int buzzer = 4; // buzzer alarm.
int sensorValue= 0 ;
void setup()
{
Serial.begin(9600);
pinMode(RedLed, OUTPUT);
pinMode(buzzer,OUTPUT);
pinMode(sensorPin,INPUT);
pinMode(greenLed,OUTPUT);
}
void loop()
{
sensorValue = analogRead(sensorPin); // read the value from the sensor:
Serial.print("sensorValue=");
Serial.print(sensorValue); //The 'silence' sensor value is 800-1023
Serial.println(" ");
if (sensorValue<250)
{
digitalWrite(RedLed,HIGH);
Serial.println("RedLed is on");
digitalWrite(buzzer,HIGH);
Serial.println("Alarm is on...!!!");
// delay(5000);
// The red LEDs stay on for 2 seconds
}
else {
digitalWrite(RedLed,LOW);
digitalWrite(greenLed,HIGH);
Serial.println("grenLed is ON");
digitalWrite(buzzer,LOW);
Serial.println("Alarm is off");
Serial.println("");
}
delay(1000);
digitalWrite(RedLed,LOW);
digitalWrite(buzzer,LOW);
digitalWrite(greenLed,LOW);
}
Key Lock Insert
ReplyDelete