Go Down

Topic: How to measure sound level with microphone (Read 147 times) previous topic - next topic


I have a little doubt,

researching about how I can measure the sound level with a microphone, I found one solution, which I don't understand: In this solution, the Arduino reads in intervalls of 50 milliseconds the values of the microphone through analogRead. Then, the program saves the highest and the lowest value, to calculate the peak-to-peak value. But to get the sound level, isn't it sufficient to only save the maximum value, because the amplitude represents kind of the sound level? So why is this method recommended, where you calculate the peak-to-peak value?

Can you help me guys?


The method you have found is a simple approximation for measuring sound level. 

It is accurate for pure tones as peak to peak sound level is directly proportional to both the amplitude and RMS of a sine wave. Peak to peak is twice the sine amplitude and  2*sqrt(2) times the RMS. 

It is not exact if the amplitude of the audio changes over the time you measure it. 

In some applications, this approximation may be fit for purpose. It may not be in others. Depends on your application. 

Just taking the maximum would be inaccurate if your signal was not DC centred. this is the case for measurements made on most microcontrollers where the ADC range is 0-3.3V


After you are able to measure the sound level, you still have to calibrate against either a known loudness or by referring to a calibrated dB meter. Without calibration you can only say "this sound is louder than that sound" but you can not put a number in dB(A) on it.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.


You need the rms value to measure sound intensity - the average power in the signal is proportional
to the square of the rms amplitude.  Peak to peak values are misleading at best.

You need a measurement microphone, microphone preamplifier, then you can sample the signal
meaningfully.  And then you need to calibrate across the audio spectrum as all microphones
have a frequency response curve than needs to be compensated for.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Go Up