Making a Arduino Vu Meter using a Sound Sensor

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!

Things you need:

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

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.

arduino Vu meter schematics

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.

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);
     }
  }
}

Watch my Youtube Video on this subject

Leave a Reply

Your email address will not be published. Required fields are marked *

Show Buttons
Hide Buttons