Arduino Decibel Meter

by hIOTron IoT in Circuits > Arduino

27657 Views, 19 Favorites, 0 Comments

Arduino Decibel Meter

Arduino Decibel meter.png

This project will help you to monitor the noise or sound level by measuring sound pressure.

Supplies

Hardware Components

1. Arduino Microphone

2. Arduino Uno

3. Jumper wires
4. Dashboard

5. Green LED X5

6. Yellow LED X3

7. Red LED X2

8. Resistor 200ohm

Software

Arduino IDE

About Project

Arduino decibel meter implementation.jpg

The purpose of the decibel meter is to access the noise or sound level by measuring sound pressure.

The Microphone must have an analog output. Make connections as shown in above dig using the breadboard and make sure you are properly connecting the LEDs with resistors.

Use male-male cables to connect everything. The microphone module can also be plugged into the breadboard. Run a Code as mentioned below.

The first loop is for the LEDs setup and the second is to control the LEDs. You can customize the sensitivity by changing the value in the map function.

IoT Training Online will help you to learn all such new concepts with its IoT Applications over various industries.

Run a Program

void setup() {

//here is an input for sound sensor

pinMode(A0, INPUT);

//here we are setting up all pins as an outputs for LEDs

for(int z = 0; z < 10; z++){

pinMode(z, OUTPUT); } }

void loop() { /

/here we are storing the volume value

int volume = analogRead(A0);

//max value for analog read is 1023 but it must be very very loud to reach this value

//so I lower it down in map function to 700

//mapping volume value to make it easier to turn LEDs on

volume = map(volume, 0, 700, 0, 10);

//for loop to turn on or off all LEDs

//thanks to this loop code for this project is very short

//we are going through all pins where we have LEDs and checking if the volume is

//bigger then pin number (that's why we are maping the volume)

for(int a = 0; a < 10; a++){ if(volume >= a){

//if it is bigger we can turn on the LED

digitalWrite(a, HIGH);

}else{

//if it is smaller we can turn the LED off

digitalWrite(a, LOW);

}

}

}