Making a sound level sensor is not as easy as it might appear to be at first glance. Simply detecting “peak” sound level or averaging out audio levels will not give you accurate decibel readings. Commercial sound level meters use a lot of post-processing on the audio recorded via their microphone.
Most sound level sensor modules for Arduino or ESP32, Raspberry pi and the likes have a simple analog circuit to average out the audio signal captured via a microphone. This average analog level is available for reading using the Arduino or MCU built-in ADC.
Given the host of problems with an approach like this (that I list below), we decided to design a very simple sound level meter module that solves the problems with all low cost existing solutions.
Sound Level Sensor Module - Introduction
Top 6 Problems with Sound Level Modules - SOLVED!
I identified a bunch of problems that off-the-shelf sound level sensors or modules suffer from. With our decibel meter module, we aimed to solve all these problems and still maintain a very attractive price point for our customers.
1. Most generic modules are sound "detectors", not level sensors
There are several low cost sound level modules available in the market. Most of them are some variant of a simple LM358 based active audio filter. Some other slightly more expensive variants may add another active filter stage to act as a band-pass filter or peak detector (depending on what the module is meant for).
However, the bottom line is – these are all sound threshold detectors only. There is no way of using them to monitor noise pollution or audio noise levels in general.
Signal output of these modules is heavily filtered and analog.
You might stand a chance of post-processing the output and calculating audio level within a separate MCU. But that comes with its own bunch of problems such as alising and non-uniform behavior across the audio spectrum. These modules are only suitable for detecting sound, but not for reading levels.
2. No Weighted Filtering and Averaging Time
Even if we looked for slightly sophisticated sound level meter modules like the ones DFRobot makes, There are issues that do not let you measure true audio levels. For example, human ears do not perceive loudness in a pure decibel / exponential manner.
However, analog audio meters will only give you a fixed theoretical decibel value. This may not correspond to readings from standard audio intensity meters available in the market if you simply use analog values off of an analog microphone module.
For example, this sound level measurement approach using an Arduino is fine for hobby projects, but definitely not for anything serious.
Most commercial sound level meters have A-weighted or C-weighted measurements, in addition to no weighting. Time averaging time can also be set to slow “1 second” or fast “100 ms” averaging durations. This can be important for rejecting large noise spikes while still taking them into account in the average noise for a given time window.
3. High Power Consumption
IoT applications like IoT traffic noise monitors or home noise monitors depend on low power operation for long battery life. While chips like the ESP32 can do the math and run algorithms to process audio from microphone to calculate decibel intensity, they end up consuming well over 150mW in continuous operation.
Such high power consumption is completely inacceptable in most battery powered applications.
There are projects that take the approach of computing decibel values the correct way using the ESP32, for example, this ESP32 sound meter project and the ESP32 sound analyzer project on Instructables. However, the power consumption and system being forced to stay awake all the time is an issue.
4. Dependent on Host MCU
Spending a long time porting FFT code and optimizing everything to run in parallel to a networking stack on IoT designs can be a tedious task. Audio level measurement is strictly a real-time and CPU intensive operation.
For example, vendor DSP libraries for an ARM Cortex MCU may handle DSP routines very differently than Xtensa compilers. Porting existing, well-documented projects can also be a challenge in situations like this. If you ever need to move to a new host platform, all your efforts can instantly go to waste.
5. Not for Outdoor Use
Unfortunately, readily available modules in the market are not meant for outdoor use. They are too large in size to enclosure in an IP65 porous steel enclosure. Support for IP65 or better waterproof microphones is unavailable.
The result is that you are forced to use industrial grade noise sensors that are bulky, use power hungry interfaces like RS-485 and cost a ton of money.
If you are looking for anything that can give you decibel readings with less than 5% error, uses little battery power, is fully configurable and tiny – you are pretty much out of luck.
This is where the PCB Artists sound level meter aims to make your project easy at just $25 (much lower in high volume). The module will soon be available for purchase via our store with worldwide shipping.