Introduction

In our environment, there are all kinds of sounds, some of which are quite noisy. With the development of human civilization, the quiet environments have become few and far between, and are replaced with more and more noisy environments instead. Staying in the loud places for long time will have an impact on hearing, which is bad for health.

Sound level meter (also known as the decibel meter, noise meter) is a basic noise measurement instrument.We have launched a sound level meter, which is compatible with Arduino, and is plug-and-play. It can accurately measure the sound level of it's surrounding environment. This product uses an instrument circuit and a low noise microphone, which makes it highly precise. It supports 3.35.0V wide input voltage, 0.62.6V voltage output. The decibel value is linear with the output voltage, which leads to a simple conversion, and therefore does not need a complex algorithm. The connector is plug-and-play so this product can be easily used in your application.

Sound level meters are widely used in environmental noise detection, such as highway noise monitoring station, room noise monitoring and so on. It’s time for you to DIY a sound level detector to protect your hearing.

The black film on the microphone is a sensitive component, do not touch it with fingernails or other sharp objects.
Do not place this module on the surface of the conductor or a semiconductor, otherwise it will short the microphone’s pins. It is recommended to place this module on a dry insulator’s surface or secure with nylon columns to hang in the air.

Specification

Board Overview

Num Label Description
1 A Analog Signal Output(0.6~2.6V)
2 + Power VCC(3.3~5.0V)
3 - Power GND(0V)

Tutorial

This tutorial will show you how to use this module to measure the decibel value of surrounding environment.

Requirements

Connection Diagram

Sample Code

/***************************************************
 DFRobot Gravity: Analog Sound Level Meter
 <https://www.dfrobot.com/wiki/index.php/Gravity:_Analog_Sound_Level_Meter_SKU:SEN0232>

 ***************************************************
 This sample code is used to test the analog sound level meter.

 Created 2017-06-26
 By Jason <jason.ling@dfrobot.com@dfrobot.com>

 GNU Lesser General Public License.
 See <http://www.gnu.org/licenses/> for details.
 All above must be included in any redistribution
 ****************************************************/

 /***********Notice and Trouble shooting***************
 1. This sample code is tested on Arduino Uno with Arduino IDE 1.0.5 r2.
 2. In order to protect the microphone on the board, you should not touch the black membrane on the microphone. Also you should keep it clean.
 3. Please do not place this module on the surface of  conductor or semiconductor. Otherwise, this will cause the microphone pin to be shorted.
 ****************************************************/

#define SoundSensorPin A1  //this pin read the analog voltage from the sound level meter
#define VREF  5.0  //voltage on AREF pin,default:operating voltage

void setup()
{
    Serial.begin(115200);
}

void loop()
{
    float voltageValue,dbValue;
    voltageValue = analogRead(SoundSensorPin) / 1024.0 * VREF;
    dbValue = voltageValue * 50.0;  //convert voltage to decibel value
    Serial.print(dbValue,1);
    Serial.println(" dBA");
    delay(125);
}

Expected Results

After uploading the sample code, you can open the serial monitor, and get the decibel value. The test environment is our office and it's decibel value is shown as below. Soundlevelmeterresult.png

Relation between Decibel Value and Voltage Output

For this product,the decibel value is linear with the output voltage.When the output voltage is 0.6V, the decibel value should be 30dBA. When the output voltage is 2.6V, the decibel value should be 130dBA. The calibration is done before leaving the factory, so you don't need to calibrate it. So we can get this relation: Decibel Value(dBA) = Output Voltage(V) × 50, as shown below. Voltage-db.png

FAQ

Q1. Why is the decibel value unstable, and constantly varying? Is this normal?
A1. The decibel value measured by the sound level meter is the sound level of a short period of time (about hundreds of milliseconds), so the value is a instantaneous value. The sound level meter is measuring constantly, and at different times the sound is varing, so the decibel should be varing . This is normal.
Q2. Although the environment is very quiet, but the decibel value is not less than 30dbA. Why?
A2. In our living environment, there is always a little sound . Human's ear is hard to hear the sound below 30dBA, but the equipment still can detect the sound. So it is difficult for the sound level to be less than 30dBA in our living environment.
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents

DFshopping_car1.png Get Gravity: Analog Sound Level Meter SKU:SEN0232 from DFRobot Store or DFRobot Distributor.

Turn to the Top