SOUND PRESSURE LEVEL METER

Thread Starter

uz1412

Joined Feb 3, 2020
3
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 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.
 

Hymie

Joined Mar 30, 2018
860
The microphone amplifier section could be almost any op-amp with the desired bandwidth/gain, the output of which could then be rectified to give a dc voltage – fed to the microcontroller.

You could design/build the display section based on some arbitrary dc input signal.

The biggest problem with such a sound pressure level meter is the linearity of the microphone amplifier response and the calibration thereof.
You may need to use a look up table to convert the sampled voltage level to a dB sound level.

You will need to consider things such as sampling frequency and display refresh rate.
Many commercial sound level meters offer such measurement options as slow/fast response and weighting of the sound level (A, B, C etc). You need to decide on the measurement parameters you wish to incorporate in your design.
 

Thread Starter

uz1412

Joined Feb 3, 2020
3
Thanks for the reply. The next task I need to achieve is to design a PCB of the circuit so an amplifier with a microphone or sound sensor on a PCB together. Im not too sure where to start on the circuit. I was thinking of using a microphone or sound sensor with an opamp (would tl071 work?) to provide the gain but im not sure how to do this. Do you know of any circuits like this I could use and any sound sensors or microphones that could work with the opamp? I will then send the signal to the microcontroller which is atmega 164p.
 

BobTPH

Joined Jun 5, 2013
2,541
It’s not the linearity of the amp that is the problem, it is the non-uniform frequency response of the mic. The meter would have to be calibrated for that.

You can get a free app for your phone that will do a far better job than what you might build.

I use an app called AudioTools with a calibrated mic I bought separately. The mic comes with a calibration file done by the manufacturerthat you can use in the app.

The app also includes a pink noise generator and a spectrum analyzer that can instantly plot the frequency response of a speaker.

Bob
 

Thread Starter

uz1412

Joined Feb 3, 2020
3
It’s not the linearity of the amp that is the problem, it is the non-uniform frequency response of the mic. The meter would have to be calibrated for that.

You can get a free app for your phone that will do a far better job than what you might build.

I use an app called AudioTools with a calibrated mic I bought separately. The mic comes with a calibration file done by the manufacturerthat you can use in the app.

The app also includes a pink noise generator and a spectrum analyzer that can instantly plot the frequency response of a speaker.

Bob
Thanks for the reply. Its a University Project unfortunately. We have to design a Sound Pressure Level meter with the requirements I mentioned above.
 

Hymie

Joined Mar 30, 2018
860
Below are two circuits (an inverting ac amplifier and a precision full wave rectifier) from my op-amp cookbook – combining these two, you can create a circuit that will give a dc signal from a microphone input (the louder the microphone input, the greater the output dc signal).

One modification required is that the amplifier section should be driven from a dual rail supply with the shown 0V connected to minus rail voltage. Rather than connecting the non-inverting input to a resistor divider, it can be connected to the 0V rail via a 10kΩ resistor. The gain of the op-amp can be set depending on the microphone sensitivity.
For clarity the op-amp supply connections are not shown in the precision full wave rectifier circuit.
 

Attachments

Hymie

Joined Mar 30, 2018
860
This wiki article might also be of interest.
https://en.wikipedia.org/wiki/Weighting_filter
The dB sound scale has various weightings – most common is the dB(A) weighting which modifies the sound level in line with human perception of loudness at differing frequencies.
For simplicity, I would claim measurement as per the dB(C) scale from 50Hz to 5kHz, over a range where the weighting is uniform (does not change).
 

Audioguru again

Joined Oct 21, 2019
1,924
It seems that you are in a university course and are studying the applications of a microcontroller.
You have been requested to design a Sound Pressure Level meter and design and make a pcb for it. But you have not studied microphones, opamps or preamps and maybe not pcb design??
Are you allowed to simply copy the design from somebody but it might not even work?
Are you allowed to simply buy a microphone preamp and simply copy its pcb?
 

schmitt trigger

Joined Jul 12, 2010
320
One extremely important fact about audio is its very wide amplitude range.
That is the reason it is specified in decibels, to accommodate such a wide level range.

You could perhaps do no better than 40 dB range directly with a common microcontroller with a 10 bit ADC.
You would definitively require a switchable, variable gain preamp. And then a lookup table to convert the raw mVDC into a dB equivalent.
 

Audioguru again

Joined Oct 21, 2019
1,924
Many years ago I made a sound level meter with two LM3915 ICs in series for a range of 60dB. I needed to null the input offset voltage of the rectifying opamp.
 
Top