LM3915 peculiarity

Status
Not open for further replies.

Thread Starter

lowprofile

Joined Oct 31, 2011
33
I am building a "sound level meter". My prototype is based on this circuit at the following web site:
http://digitdiary.co.nr/2010/04/audio-level-meter-circuit-using-lm3915.html

It works fine with a normal audio input, ie, from my mp3 player. I want to make this work with a microphone.

I have an electret microphone and have hooked it up as following: +5V connects to a 1k resistor, and the other end of the 1k resistor connects to the anode of the electret microphone. Then the cathode of the microphone connects to ground. I have used a 1uF capacitor between the microphone anode and the signal input of the LM3915.

The problem:
This only works sometimes. If I turn on the LM3915 circuit without input, ALL of the LEDs are illuminated. Why is this?
If I connect it to the microphone circuit, all LEDs are illuminated as well. HOWEVER, if I first connect my mp3 player, the display works as it should, and THEN disconnect the mp3 player and instead connect the microphone, everything is fine.

I did measure the output of the microphone biasing circuit and the peak output is around 1.5V, similar to the output of the mp3 player.

I am confused as to what is going on. Any insight?
 

Thread Starter

lowprofile

Joined Oct 31, 2011
33
Further research shows that member Audioguru has created a device almost exactly as I wanted to create.. I can't find the instructions, however, perhaps because his website is titled something different than his forum username. Audioguru, if you are reading, please direct me to your plans! :)

Despite that, I am still curious why all the LEDs illuminate with no input to the LM3915. Thank you.
 

bountyhunter

Joined Sep 7, 2009
2,512
Further research shows that member Audioguru has created a device almost exactly as I wanted to create.. I can't find the instructions, however, perhaps because his website is titled something different than his forum username. Audioguru, if you are reading, please direct me to your plans! :)

Despite that, I am still curious why all the LEDs illuminate with no input to the LM3915. Thank you.
Probably needs a pull down resistor. If it is capacitor coupled the input may float high on it's own.
 

Thread Starter

lowprofile

Joined Oct 31, 2011
33
Thank you, bountyhunter, a pulldown after the coupling capacitor, of 100k, has solved the problem!

I will be adding to this now that it works. I will add a peak detector and a pre-amp of variable gain so that the sensitivity can be changed.
 

Audioguru

Joined Dec 20, 2007
11,248
My Sound Level Indicator project has been continuously working almost perfectly since it was made 6 years ago. The old 9V Ni-Cad battery failed so I replaced it with a modern Ni-MH one.

Your simple circuit has no input resistor to ground so the PNP input transistor at the input of the LM3915 causes its input to float high which causes all the LEDs to light.

Your circuit has pin 8 connected to ground so it works from an MP3 line level input. If a microphone is used as an input then it must have a preamp. My circuit has a preamp with a gain of 182 times made with two opamps.

The circuit you found DOES NOT WORK PROPERLY because pin 8 of the LM3915 is connected to 0V. The datasheet shows pin 8 has a resistor to 0V and a resistor to pin 7 so that the highest level LED lights when the input is +10V or more. your highest level LED lights when the input is only 1.25V or more then a few of the lowest level LEDs will light all the time.
 

Thread Starter

lowprofile

Joined Oct 31, 2011
33
Your circuit has pin 8 connected to ground so it works from an MP3 line level input. If a microphone is used as an input then it must have a preamp. My circuit has a preamp with a gain of 182 times made with two opamps.
The circuit you found DOES NOT WORK PROPERLY because pin 8 of the LM3915 is connected to 0V. The datasheet shows pin 8 has a resistor to 0V and a resistor to pin 7 so that the highest level LED lights when the input is +10V or more. your highest level LED lights when the input is only 1.25V or more then a few of the lowest level LEDs will light all the time.
Your circuit looks excellent, I would copy it as-is, but I wanted to understand things a bit better. :)

Q: How did you decide at a gain of 182? When I measure the peak-to-peak voltage output of the microphone, biased with 5V, I see that it hits up to 1.2V with very large noises (ie blowing on the microphone). What voltage level is suitable? (Also, why two opamps instead of the gain done in one stage?)

Q: I am trying to understand the reference pins, can you give me some more insight? I think I get RHI and RLO: I figured having RHI (pin 6) at the maximum voltage expected and RLO (pin 4) at the lowest (in this case, ground) would be enough. What is the purpose of Ref Adj (pin 8) and Ref Out then? In fact, some of the "Typical Applications" listed in the National Semiconductor datasheet show pin 8 tied to ground.

Thank you for your time, I appreciate it.
 

Audioguru

Joined Dec 20, 2007
11,248
Q: How did you decide at a gain of 182? When I measure the peak-to-peak voltage output of the microphone, biased with 5V, I see that it hits up to 1.2V with very large noises (ie blowing on the microphone). What voltage level is suitable?
VU meters never measure blowing into the mic, they measure weak real sounds. The sound pressure in my living room is about 75dB when the speakers or TV play loudly. Then the electret mic has an output of only about 0.007V peak. When it is amplified 182 times then the voltage to the LM3915 is 1.274 which lights the 10th LED since my pin 8 is connected to 0V.
My circuit also includes an AGC system that boosts low level signals 10 times more so it can show very low level sounds.

why two opamps instead of the gain done in one stage?
My second opamp plus a transistor is also the peak detector. You can make one like my attachment (it doesn't have the AGC of my circuit. The opamps must be able to work with a single polarity supply.

Q: I am trying to understand the reference pins, can you give me some more insight? I think I get RHI and RLO: I figured having RHI (pin 6) at the maximum voltage expected and RLO (pin 4) at the lowest (in this case, ground) would be enough. What is the purpose of Ref Adj (pin 8) and Ref Out then? In fact, some of the "Typical Applications" listed in the National Semiconductor datasheet show pin 8 tied to ground.
The reference voltage is adjusted like the LM317 with one resistor from pin 8 (ADJ) to ground and another resistor from pin 8 to pin 7 (OUTPUT).
 

Attachments

Thread Starter

lowprofile

Joined Oct 31, 2011
33
Ok, so looking at Audioguru's attached schematic, I think I get it, I wonder if this is correct:

I'll stick to the first stage. So, the microphone is given a power supply. Current is limited by R1. As sound moves the diaphragm, the voltage drop of the microphone changes (voltage divider), and thus the DC voltage going into C1 changes. C1 blocks the steady DC and allows the AC portion to pass. Then R4 is the pulldown that bountyhunter mentioned.

I understand (i think) that C1 and R4 form a high-pass filter. I can also see how R4 would tie the input to ground (whether it is the input to the op-amp or say, the input directly to the 3915) to prevent the input from floating. Is it correct to say that it does both?

Now, in this case, R4 doesn't tie to ground, but to the middle point of a voltage divider (R2, R3). This seems to be so that the audio signal is again riding on a voltage, this time 0.5*Vcc. This is so that the full signal is input into the op-amp, if R4 were instead connected to ground, then half of the signal would not be present because it can't go below 0V, correct?

This bias voltage of 0.5*Vcc will pass through the op-amp and then be removed again by C4. Gain is set by R5 and R6, where Gain = 1+ (R6/R5), but what is the purpose of C2?

I hope my questions aren't too tedious! I have learned about this stuff in my DC/AC and Circuit Applications classes, but these actual applications of the knowledge tread on the very edge of my knowledge. I can't express how grateful I am that there are knowledgeable and willing people out there. I'd buy you all a beer if I could! Or juice or whatever you're into. :)
 

Audioguru

Joined Dec 20, 2007
11,248
Ok, so looking at Audioguru's attached schematic, I think I get it, I wonder if this is correct:

I'll stick to the first stage. So, the microphone is given a power supply. Current is limited by R1. As sound moves the diaphragm, the voltage drop of the microphone changes (voltage divider), and thus the DC voltage going into C1 changes. C1 blocks the steady DC and allows the AC portion to pass. Then R4 is the pulldown that bountyhunter mentioned.

I understand (i think) that C1 and R4 form a high-pass filter. I can also see how R4 would tie the input to ground (whether it is the input to the op-amp or say, the input directly to the 3915) to prevent the input from floating. Is it correct to say that it does both?

Now, in this case, R4 doesn't tie to ground, but to the middle point of a voltage divider (R2, R3). This seems to be so that the audio signal is again riding on a voltage, this time 0.5*Vcc. This is so that the full signal is input into the op-amp, if R4 were instead connected to ground, then half of the signal would not be present because it can't go below 0V, correct?

This bias voltage of 0.5*Vcc will pass through the op-amp and then be removed again by C4. Gain is set by R5 and R6, where Gain = 1+ (R6/R5), but what is the purpose of C2?
You are correct.
C2 prevents the opamp from amplifying DC. Then it only amplifies the AC signal.

R7 biases the input of the second opamp at 0V. It is used as a peak detector that has a positive output voltages. It is a special opamp that works without a negative supply voltage but its inputs and output work at 0V.
R13 biases the input of the LM3915 at 0V (the pulldown resistor).
 

Alec_t

Joined Sep 17, 2013
14,263
Welcome to AAC!
Hijacking someone else's thread is considered bad netiquette. Moreover, you have resurrected a long-dead thread, so the chance of a satisfactory reply is small. You would be better starting your own thread.
 
Status
Not open for further replies.
Top