LED Current Indicator for Speaker Wire

AnalogKid

Joined Aug 1, 2013
11,044
With regard to my previous question about putting several LEDs in parallel: Having taken another look at your schematic, I'm thinking no modification to the circuit will be necessary to accomplish that (since C3 is essentially holding the comparator's output closed for a short period of time, giving all LEDs connected in parallel a path to ground). Correct?
Each LED should have its own current limiting resistor. You can pile them on but do not exceed the 393 output current max.

ak
 

Thread Starter

ljmccon

Joined Nov 27, 2015
35
I'll definitely have individual resistors -- but I wasn't aware that the 393's output current max was so low. 20mA? Is that right? That's only enough for one of my blue LEDs. Is there a more robust comparator that I could be using? Or should I use a higher voltage power supply so that I can connect the LEDs in series?
 

wayneh

Joined Sep 9, 2010
17,498
A comparator can only sink about 5mA and can't source at all That's fine for one LED but if you need more, just use a MOSFET. You'll need to reverse the logic or use a P channel.
 

Thread Starter

ljmccon

Joined Nov 27, 2015
35
If it's only 5mA, and I'm running this single blue LED (3.2Vf) with a 150-ohm resistor, am I not already significantly exceeding the max output current?

I really need at least 3 LEDs, although I would prefer 6. I would love to build that ability into my circuit, but I'm not sure I understand how a MOSFET fits into the equation. Would anyone be so kind as to draw a schematic with that integrated into AK's circuit and provide a brief explanation?

I'm soooo close to end of job on this. If I can figure out the following two things, I'll have everything I need.
1. How to integrate multiple LEDs without exceeding the 393's output current max
2. How to provide overvoltage protection to my circuit (Zener?)

Thanks to everyone for helping out so far -- I'm learning a lot, here.
 

cmartinez

Joined Jan 17, 2007
8,253
If it's only 5mA, and I'm running this single blue LED (3.2Vf) with a 150-ohm resistor, am I not already significantly exceeding the max output current?

I really need at least 3 LEDs, although I would prefer 6. I would love to build that ability into my circuit, but I'm not sure I understand how a MOSFET fits into the equation. Would anyone be so kind as to draw a schematic with that integrated into AK's circuit and provide a brief explanation?

I'm soooo close to end of job on this. If I can figure out the following two things, I'll have everything I need.
1. How to integrate multiple LEDs without exceeding the 393's output current max
2. How to provide overvoltage protection to my circuit (Zener?)

Thanks to everyone for helping out so far -- I'm learning a lot, here.
Integrating multiple LEDs is as easy as adding a transistor to your circuit. Something similar to this:

Capture.JPG
Adding additional LEDs is as easy as connecting them in parallel, with their respective resistors:

Capture.JPG

The 2N3906 is capable of currents of up to 200ma, so you should be safe by drawing 60ma from it, as the circuit shown above is doing.
 
Last edited:

wayneh

Joined Sep 9, 2010
17,498
I don't quite understand V1. A resistor should go from the base (or gate) of the transistor to +5V, to pull up the voltage when the LM393 goes "open". It cannot source current, only sink it, and the transistor should not be left floating.
 

cmartinez

Joined Jan 17, 2007
8,253
I don't quite understand V1. A resistor should go from the base (or gate) of the transistor to +5V, to pull up the voltage when the LM393 goes "open". It cannot source current, only sink it, and the transistor should not be left floating.
I know, V1 shouldn't be there. I only put it there for simulation purposes. To measure how much current the leds were drawing.
 

Thread Starter

ljmccon

Joined Nov 27, 2015
35
Okay, so here's what the circuit looks like, now -- and aside from not being as sensitive to low volumes as it was before adding the transistor, it seems to be working just fine:

Audio Detector LED Driver.jpg

Two questions:
  1. I want to make sure I understand what's going on with the transistor. My understanding is that the 1K resistor we put between the LM393 output and the transistor base limits the current through the comparator output to 5mA. And since the beta of the transistor is 100, the potential current through the transistor's emitter is 600 mA. However, since the transistor is rated for a max of 200mA, actually running 600mA would fry the transistor. So, I just need to make sure the resistors on my parallel LEDs keep the total current below 200mA. That means I could be running 13 LEDs at 15mA (120-ohm resistors) -- so I'm certainly safe with 6. Does this all sound correct?
  2. I put a 25V/5W Zener diode into the schematic (D1), but I haven't actually added it to my circuit, yet. Can anyone comment if this is the right way to add overvoltage protection to my circuit?
 
Last edited:

dl324

Joined Mar 30, 2015
16,922
The comparator driving the transistor needs a pull up resistor. Assuming a beta of 100 for saturation mode is a bit optimistic.

The zener voltage is too high to protect the input. Clamp voltage needs to be closer to supply voltage. Peak current needs to be limited.
 

AnalogKid

Joined Aug 1, 2013
11,044
Looks good to me. You've got the concepts down. Note that that 200 mA rating is for a transistor with adequate cooling. If you want to spread out the load a bit, do this:
1. Add a 10K resistor from U1B pin 7 to Vcc. This will assure turn-off of whatever the 393 is driving. do this even if you do not do steps 2 and 3.
2. change R8 to 2.2K.
3. Add a second 2.2K and 3906 to pin 7 so that U3B is driving them in parallel. Total base current will be slightly less that before, but each transistor can drive half your load and dissipate half the heat.

ak
 

wayneh

Joined Sep 9, 2010
17,498
Agree completely with 1 (as noted in #46) and 2, and zener comment by dl324. For point 3 I would just choose a p-MOSFET instead of the 3906. Then you could go wild on LEDs and not worry about heat or base current.
 

AnalogKid

Joined Aug 1, 2013
11,044
choose a p-MOSFET instead of the 3906. Then you could go wild on LEDs and not worry about heat or base current.
Not necessarily. Depending on the Rdson of the FET at a Vgs of less than 5 V, the transistor power dissipation could be greater than that of a lightly-saturated 3906. Datasheet, datasheet, datasheet... For a logic-level medium power part in a TO-220 package - sure, go nuts.

ak
 

dl324

Joined Mar 30, 2015
16,922
The OP has fallen victim to feature creep. This started out as a simple indicator that someone forgot to turn off the B speakers...
 

Thread Starter

ljmccon

Joined Nov 27, 2015
35
The comparator driving the transistor needs a pull up resistor.
Why does the circuit still work without it?

Assuming a beta of 100 for saturation mode is a bit optimistic.
Well, they wouldn't put it in Wikipedia if it weren't true. :D;)

The zener voltage is too high to protect the input. Clamp voltage needs to be closer to supply voltage.
I thought the LM393 was rated to handle up to 36V -- so why is a 25V Zener too high? When you say "supply voltage" are you referring to the power supply? So would the 5.1V/5W Zener I have on hand be best?

Peak current needs to be limited.
Given cmartinez's comments in #35, isn't the current already being limited by the extremely high impedance (relative to the 8 ohms of my speaker) built into the LM393?

Note that that 200 mA rating is for a transistor with adequate cooling. If you want to spread out the load a bit, do this...
With regard to suggestions number two and three: I'm only going to be driving six LEDs -- perhaps a total of nine sometime down the road, but that's unlikely. So, I think I'll stick with the single transistor for now...but good to know the fix if I have any problems. Also, the transistor I'm actually using is the metallic NTE equivalent of the 2N3906: the NTE159M. And its I(c) is 600mA. So, I think I'm all set, here.

The OP has fallen victim to feature creep.
I can understand why you think that -- but believe me, it's not the case. I had a very specific vision in mind for this project that hasn't changed -- and I'm pumped you all are helping me achieve it. Thank you!
 

marcf

Joined Dec 29, 2014
289
Why does the circuit still work without it?
The circuit is seeing (barely) +5v thru R7,R6. You really need to add a (aprox) 3k pull up.
As far as the circuit energizing, a 0v at the base of the NTE159W, limited by a 1k resistor, would give you approx 5ma of base current. A beta of 40 (200ma/5ma) would give you enough to source 200ma from the 5v PS.

Well, they wouldn't put it in Wikipedia if it weren't true
Please see the data sheet for the NTF159W and pay attention to "On Characteristics, DC Current Gain NTE159W, Note 1." Looks like you can rely on a Current Gain of 100 at 10ma, but not a Beta of 100 at 200ma continuous. Needs to be <= 300uSec with <= 2% duty cycle.

I thought the LM393 was rated to handle up to 36V -- so why is a 25V Zener too high? When you say "supply voltage" are you referring to the power supply? So would the 5.1V/5W Zener I have on hand be best?
The device has an internal over voltage input protection diode built into it, and is good for a max of 50mA. You may want to provide protection in case the input voltage goes more negative than 0v, though. A ordinary clamping diode like a 1n914 should work.
 

ian field

Joined Oct 27, 2012
6,536
My background: My knowledge of circuits is extremely basic. I aced physics in college several years ago so that I could get into med school – then promptly dropped out of med school and forgot everything I learned. :) So, you’re gonna have to talk to me like I’m five.

The situation: I have an A/V receiver that supports an ‘A’ set of speakers (which are in my living room) and a ‘B’ set of speakers (which are outside on the patio). My receiver is hidden away in a closet, and it allows audio to output to A only, B only, or A and B simultaneously. So, just because the speakers are on inside doesn’t necessarily mean they’re not on outside, too (which, if I’m cranking the volume, is an unwitting nuisance to my neighbors). I need to be able, at a glance, to determine whether the speakers are on out on the patio without having to get up, open the door, and stick my head outside – or make a trip into my closet where the receiver is located. (I know, I’m lazy.)

What I want to do: I want to install an LED (into a wallplate in the living room) that will illuminate when the outside B speakers are on.

What I’ve tried: I found some LED current indicators that I thought might do the trick. I bought this one and this one (0.75A turn-on), strung my speaker wire through them, and tested them out. Long story short, neither worked very well.

I'd go for as simple as I could possibly get away with.

The simplest I can think of is a current transformer, this could be anything from about 20 - 100 turns on a ferrite toroid and the primary might be as simple as passing one speaker wire through the hole. The secondary would produce enough voltage to light a LED with minimal drop on the speaker wire.

In some situations, current transformers can generate dangerous voltages unless properly loaded, the AC signal will certainly exceed the reverse breakdown of a LED, either use an inverse parallel pair of LEDs or 1 LED and 1 reverse protection diode in parallel.

The turns I suggested are just wild guess figures I pulled out of thin air - you might have to experiment a little. Ferrite cores sometimes don't like low frequencies, you could try an off the shelf audio output transformer and just loop the speaker wire round the central limb for the primary.

If you're using significant audio power; you'll need to clamp the secondary to protect the LEDs - 3 silicon diodes in series has about the right clamp voltage for a red LED.
 
Top