SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Mee_n_Mac
#173566
ptoole wrote:Will noises over 60 db be excessive for sparkfun's sound detector? ( sparkfun sound detector SEN-12642)
Not according to this question and response on the product page. Note the part I underlined.

Member #557692 / about 2 weeks ago / 1
What is the unit of the enevelope output? Is the value I get there directly dBs or something different? I am trying to make a simple Sound Meter.

Byron J. / about 2 weeks ago / 2
The envelope is an approximation of volts peak-to-peak. It’s not calibrated to any particular unit or absolute reference. The inexpensive microphone on the front end has fairly wide tolerance on its sensitivity, meaning every unit responds a little differently.
To make a simple relative dB meter, you could read the envelope using the ADC on a microcontroller. Binary encoding actually forms a shorthand for decibel levels - each successive bit position in the conversion value equates to another 6 dB SPL. It’s coarse, but not very hard to do.

Member #557692 / about a week ago * / 1
Thank you, that works pretty well! Also, that would technically mean that it only measures up to about 66db (if the starting point is 0dB). Is that correct?

Byron J. / about a week ago / 1
More or less, depending on the data width from the ADC - every bit in the output gives you another 6 dB. 66 dB range equals 11 bits of ADC data, a 12-bit ADC might get you to 72. Much beyond that, and you’re probably limited by the self-noise of the system.
You could extend the overall range by adjusting the gain resistor. I’ve got an old analog SPL meter that does that. The needle only reads over a 16 dB range, but it has a range switch that adjusts the gain to re-center that range on 10 dB increments, from 60 to 120.

Member #557692 / about a week ago / 1
Sweet. Last question, I swear, what is the formula to calculate the range from a newly adjusted gain (I saw how to properly adjust the gain on the board in your tutorial)? (I am trying to measure airplane engine noise, talking more 90 - 120dBs).

Byron J. / about a week ago * / 2
The gain adjustment is an inverting opamp stage. The giverning equation is

Vout = -(Rfeedback/Rinput)*Vin

If we assume that we’re putting in 1 Volt, then we can simplify to just the ratio of the resistors -(Rf/Ri). This coefficient is referred to as the “arithmetic gain” of the circuit - input voltage will be scaled by that factor to become the output voltage.

For the default configuration, that’s -100k/1k, which simplifies to a factor of -100.
To convert arithmetic gain to relative dB, use the following equation:
dB = 20 * log(abs(Arith. gain))
The default configuration gets the gate to trip on moderate sound levels, maybe around 70 dB SPL. If you want to work in the 90 to 120 range, reduce the gain a bit - try a 10K or 22K resistor for R17.

Member #557692 / about a week ago / 1
Thank you! That was a very helpful and very knowledgeable answer.
By ptoole
#173642
Reply from me-n-mac: Not according to this question and response on the product page. Note the part I underlined.

What I meant: Will actual sound pressure that exceeds 60db, or even 80db, as measured by a db meter, be too high for the electret microphone on the SparkFun sound detector? Will those high sound levels saturate the electret mic? What I want to do is use high level sound pressure to control other circuitry.
By Mee_n_Mac
#173643
From the above and the product page ...
The default configuration sets the gate to trip on moderate sound levels, maybe around 70 dB SPL. If you want to work in the 90 to 120 range, reduce the gain a bit - try a 10K or 22K resistor for R17.

From that I infer the mic is not saturated at your 80 dB SPL level. But e-mail SFE tech support and perhaps they can give you the mic specs.
By ptoole
#173644
Mee_n_Mac wrote:From the above and the product page ...
The default configuration sets the gate to trip on moderate sound levels, maybe around 70 dB SPL. If you want to work in the 90 to 120 range, reduce the gain a bit - try a 10K or 22K resistor for R17.

From that I infer the mic is not saturated at your 80 dB SPL level. But e-mail SFE tech support and perhaps they can give you the mic specs.
Mee_n_Mac, Thank you; your information will be very helpful.
By dlotton
#173671
Not sure what your application is, but you might be able to attenuate the sound pressure signal before it gets to the microphone (e.g. a foam hat on the microphone or baffle of some kind), leaving the circuit unchanged.
By hobbyist_14
#182977
Hi,

Just want to seek further assistance on binary encoding, so if each bits equates to 6 db level. am i right to think


sensor = 10011 = 30 dB ??

where sensor value is my analog read of Envelope pin of the detector.