This project show how to use sound sensor with Arduino.
Sound sensor detect clap or loud voice.
When sound come, Arduino turn ON LED and buzzer.
This project for Simple Sound Sensor Circuit with Arduino help beginner understand sensor working.
Arduino Coding:
int sound = 7;
int led = 13;
int buzzer = 8;
int value = 0;
void setup() {
pinMode(sound, INPUT);
pinMode(led, OUTPUT);
pinMode(buzzer, OUTPUT);
}
void loop() {
value = digitalRead(sound);
if(value == HIGH){
digitalWrite(led, HIGH);
digitalWrite(buzzer, HIGH);
delay(300);
} else {
digitalWrite(led, LOW);
digitalWrite(buzzer, LOW);
}
}Code Explanation:
- We create variable sound for sound sensor pin.
- LED ON pin 13.
- Buzzer ON pin 8.
- In setup we set pins input and output.
- In loop we read sensor value.
- If sound detected value become HIGH.
- Then LED is ON and buzzer is also ON.
- If no sound then both are OFF.
Circuit Working:

Parts List:
| Item | Quantity |
|---|---|
| Resistors 220Ω 1/4 watt | 1 |
| Arduino UNO | 1 |
| Sound Sensor Module | 1 |
| LEDs 5mm any | 1 |
| Buzzer | 1 |
Sound sensor gives digital output.
When loud sound hit microphone module then output pin become HIGH.
Arduino read HIGH signal.
Arduino send voltage to LED and buzzer.
LED glow and buzzer makes sound.
When sound stop sensor output is LOW and Arduino turn OFF LED and buzzer.
Formula with Calculation:
Below is the formula for LED current:
LED current is approx 15 to 20 mA.
We used 220 ohm resistor:
Current = Voltage / Resistance
Voltage around 5V minus LED drop 2V = 3V
Current = 3 / 220 = 0.013A
This is safe for our LED.
How to Build:
To build a Simple Sound Sensor Circuit with Arduino we need to follow the below steps:
- Assemble all the parts as shown in circuit diagram.
- Sound sensor VCC pin connect to Arduino 5V.
- Sound sensor GND pin connect to Arduino GND.
- Sound sensor OUT pin connect to Arduino pin 7.
- LED positive leg connect to one side of 220 ohm resistor.
- Other side of resistor connect to Arduino pin 13.
- LED negative leg connect to GND.
- Buzzer positive wire connect to Arduino pin 8.
- Buzzer negative wire connect to GND.
- All grounds must join together.
Conclusion:
This Simple Sound Sensor Circuit with Arduino is very easy and best for beginners.
We can learn how sound sensor work with Arduino.
It show how sensor signal control LED and buzzer.
We can improve project by adding relay, motor or other automation.
Leave a Reply