SOUND SENSOR
SOUND SENSOR
The sound sensor module provides an easy way to
detect sound and is generally used for detecting sound intensity. This module
can be used for security, switch, and monitoring applications. It uses a microphone which supplies the input
to an amplifier, peak detector and buffer. When the sensor detects a sound, it
processes an output signal voltage which is sent to a microcontroller then
performs necessary processing. We can interface sound sensor with Arduino
to detect the presence of sound waves.
Application:
- To detect sound in the surroundings.\
- To response to sound and move the robot.
- To response to sound and turn on circuits.
Sample Project with Arduino:
In this we going to turn ON the LED whenever the sound in surroundings is detected by the sound sensor.
Material required:
Code:
int ledPin=13;
int sensorPin=7;
boolean val =0;
void setup(){
pinMode(ledPin, OUTPUT);
pinMode(sensorPin, INPUT);
Serial.begin (9600);
}
void loop (){
val =digitalRead(sensorPin);
Serial.println (val);
if (val==HIGH) { // when the sensor detects a
signal above the threshold value, LED flashes
digitalWrite(ledPin, HIGH);
}
else {
digitalWrite(ledPin, LOW);
}
}
Comments
Post a Comment