Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I am taking input from an electret mic amplified using LM358 amplifier from my PIC16F877A's ADC unit. I am getting the readings in Volts from the ADC which ranges from 2.5V to 5V. How can I convert these readings into dB?

share|improve this question
    
Use the sensitivity figure given in the microphone's datasheet. –  Brian Drummond Jan 12 at 13:22
    
Here is the datasheet of the mic:- dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Sound/… –  user35456 Jan 12 at 13:32
    
It's sensitivity is -46±2.0,(0dB=1V/Pa) at 1K Hz. –  user35456 Jan 12 at 13:33

2 Answers 2

up vote 5 down vote accepted

DB SPL is a pressure measuring unit.

You can't convert a voltage to an DB SPL reading unless you know:

  • the microphone sensitivity (or simply the analog output voltage to the input pressure ratio) which tells you essentially the voltage level it will output for a given sound pressure level
  • the gain that the preamp has applied

Your microphone has a sensitivity of -46dBV/Pa , this gives 0.005012 V RMS/ Pa
1 Pa (pascal) equals 94 dB sound pressure (SPL)

The dB equation for voltage is \$ 20 \times \log \frac {V_1}{V_o} \$
where V1 is the voltage being measured, and \$ V_0 \$ the reference level

If we do an example calculation for the measurement of 2.5v (assuming a unity gain for the amplifier) we get

\$ 20 \times \log \frac {2.5}{0.005012} = 53.96dB \$

so the SPL will be (-46) + 53.96 = 7.95 + 94 = 101.95 Db SPL

We assumed a unity gain for the preamplifier, if the actual gain was 20dB then the SPL becomes
101.95 - 20 = 81.95 Db SPL

if the actual gain was 10dB then the SPL becomes
101.95 - 10 = 91.95 Db SPL ...

share|improve this answer
    
I knew the mic's sensitivity: It's sensitivity is -46±2.0,(0dB=1V/Pa) at 1K Hz But nothing about gain that the preamp has applied –  user35456 Jan 12 at 13:42
    
I suppose you could calibrate the preamp, or even use its ideal equations as a very close estimate. –  Scott Seidman Jan 12 at 16:15
    
@alexan_e: Thank you very much. Just one more help in detemining the gain of my OpAmp. –  user35456 Jan 13 at 5:09
    
@user35456 You said you are using a LM358 preamp so the gain is set with the resistor values you have used and should be definable. For example, if it looks like this then the gain is set by R2,R1. Also check if you have applied any gain in your ADC (I'm not familiar with PIC ADC) –  alexan_e Jan 13 at 8:14

-46dB V/Pa is how I read it and 1 Pa is the sound pressure in newtons per sq metre. 0dB SPL is 20 micro Pascal therefore, 1 Pa is 50,000 times bigger or, in dB it is 94 dB SPL.

So, if you are measuring -46 dBV then you are measuring a SPL of 94 dB. -46 dBV is near enough 5 mV RMS so, again, if you measure 5mV RMS then the SPL is 94dB.

If you have a pre-amplifier with a gain of ten, then 50mV RMS equates to 94dB SPL and 5mV would equate to a SPL of 74 dB.

This should be enough to get you started.

share|improve this answer
    
So, how to convert the volts I'm getting in the RMS?? Just divide it by sqrt(2)? –  user35456 Jan 12 at 14:29
    
I think you need to explain what you are measuring from your ADC. If it were me I'd be sampling at 50kHz and calculating RMS by squaring each sample, averaging and then taking the sqrt of the average. I have no idea how your code works or what it does. –  Andy aka Jan 12 at 15:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.