Make our Lights Dance with Sound!
This Sound Activated LED Circuit with Arduino turns every clap, snap or beat into a colorful light show; also it is a fun and easy project that brings sound and LEDs to life.
Moreover, its perfect for beginners who want to see their music or sounds in action!
Arduino Code:
int soundSensor = A0;
int ledPins[] = {2,3,4,5,6};
int sensorValue = 0;
void setup() {
for(int i=0; i<5; i++) {
pinMode(ledPins[i], OUTPUT);
}
pinMode(soundSensor, INPUT);
Serial.begin(9600);
}
void loop() {
sensorValue = analogRead(soundSensor);
Serial.println(sensorValue);
if(sensorValue > 400) {
for(int i=0; i<5; i++) {
digitalWrite(ledPins[i], HIGH);
}
} else {
for(int i=0; i<5; i++) {
digitalWrite(ledPins[i], LOW);
}
}
}
Coding Explanation:
- Variable soundSensor store A0 pin.
- Array ledPins store LED pins.
- Setup function set LED pins output, sensor pin input.
- Loop read analog value from sensor.
- If value is more than 400 then all LEDs ON.
- Else all LEDs are OFF.
- Serial print show sensor values for testing.
Circuit Working:

Parts List:
| Components | Quantity |
|---|---|
| Resistors | |
| 220Ω 1/4 watt | 5 |
| Semiconductors | |
| Arduino UNO | 1 |
| Sound Sensor Module | 1 |
| LEDs any 5mm 20mA | 5 |
Sound sensor get power from Arduino 5V and GND and sensor detect sound and send signal to Arduino A0.
Then Arduino read signal and turn ON/OFF LEDs on pins D2 to D6; also each LED need resistor from R1 To R5 to protect from too much current.
When sound is loud then more LEDs light up and also circuit is simple with no button and no switch.
How to Build:
To build a Sound Activated LED Circuit with Arduino follow the below mentioned steps for connections:
- First, take all parts same as circuit diagram.
- Next, sound sensor VCC go to Arduino 5V, sound sensor GND go to Arduino GND and sound sensor OUT go to Arduino A0.
- Then LEDs connect to Arduino pins D2, D3, D4, D5, D6 with resistors R1 to R5.
- Also, each LED anode go to Arduino pin and each LED cathode go to GND through resistor.
Conclusion:
Overall, Sound Activated LED Circuit with Arduino is simple project; it shows sound control LEDs.
Also, you can use the same idea to control fans, lights, and motors; in addition, this circuit is easy to make and suits beginners well.