Arduino Projects: Arduino Decibel Meter

I am sure you know those volume meters we mostly find in professional recording studios. That’s what this project is about, a simple volume meter (or decibel meter) made with Arduino, a microphone and few LEDs.

The Arduino program for this project is very optimized and shortened so you can see what a properly written program looks like.

Let’s start with a list of components we need for the project:

Basically, you can use every microphone that is compatible with Arduino just make sure that it has an analog output.

Connect everything using the breadboard and make sure you are properly connecting the LEDs with resistors, it is very easy to make a mistake here.

Use male-male cables to connect everything. The microphone module can also be plugged into the breadboard.

You can use a smaller breadboard as well, no need to use a huge one as I am doing.

You will find the program to upload to the Arduino board below, as I’ve already mentioned, I have tried to reduce the whole thing in 17 lines comments excluded. That is what we called efficient programming right here! 😉

The first loop is the LEDs setup and the second is to control the LEDs. You can adjust the sensitivity by changing the value in the map function. You can change the value where you see 700: smaller for more sensitive or bigger for less sensitive.

Here we have it!

A good exercise will be to try adding more LEDs to the project. You can also try using the RGB LED strip instead of the LEDs we have just used.

You might also like:

6 thoughts on “Arduino Projects: Arduino Decibel Meter”

  1. Works great! I made one, though I used 100 ohm and 470 ohm resistors because I didn’t have any 220 ohm resistors. I used the 100 ohm ones before the 470 ohm resistors so the first 5 LEDs would at least be brighter. The whole thing still works wonderfully. Thanks!

  2. I have made it so it only works for 5 leds, with an arduino MEGA it doesn´t work. what did I do wrong??, I am a complete newbie in electronics.

    int led[5] = {30, 31, 32, 33, 34};
    int input, i;
    void setup()
    {

    for (i = 30; i < 35; i++)
    pinMode(led[i], OUTPUT);
    Serial.begin(9600);
    }
    void loop()
    {
    input = analogRead(A0);
    //Serial.println(s);
    input = input / 5; //By changing the denomintor the sensitivity can be changed
    if (input < 5)
    {
    if (input == 0)
    {
    for (i = 30; i < 35; i++)
    {
    digitalWrite(led[i], LOW);
    }
    }
    else
    {
    for (i = 30; (i-30) < input; i++)
    {
    digitalWrite(led[i], HIGH);
    delay(4);
    }
    for (i = i; i < 35; i++)
    {
    digitalWrite(led[i], LOW);
    }
    }
    }
    }

  3. Hello,
    Great project !
    I’m new to Arduino coding and I’m trying to understand to make a similar project.
    How could I adapt your code to display the amount of décibels on a WS2812B led strip ?
    It is for my wife’s classroom.
    Thank you

Leave a Comment

X