Music Reactive LED | Arduino-Sound Sensor Tutorial in 4 Easy Steps




About: MechStuff is a blog for people who want to learn about Arduino and various mechanical devices & other engineering marvels !

Hello reader ! You've come to the right place. Its incredibly easy & I bet it won't take more than 5 minutes ! Alright, lets get started.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Requirements -

  1. Arduino board
  2. Breadboard
  3. Jumpers/single stranded wires
  4. LED
  5. Sound sensor
  6. A pizza slice to celebrate(optional) :P

Step 2: Connections :

Connections of Sound sensor -

  • VCC - 5V supply of Arduino
  • GND - GND of Arduino
  • D0 - Pin 3 on Arduino

Connections of LED -

  • Positive terminal - Pin 7 on Arduino (or any digital pin)
  • Negative terminal - GND of Arduino

Step 3: Code

int soundsensor = 3;<br>int led = 7;                // defining pin numbersvoid setup() 
  pinMode (soundsensor, INPUT);
  pinMode (led, OUTPUT);

void loop()
  int sensorvalue = digitalRead (soundsensor);            //if the sound intensity is higher than threshold which is set by us, 
                                                          //then sensor would return the value as 1
  if (sensorvalue == 1)                                    
    digitalWrite(led, HIGH);
    digitalWrite(led, LOW);

Step 4: Only Thing to Take Care

The potentiometer on the sound sensor allows you to adjust sensitivity of the sensor. Changing sensitivity allows the LED to glow even at low sound levels & high sound levels.
High sensitivity will enable the sensor even to detect the smallest sounds. Turn the potentiometer clockwise to increase the sensitivity & anti-clockwise to decrease the sensitivity.

Thank you all for reading my instructable! I would be very glad if I could help you with any other tutorials. You can watch my other Arduino tutorials on my YouTube channel !
Also I have a Arduino tutorials section on my blog !

If you face any problems, do share it below in the comments section ! I'll get to them ASAP ! :D

First Time Author Contest 2018

Participated in the
First Time Author Contest 2018

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    2 Discussions


    Question 10 months ago

    Can i add another set of led. And every beat the two set of light are alternately on/off?