Best way to make an LED turn on only when a certain voltage is reached?

Thread Starter

SiegeX1

Joined Mar 10, 2009
25
I want to have an LED turn on when ~10V power is applied. I was thinking on using a Zener diode in series with the LED as shown in the attached screenshot. This seems to work fairly well, the LED starts to come on right around 9V and is drawing 20mA right around 10V. Is this a suitable way of doing what I want?

Thanks
 

Attachments

Jaguarjoe

Joined Apr 7, 2010
767
If you put a ~6v zener in series with a ~2 v LED, that's 8v. With 10v coming in your resistor needs to be R = E/I = 2/.02 = 100 ohms to eat the extra 2v. With the 50 ohm resistor in there now, the current will 40ma, a bit much for the LED. OTOH, at 9v with the 100 ohm resistor, I is now 10ma. Safe for the LED and it still lights up.
The other way to go is with a comparator or a cheap 8 pin uC to get exact on/off points, but this might be over complicating things.
 

Wendy

Joined Mar 24, 2008
23,415
I've done the circuit with the zener. It works but the display is "mushy". There is no clear transition, everything is gradual. If this is good enough, then all is well.

A comparitor is anything but mushy, it is on or off, no in between.

In my article LEDs, 555s, Flashers, and Light Chasers in Chapter 3, The LED / Resistor Only Bargraph I describe how to use the Vf to make a crude bar graph. Like the zener circuit, it is mushy, it takes 3 or so LEDs to make a full transition between lite and dark, but it works. There are chips that have the comparitors in there that will do the same thing much cleaner.
 

Thread Starter

SiegeX1

Joined Mar 10, 2009
25
Thanks for the replies and the suggestion about using a comparator. I mocked up a circuit with a comparator as seen in the attachment below. Any gripes with me using a diode's forward voltage to step down the Vm input so it's not right at the rail? Also, any problems with using 30k resistors? The SPICE results with a DC-sweep from 0-15V seem very promising but I know simulation is no replacement for real-world experience.

Thanks
 

Attachments

#12

Joined Nov 30, 2010
18,224
This circuit is not as tight as yours, but I achieved "from nothing to saturated" in two tenths of a volt by putting about 12.6 volts through a 12v zener to a 91 ohm resistor, then a 1k to the base of an npn, and the final adjustment is with a resistor from the base to ground. Generally 2.2k to 4.7k gives a few tenths of a volt threshold adjustment.

of course, the LED is in the collector circuit with a 1.2k current limiter.

I this isn't too sloppy for you, it only requires a transistor, not a comparator. If you're lucky, you get what you pay for. More transistors cause sharper results.
 

Thread Starter

SiegeX1

Joined Mar 10, 2009
25
I this isn't too sloppy for you, it only requires a transistor, not a comparator. If you're lucky, you get what you pay for. More transistors cause sharper results.
Thanks for this idea, I threw it into LTspice and it worked great! I wanted to make another circuit for a 5V LED and I can use this with a dual NPN IC. I attached schematics for both the 10V and the 5V versions with waveforms in case anybody else wants to follow this design.

Thanks
 

Attachments

#12

Joined Nov 30, 2010
18,224
Don't forget, you can put a resistor from VB to ground and get a little bit of adjustability.

I'm glad I could get you that little bit more of what you needed with a simple circuit. It makes my efforts feel worthwhile.
 

Thread Starter

SiegeX1

Joined Mar 10, 2009
25
Regarding the LM339. Is there a way that I can use this to drive an LED after the non-inverting input crosses Vref and also have the output latched such that when the comparator goes high it stays high until power is removed?

I have a Current Sense IC which puts out a voltage between 0-2V depending on the current running through it (5 amps at full scale). I want to use a voltage comparator to detect this IC's output voltage and if it goes over 1V I want to both drive another IC's 'Disable' TTL input as well as turn on an LED indicating the device is disabled. The app notes for this Current sense IC suggests connecting a diode from the comparators output to the non-inverting input. I tried doing this in LTspice but it completely destroyed its functionality.

I have a feeling that the comparator in the app notes does not have an open collector output, but rather a push-pull/totem-pole. The problem is I'm having a hell of a time finding a reliable voltage comparator with push-pull output stage that can directly drive an LED at 20mA.

Any suggestions?

Thanks again!
 

Ron H

Joined Apr 14, 2005
7,063
Regarding the LM339. Is there a way that I can use this to drive an LED after the non-inverting input crosses Vref and also have the output latched such that when the comparator goes high it stays high until power is removed?

I have a Current Sense IC which puts out a voltage between 0-2V depending on the current running through it (5 amps at full scale). I want to use a voltage comparator to detect this IC's output voltage and if it goes over 1V I want to both drive another IC's 'Disable' TTL input as well as turn on an LED indicating the device is disabled. The app notes for this Current sense IC suggests connecting a diode from the comparators output to the non-inverting input. I tried doing this in LTspice but it completely destroyed its functionality.

I have a feeling that the comparator in the app notes does not have an open collector output, but rather a push-pull/totem-pole. The problem is I'm having a hell of a time finding a reliable voltage comparator with push-pull output stage that can directly drive an LED at 20mA.

Any suggestions?

Thanks again!
Do you need a logic high to drive the Disable input? What is your logic high voltage (+5V, +12V, ...)?
 

Thread Starter

SiegeX1

Joined Mar 10, 2009
25
The datasheet for the Si8233 MOSFET driver which has the DISABLE input pin seems to imply 2V via the VIH spec on page 6.

Also, while I'm linking to datasheets, here is the link to the app note I mentioned in my last post which shows the latched voltage comparator on page 2.

To make it a bit easier for you guys, I've taken a screenshot of the relevant app note circuit and attached it. I still want to also drive a LED which the app note circuit doesn't show.

Thanks all
 

Attachments

Thread Starter

SiegeX1

Joined Mar 10, 2009
25
Hi Bill,

The problem isn't so much 'how do I drive an LED with an open collector comparator', that I know.

It's 'how do I drive and LATCH the output HIGH (with minimal components) AND drive an LED?
 

Thread Starter

SiegeX1

Joined Mar 10, 2009
25
So I think I found the comparator to do what I want...the LT1116. It has a LATCH input pin that works at logic levels. I tied the output to this pin and when the output went high, it stayed high. I've given up on trying to find a comparator that can both do this AND directly drive an LED so I just used an NPN to do that. See attached schematic. Anybody see anything wrong with this?

Thanks
 

Attachments

Ron H

Joined Apr 14, 2005
7,063
I found a comparator, but it can only source/sink 10mA. Is that enough for your LED?
It has a latch input, so if you feed the output back to Latch, it will never change output states until it is powered down. I'm not sure what it will power up in the right state, although it did in the simulation.
Unfortunately, it's $4.00 at Digikey, and it's a 7ns comparator, which is overkill.
See the attachment.
 

Attachments

Jotto

Joined Apr 1, 2011
151
I don't mean to get this conversation off track, but what is the program you both are using? Its very impressive.
 

Thread Starter

SiegeX1

Joined Mar 10, 2009
25
I found a comparator, but it can only source/sink 10mA. Is that enough for your LED?
Looks like we had very similar ideas! The LT1116 (which is pin compatible to the LT1713) actually says +/-20mA on it's absolute maximum rating. If I run this at 15mA and look for a super bright Red LED, I think 15mA should be just fine.

Also, thanks for the idea of using a battery to establish a 5V rail and then use net names for the +5V; makes the schematic much cleaner.

I don't mean to get this conversation off track, but what is the program you both are using? Its very impressive.
It's called LTspice, it's actually a fully featured CAD program which was procured by Linear Technologies and given out for free so people can model Linear's IC's. However, as you can see its very flexible and since it uses SPICE, you can simulate any IC that has a spice model for it.
 
Last edited:

Thread Starter

SiegeX1

Joined Mar 10, 2009
25
I contacted Linear to see if it was kosher to tie the Output pin directly to the latch pin and they said doing this would put the Output pin in an undefined state upon power-up. They suggested that I put a 1K series resistor between the two pins and then use an NMOS to connect the latch pin to GND and have an external control signal turn on the gate for ~0.5ms to allow the system to settle on a known (low) state.

This advice is sound, but the glaring problem is that it requires an external control signal to do this; that just really isn't acceptable. I racked my brain a bit and I *think* I came up with a way to do functionally the same thing with no added external signals but I really could use some expert advice as to whether or not this looks like it will work.

My idea is to use a P-channel JFET instead of an NMOS since the J-Fet's channel is normally on. Next, I'll tie the gate of the JFET to the +5V rail through an RC circuit who's time constant is such that the gate voltage won't pass Vth(off) until roughly ~0.5ms. I'm thinking on using the PMBFJ175 P-CH JFET since it has a Vgs(off) of 3V. It's on-resistance is 125ohm which is a bit higher than I would have liked but I think it's OK for this application as I'm not going to be drawing much current to pull the latch pin low. What do you guys think?
 

Attachments

Top