hi Guys welcome to meworkstelugu in this section we know about the Sounds sensor. in this section we use....... sensor. This sensor has 4 pins. There are VCC,GND , Analog output pin(AO) and Digital output pin (DO). this sensor has one potentiometer. This will help to control the sound sensor sensitivity.
HOW THIS SOUND SENSOR WORKS:
This sensor has a microphone.when this microphone detects the sound, it converts this sound to an electrical signal using LM393 IC. Then that signal we get as either digital form when we connect to digital pin or either in analog form.
components:
here we use these components
these are the components we are using now.
If you want to buy Arduino components, I am giving my affiliate links. If you buy the components using my affiliate links, it will help to our channel and website growth. so do these small help.
circuit diagram:
In this below circuit diagram shows we connect Arduino sound sensor led. this entire process you will understand easily by watching making video available on below.
MAKING VIDEO:
code:
this is the code for Arduino sound sensor project with LED.
int soundSensor=7;
int led=8;
int SensorData;
boolean LEDStatus=false;
void setup() {
pinMode(soundSensor,INPUT);
pinMode(led,OUTPUT);
}
void loop() {
SensorData=digitalRead(soundSensor);
if(SensorData==1){
if(LEDStatus==false){
LEDStatus=true;
digitalWrite(led,HIGH);
}
else{
LEDStatus=false;
digitalWrite(led,LOW);
}
}
}
0 Comments