Author Topic: SOUND PRESSURE LEVEL METER  (Read 619 times)

0 Members and 1 Guest are viewing this topic.

Offline uz1412Topic starter

  • Newbie
  • Posts: 1
  • Country: gb
SOUND PRESSURE LEVEL METER
« on: February 03, 2020, 04:59:03 pm »
Hi I want to build a sound pressure level meter using the atmega164p. I am unsure where to start. The objective is to sample a signal from a microphone and follow the envelope of the sound and display the signal level in dBs on some form of display. I know I need a sound sensor (microphone?) connected to an amplifier how would I decide on the right components for this? Please get back to me if you have knowledge on how to do this project. Thanks.
 

Offline sam[PS]

  • Contributor
  • Posts: 46
  • Country: fr
Re: SOUND PRESSURE LEVEL METER
« Reply #1 on: February 28, 2020, 06:52:45 am »
For the electret mic preamp i'd strongly suggest to see the video Dave have made with Doug Ford on this very subject on EEVBLOG.

If you don't expect too much precision the internal ADC might be enough. You might consider a variable gain preamp stage to increase your measure range without loosing too much precision.
Then there is the question of the frequency weithing. SPL meter don't measure flat on all the audio spectrum, they use special frequency response curves to try to match human hearing. Those are A-weighting, B, C or D. The most common is A and would give you the dBA value. If you go analog a crude but simple approximation would be a 1st order bandpass filter centered around 2.5KHz and with a very low Q. You could of course also digitalise the signal and perform this filtering in dsp but i'm not sure atmega have enough computing power for that.
Now it's about calculating true rms value, this can be done in digital on the MCU if you use a table for the square root or you can use an analog specialized IC before the converter, a crude version being a peak detector opamp circuit followed by a 1/2.8 voltage divider.

For a simple version i'd go like this :
electret mic -> mic preamp -> intermediate gain stage with stepped gain selector -> bandpass filter ~A weighting  -> MCU ADC in @41.1kHz -> didital processing for RMS calculation -> and bob's your uncle

That  would probably be a better measure then your smartphone SPL app, now if you want a really precise measure you'd probably need a better freq weighting and use a proper ADC. For a fully automated measure the intermediate gain stage should be digitally controlled. Of course all the analog part should be super low noise although i don't think anything out of the reach of a jellybean ne5532 except for the very first mic pre stage.

Hope that gives you some hint of reflection.

Just mu 2cts...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf