1
\$\begingroup\$

Given that for example I have a -38dB mic such as this one, how can you calculate the gain needed to match the range of the ADC(5v)?

I found this page explaining some basics, and some other questions on this site that give some ballpark numbers but not much background.

From my understanding -38dB=10-38÷20=0.0125V/Pa, which agrees with this calculator.

Now I looked up in some table that normal speech is about 60dB SPL, which would be 1060÷20×0.00002=0.02Pa which corresponds with another calculator.

This would mean a sound of 60dB SPL gives a voltage of 0.0125×0.02=25mV which means you'd need a gain of 4000 to gain even 1V (amplitude, rms, p-p?) and up to 20000 for 5V.

Designs I've googled had gains ranging from 40-1000, with a 200 gain breakout sitting on my desk. Sparkfun sells a board with a gain of 60, while the one by Adafruit goes from 25 to 125. This seem far cry from the 20000 I need according to my calculations to reach a range of 5V. Did I mess up my math somewhere, picked the wrong microphone, or is that just how much I need?

\$\endgroup\$
4
\$\begingroup\$

Your math is about right but what's missing is that

(a) 1Vrms is 2.8Vp-p for a pure sinewave and well over 5Vp-p for normal speech, so (even without headroom for speaking a little louder) 1Vrms is too much output from your mic amp into a 5V range ADC, you probably want some headroom - maybe6-12dB, so 0.5 or 0.25V rms for a 60dBa input.

(b) if you're measuring normal speech as 60dBspl, you're measuring it from some distance away - like, across a room. Or at least 1 metre.

So if you're building a bug for espionage purposes, a gain like 1000-4000 is probably what you need.

But for other purposes, speak into the mic and you'll need much lower gain, like the numbers you're seeing from other sources.

(c) Sound level control is HARD - for top sound quality you need an experienced guy continually monitoring and adjusting the gain. for other purposes, don't imagine the problem stops with the mic amp - often it's just the first gain stage (and optimised for good noise performance).

Later stages involve more gain, and frequently some way of adjusting the gain, like a compressor, limiter to keep the audio levels within acceptable limits.

\$\endgroup\$
  • \$\begingroup\$ I'm building a guitar tuner, so it will probably be at a small distance, higher RMS than speech, and would probably tolerate some clipping. So with that in mind a gain in the upper hundreds could make sense. (the 200x breakout is definitely on the low side) \$\endgroup\$ – Pepijn Sep 3 '16 at 18:52
  • \$\begingroup\$ 200x may be about right or even on the high side. I suggest making some provision to select more than one gain (maybe several 10dB steps) by switching in different resistors. You can clip the "pluck" transient and sample the decaying note for tuning purposes. \$\endgroup\$ – Brian Drummond Sep 3 '16 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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