A simple Sound Pressure Level Meter (SPL) dB audio meter using AVR ATmega

A sound level meter or sound meter is an instrument which measures sound pressure level. Sound pressure level (SPL) or sound level is a logarithmic measure of the effective sound pressure of a sound relative to a reference value. It is measured in decibels (dB) above a standard reference level. The commonly used reference sound pressure in air is = 20 µPa (rms) which is usually considered the threshold of human hearing. Keep in mind that 1 pascal will equal an SPL of 94 dB. Because the frequency response of human hearing changes with amplitude, a weighting have been established for measuring sound pressure. Usually the A-weighting curve is used. A weighting curve is a graph of gain across the frequency range (10Hz to 20kHz).A simple Sound Pressure Level Meter (SPL) dB audio meter using AVR ATmega
SPL level is defined as

given p_rms as the sound pressure measured, and p_ref as the reference sound pressure.
Once we have got the RMS value of the signal (actualRMS), we can transform it to SPLdb using this formula:

given refRMS as the reference RMS value for the input board at a know refSPLdb SPLdb level.
To compute SPL measurements, the meters loop is:

  1. collects N samples
  2. do FFT for the N samples collected, the signal is now transformed in the frequency domain
  3. apply A-weighting (in freq domain)
  4. get magnitude of the signal
  5. get RMS value of the signal
  6. apply a time-weight filter to RMS value
  7. compute the SPL using the RMS value
  8. output data

Every sample is collected at a fixed time, a timer interrupt impose this timing, this is because we need to know the sampler frequency, to built filters and output signal magnitude.
Runnig @16Mhz i’m able to collect samples at almost 22050Hz.
For FFT i’ve used Radix-4 FFT library you can find it here http://davidegironi.blogspot.it/2013/06/avr-atmega-audio-input-rma-using-fft.html.
The method to weighting the signal proposed here just use a weight table that contains the weight of the signal in the frequency domain, this table shoud be FFT size/2, because we can retain frequencies below Nyquist rate.Frequancyresponse A simple Sound Pressure Level Meter (SPL) dB audio meter using AVR ATmega
For more detail: A simple Sound Pressure Level Meter (SPL) dB audio meter using AVR ATmega

About The Author

Ibrar Ayyub

Ibrar Ayyub is an experienced technical writer with a Master's degree in computer science from BZU Multan University. He has written for various industries, mainly home automation, and engineering. He has a clear and simple writing style and is skilled in using infographics and diagrams. He is a great researcher and is able to present information in a well-organized and logical manner.

Follow Us:
Scroll to Top