Arduino dB meter / noise-level meter - circuit?

Hi,

See Microphone \ Learning \ Wiring.

I have this up on a breadboard, with a 1N4001 diode, according to the diagram, not the drawing (misplaced diode).
I have omitted the 1000uF cap across Vin/GND, didn't have one.

I'm getting a nice amplified signal on my scope from pin 5 of the LM386, but nothing after the diode.

Ideas? Have anyone tried this? Which diode did the designer actually have in mind? Do I need to change the values of the caps/resistors?

Do you have an alternate design? I have LM386's available + a few handfuls of transistors. And there's a bit of urgency, so waiting for delivery of components is undesirable.

If we can't get the circuit to work, do you have an idea to do the integration/envelope in SW on the Arduino?

The application is "how loud is it, on an arbitrary scale, right now". I need to catch peaks of ~100ms duration.

Give a try with IN4148 instead of IN4001

thoger:
...but nothing after the diode.

What is nothing ? Is the voltage 0V ? Is your diode the other way around ?

That type of diode is fine, no need to try another type. Is the diode good? Test it with a meter. Then disconnect the arduino and check the voltage level again. As for the 1000uF cap any cap here is better than nothing, use the biggest value you have.

The input capacitor 0.001uf is rather small, use 1uF instead. The best diode for that peak detector is schottky or 1N34. The peak detector has a time constant (t=kRC after the diode) where it keeps the voltage peek (you may calculate the t) so if you wait too long the 10uF capacitor discharges through the 2.2k resistor (if no input signal).

If you are interested in db, have a look at the AD8307 (Analog Devices) - it is a logarithmic amplifier which gives you 0.0-2.5V DC output (for your ADC) when the input signal is -80..+12dB (90dB range). It is a DIL8 chip, you need 1 resistor and ~3 capacitors and you get a calibrated db voltmeter.

Thanks, guys.

Update:

  • The "nothing after the diode" means the scope registers nada here. I haven't actually attached the Arduino yet.
  • The diode is the right way around, and looks good according to my multimeter.

What I hear is that the design is basically sound, and that we need some bug-fixing/tweaking. That's progress, too.

What I'll try, according to your suggestions is:

  1. Add a 100uF across Vin/GND, that's the largest I have (actually I tried this, but it dampened the output signal from the LM386, so I removed it). But it goes back in.
  2. Change the input cap to 1uF
  3. Replace the diode, just in case

Pito: Could I bother you with a further expansion of t=kRC? I assume that R is resistance in Ohms, the C capacitance in F, and t the time in s? But k?

Thanks in advance.

..pls mind your signal at pin 5 must be bigger than ~0.6Vpp to see something on the R2. The 1n4148 takes 0.6V off the signal, schottky 0.35V, and 1n34 0.2V. Do you have the gnds of the R2 and C2 connected to common gnd? Is the R2 really 2200ohm? Is the C2 really 10uF and polarised properly? Try to connect anode of the diode to 5V (and do disconnect the diode from the lm386 first) - you must read about 4.4V dc on the C2 and R2.
t=kRC - google "rc time constant"

thoger:
...
The "nothing after the diode" means the scope registers nada here.
...

Same question : What is nada ?
Do you mean it is 0V, both AC and DC ?
Place a radio or so in front of the microphone and measure the DC voltage after the diode.

Krodal:
[Place a radio or so in front of the microphone and measure the DC voltage after the diode.

..calculate the time constant first, it shall be k times bigger then 1/(lowest frequency in your signal) otherwise no big luck with DC..

pito:
If you are interested in db, have a look at the AD8307 (Analog Devices) - it is a logarithmic amplifier which gives you 0.0-2.5V DC output (for your ADC) when the input signal is -80..+12dB (90dB range). It is a DIL8 chip, you need 1 resistor and ~3 capacitors and you get a calibrated db voltmeter.

Something like this is highly recommended. I've used that chip and it's very impressive in both it's dynamic range and frequency response. The arduino analog input is a simple linear scale of voltage. Sound level is generally stated in logarithmic scales as practical sound level measurements covers such a wide dynamic range. So unless your desired measurement range is very small, I think you will be very disappointed in the results unless you have an external logarithmic amplification stage.

Lefty

Update:

  • The "nothing after the diode" means the scope registers nada here. I haven't actually attached the Arduino yet.

How about the other end of the diode (the output from the op-amp)?

Another suggestion - A [u]Precision Peak Detector[/u] puts the diode inside a feedback loop, and that will totally compensate for the ~0.7V diode-drop, allowing you to "detect" voltages below 0.7V.

You can proabably skip the 2nd buffer op-amp, but when I built a similar circuit I just used a dual op-amp.

I'm getting a nice amplified signal on my scope from pin 5 of the LM386, but nothing after the diode.

How big is this signal, it has to be greater than 0.7V before anything comes out of the other side of the diode.

Hi guys,

Thanks so far. I've added a 100uF across Vin/GND, changed the input cap to 1uF and replaced the diode.

My multimeter says about "2V" is coming out of LM386 leg 5. My "scope" is a soundcard probe with Zeitnitz Scope, and I'm not confident about it's Vpp metering. However, I temporarily replaced the diode with a LED, and got light according to soundlevel, so we're not totally off scale.

I tried connecting the anode of the diode to 5,4V (having disconnected the diode from the lm386 first), and got 4.9V dc on C2 and R2.

I'm still roughly getting the same results.

I get to play with this again on Sunday. Will rip everything apart and build from scratch then, by now I'm seeing ghost in broad daylight. Thanks, guys.

Hello

I am searching for a solution about make an decibel meter based on arduino, and I found the circuit of Philips- NXT: AN 1991, that is an Audio decibel level detector with meter driver. I would like your opinion about it.

Link:
http://ics.nxp.com/support/documents/interface/pdf/an1991.pdf

Looks interesting. But where can you buy it?
Octopart doesn't list it anywhere available for sale.

Hello vasquo

Thank you for the answer.

I didn't found it do buy too, but I intend to mount that circuit. Moreover, I am not sure that it will be useful to make an Arduino based audio decibel meter. And I have some doubt about the conection to arduino and to the microphone. Because I am expert about arduino and sound circuits. If you or someone here in our community could help me with any tip, I would be so grateful.

Sorry, I wanted to say that "I am NOT expert about arduino and sound circuits".