Arduino Sound Detection Sensor
Arduino Sound Detection Sensor Modul LM393
Parts Required:
– Arduino NANO v3.0
– Sound Detection Sensor Modul LM393
– LED (1)
– Wires to connect it all together
Arduino Code:
// Example by Hisham Marzouk
// Officialhrm.com
int LED = 3;
int brightness = 0;
int fadeAmount = 1;
void setup(){
pinMode (LED, OUTPUT);
Serial.begin(9600);
}
void loop() {
int statusSensor = analogRead(A1);
if(statusSensor > 800){
for(int i = 0; i < 255; i++){
analogWrite(LED, brightness);
brightness = brightness + fadeAmount;
if (brightness <= 0 || brightness >= 255) {
fadeAmount = –fadeAmount ;
delay(30);
}
Serial.println (brightness);
}
}
else{
digitalWrite(LED, LOW);
}
}
It uses a microphone which supplies the input to an amplifier, peak detector, and buffer.
When the sensor detects sound, it processes an output signal voltage which is sent to a microcontroller then performs necessary processing.
For more Please make sure to subscribe to Officialhrm YouTube channel and like Facebook Page.
Thank you for visiting Officialhrm! Please don’t forget to share this website with your friends.