1. Introduction
A Digital Decibel (dB) Meter is a device used to measure sound intensity. In the automotive world, this is a vital tool for checking if a vehicle's horn stays within the legal noise limits set by the transport department (MVD).
Using an Arduino and a High-Sensitivity Sound Sensor, we can build a portable meter that not only shows real-time sound levels but also captures the Peak (Maximum) Decibels during a horn blast. This project is highly efficient, portable, and perfect for DIY vehicle diagnostics.
2. Components
| Component | Quantity | Description |
| Arduino Uno / Nano | 1 | Microcontroller for signal processing |
| MAX9814 or LM393 Sound Sensor | 1 | Microphone module with Analog Output |
| 16x2 I2C LCD Display | 1 | Displays real-time and peak dB levels |
| Push Button | 1 | To reset the Peak (MAX) reading |
| 9V Battery / Power Bank | 1 | Portable power source for vehicle testing |
| Jumper Wires & Breadboard | As required | For circuit connections |
3. Circuit and Connections
| Pinout Diagram of Arduino Uno |

MAX9814 Pinout Diagram

LM393 Sound Sensor Pinout Diagram
* Note: Only One Sound Sensor Required

Pinout Diagram LCD WITH I2C
| KY-004 Push Button Module Pinout Diagram |
Circuit Overview:
Sound Detection: The sensor detects sound waves and converts them into an analog voltage.
Processing: Arduino reads the analog peaks and calculates the Decibel value using a logarithmic formula.
Display: The LCD shows the current noise level and holds the highest recorded value (Peak).
Pin Connections:
| Component | Arduino Pin | Notes |
| LCD I2C (SDA) | A4 | Data Line |
| LCD I2C (SCL) | A5 | Clock Line |
| Sound Sensor (AO) | A0 | Analog Output of the sensor |
| Push Button | D2 | To reset the Peak (MAX) value |
| VCC / GND | 5V / GND | Common power and ground |
Note: For horn testing, the MAX9814 sensor is recommended over the LM393 because it features Auto Gain Control, preventing the signal from "clipping" when exposed to very loud noises (90dB+).
4. Detailed Step by Step Circuit Working
- Acoustic Sensing: The microphone picks up the sound pressure from the vehicle horn.
- Peak-to-Peak Detection: The code samples the sound wave for 50ms to find the maximum and minimum voltage levels. This is more accurate than a single reading.
- Decibel Calculation: Sound is non-linear. The Arduino uses the formula
dB = 20 log10 (Voltage)
to convert the electrical signal into decibels.
- Peak Hold: When a horn is pressed, the sound is sudden. The Arduino stores the highest value so the user can read it even after the horn stops.
5. Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
const int sampleWindow = 50;
float maxDB = 0;
const int resetPin = 2;
void setup() {
pinMode(resetPin, INPUT_PULLUP);
lcd.init();
lcd.backlight();
lcd.print("Horn DB Tester");
delay(2000);
lcd.clear();
}
void loop() {
unsigned long startMillis = millis();
unsigned int peakToPeak = 0;
unsigned int signalMax = 0;
unsigned int signalMin = 1024;
// Collect data for 50 mS
while (millis() - startMillis < sampleWindow) {
int sample = analogRead(A0);
if (sample < 1024) {
if (sample > signalMax) signalMax = sample;
else if (sample < signalMin) signalMin = sample;
}
}
peakToPeak = signalMax - signalMin;
float volts = (peakToPeak * 5.0) / 1024;
// Calibrated formula for high-intensity sound
float decibels = (20 * log10(volts / 0.001)) + 40;
if (decibels > maxDB) maxDB = decibels;
// Reset MAX reading
if (digitalRead(resetPin) == LOW) maxDB = 0;
lcd.setCursor(0, 0);
lcd.print("Noise: ");
lcd.print(decibels, 1);
lcd.print(" dB ");
lcd.setCursor(0, 1);
lcd.print("MAX: ");
lcd.print(maxDB, 1);
lcd.print(" dB ");
delay(50);
}
6. Detailed Step by Step Code Working
Library & Setup: We use the
LiquidCrystal_I2Clibrary for the display. PinD2is set as anINPUT_PULLUPfor the reset button.Sampling Window: The
whileloop collects sound data for 50 milliseconds. This ensures we catch the "peak" of the sound wave.Voltage Conversion: The raw analog value is converted into a standard voltage (0-5V).
Logarithmic Logic: The
log10function is used to scale the voltage into decibels, matching how humans hear sound.Peak Logic: The code compares the current
decibelstomaxDB. If the current sound is louder, it updates the memory.
7. Tips for Accurate Testing
Standard Distance: For vehicle testing, hold the meter 1 meter away from the horn at a 45-degree angle.
Open Environment: Always test in an open space. Walls and roofs cause reflections that make the horn sound louder than it actually is.
Sensitivity Adjustment: Use the small screw (trimpot) on the back of the sensor to adjust the baseline until a quiet room reads about 30-40 dB.
Power: Use a battery for testing so that engine electrical noise doesn't interfere with the Arduino's readings.
8. Uses
Testing aftermarket car/bike horns for legal compliance.
Measuring noise pollution in silent zones (hospitals/schools).
Checking the sound insulation of a vehicle cabin.
Educational physics experiments regarding sound waves.
9. Conclusion
This Arduino Decibel Meter is a practical and low-cost solution for anyone interested in automotive electronics. By combining simple sensors with mathematical processing, we can turn a basic Arduino into a professional diagnostic tool. Whether you are checking your own vehicle or working on a school project, this meter provides reliable and clear results.