Arduino Vu Meter Using a Sound Sensor

About: I am an Arduino and Electronics enthusiast, I make various Arduino Projects From small mini projects to Home Automation Projects including IOT.I post video tutorials and articles on the projects I make,Here ...

Make Led’s Dance at the Music with a sound sensor and a Arduino UNO Following the Beats of music with Simple code using basic Math.What is a Vu-Meter?If you don’t Know what is a Vu Meter then,A Vu Meter is a device which displays representation of a signal level in an audio equipment.In this Arduino Vu meter Project we are Going to Display this audio Signal in the form of an LED Array.All LED’s present in the Arduino vu meter array glow in a wave with the change in the volume or intensity of the sound in your surrounding.You can extend it to add more columns.Looks Cool??So lets get started!

Step 1: Things You Need:

  • Arduino
  • Sound Sensor
  • Jumpers
  • 5V Power Supply
  • LED’s

Step 2: Wiring Up the Circuit

As we are going to use LED’s as our output to display audio signal,we need to wire our lights in a array.Number of LED’s is up to you,I’m gonna use 7 LED’s to keep it simple.I have arranged the LED’s in green,yellow and red order to give it a better look when they light up.I started connecting the LED’s from the pin 3 to pin 9.Make sure don’t forget(while I did forgot while experimenting in the video :P) to use a 330 OHM resistor in series with every LED so that the operating voltage of LED won’t exceed the maximum forward voltage i.e 3.2V and increase its life.If you don’t have a 330 OHM resistor you can use a resistor of a nearby higher value.After you wire up all LED’s from pin 3 to pin 9,Now you need to connect the Sound sensor.

Connect the signal pin of the sound sensor to the Analog pin A0 of Arduino.Now connect the VCC and GND of sound sensor to the 5V pin and Ground pin of Arduino.You can also use a external power supply to power the sensor.

Step 3: Arduino Vu Meter Code

This Project uses a simple code with two for loop for turning the LED’s on and off.The for loop compares the threshold/sensitivity value “s” with the analog value of audio signal and decides the number of LED’s to light up for a particular audio intensity.The threshold/sensitivity value can be changed according to your need by changing the denominator value.Some of you may get all LED’s on or off situation,in such case try changing the denominator value of sensitivity to get the desired wave like patterns.

Visit Our website for more arduino Tutorials-RZtronics.com

int led[8] = { 3, 4, 5, 6, 7, 8, 9, 10}; // Assign the pins for the leds

int Audio = A0;

int s,i;

void setup()

{

for (i = 0; i < 8; i++)

pinMode(led[i], OUTPUT);

}

void loop()

{

s = analogRead(Audio);

Serial.println(s);

s = s / 35; //Change the sensitivity by changing Denominator

if (s == 0)

{

for(i = 0; i < 8; i++)

{

digitalWrite(led[i], LOW);

}

}

else

{

for (i = 0; i < s; i++)

{

digitalWrite(led[i], HIGH);

delay(40);

}

for(i = i; i < 8; i++)

{

digitalWrite(led[i], LOW);

}

}

}

Share

    Recommendations

    • Paper Contest

      Paper Contest
    • Epilog X Contest

      Epilog X Contest
    • Sweet Treats Challenge

      Sweet Treats Challenge

    Discussions

    0
    None
    HallgatóA

    4 weeks ago on Step 3

    Hi,
    I don`t want to be rude, but this project has several mistakes/problems. First thing is the Fritzing scheme. You connected the D11 to the first LED, but later you have programmed the D10 pin in Arduino code. Second, if you want to read the "value of sound" on sound sensor trough serial monitor, you need to put this line of code in void setup() ---> Serial.begin(9600); The third is mine opinion, if you connect Arduino to PC through USB, you don`t need to connect a battery to the breadboard, just connect the Arduino board`s 5V, GND output to the breadboard. By the way thanks for the idea, it helped me. :)
    Best regards!