Measuring deciBell with BS2pe ??
K de Jong
Posts: 154
Hi all,
Has anyone of you experience in building an application to measure deciBells ??
This is as far as I got now:
I have a BS2pe + 12 bit ADC running.
I have a microphone + opamps and rectifier/capacitor for the electronic part of it.
I get a nice response on my display, when 'noise' goes up then my reading goes up as well.
That is very nice to start with but it's not deciBells yet :-).
One thing that puzzles me a bit is how to code the formula to calculate deciBells from the electric readings: 1 deciBell=20*log(U1/U2). Another thing is that I will have to physically switch the range of my opamps to get a usefull range that my instrument can display, maybe 40-130 dB.
Does anybody have experience in this field, or just a good idea. Any help will be appreciated.
Regards,
Klaus de Jong
Has anyone of you experience in building an application to measure deciBells ??
This is as far as I got now:
I have a BS2pe + 12 bit ADC running.
I have a microphone + opamps and rectifier/capacitor for the electronic part of it.
I get a nice response on my display, when 'noise' goes up then my reading goes up as well.
That is very nice to start with but it's not deciBells yet :-).
One thing that puzzles me a bit is how to code the formula to calculate deciBells from the electric readings: 1 deciBell=20*log(U1/U2). Another thing is that I will have to physically switch the range of my opamps to get a usefull range that my instrument can display, maybe 40-130 dB.
Does anybody have experience in this field, or just a good idea. Any help will be appreciated.
Regards,
Klaus de Jong
Comments
Good luck!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dr. Peter C. Charles
Director, Research and Technology
CyberBiota, Incorporated
Peter.charles@cyberbiota.com
http://www.cyberbiota.com
Once the data is in the stamp, it is not too hard to calculate the logarithm (hehe!). It is easiest to do it in base 2 and then convert to base 10, per this URL (several methods for different accuracy requirements): owlogic.com/BS2math3.htm
A range of 40db to 140 db a ratio of 10000:1.
20db ==> V1/Vo = 100
140db ==> V2/Vo = 10000000
==> V2/V1 = 10000
For example, if V2 is 5 volts maximum, then the minimum V1 is 0.5 millivolt.
That within the purvey of a 14 bit converter (16384 counts). And well withing the word size of the Stamp.
Or with your 12 bit converter, a range switched x4 / x1 amplifier.
I'm curious about your amplifier. Are you extracting the rms amplitude? Peak or average will be correllated to the average power, but that will depend on the waveform.
Other approaches would use a logarithmic amplifier, like the AD8304 or the Burr Brown Log112 or the MAX4206. They are tricky, though. The MAX4206 covers about 5 orders of magnitude, which is close to your requirement, and the AD8304 ($$!) covers about 8 orders of magnitude.
Another approach would be to buy a sound level meter that has a recorder output!
-- Tracy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
This info will help me one or more steps further!
The whole thing started off with idea to build a simple 'noise indicater' for a small and low cost datalogger. But now I'm working on it I'm getting caught by the aim to build a full deciBell meter. I'm just fascinated by the techniques that go cross borders of Stamp, ADC, math, physics and mechanics )))))).
My amplifier is just an ordinary opamp with a low output impedance and an integrater with a fast charge and a slow discharge. So it's a kind of peak detection enabeling the Stamp to take a sample once a second.
I will study the material you both presented to me and find the best way. The piece of math Tracy came up be will be very important for sure, the gain swithing/adapting and the logarithmic amplifiers will be inevitable as well.
I think I will walk on two roads from now. Road one for full precision and road two for compact and low cost.
Thank you both,
Klaus
PS is there somebody who can tell me a little more on A and C weighting of a deciBell meter?