how to make led light up or transistor switch on when voltage drops to 5v?? - Page 1
Forum section: electronics / beginners

author: chase
author_rank: Newbie
timestamp: June 27, 2014, 06:35:18 am
content: hello all..first time here.. I'm a beginner with building circuits .. wanted to know if its possible to light up an led or switch on a transistor when input voltage drops to set voltage.thanks

author: David_AVD
author_rank: Super Contributor
timestamp: June 27, 2014, 06:56:58 am
content: Sure, one way is to use a comparator circuit. Have a search for that and we can go from there.

author: kizzap
author_rank: Unknown
timestamp: June 27, 2014, 09:51:42 am
content: Hell you don't even need to use a comparator. A simple PNP transistor is all you need.

author: Psi
author_rank: Super Contributor
timestamp: June 27, 2014, 09:58:13 am
content: hell, you dont even need a PNP transistor, A 50cent 8pin MCU can do that easy.(It had to be done)

author: electronwaster
author_rank: Regular Contributor
timestamp: June 27, 2014, 01:00:49 pm
content: I think the component you need is called a schmitt trigger inverter. Possibly with a voltage divider on the input, if you don't want the trigger threshold to be around 2.5V.

author: nowlan
author_rank: Frequent Contributor
timestamp: June 27, 2014, 01:29:06 pm
content: Did you want a battery low indicator? Plenty of circuits on google images.

author: chase
author_rank: Newbie
timestamp: June 27, 2014, 02:41:03 pm
content: wow.. thanks for all the help guyshow would I use a transistor to do this ?which 8pin MCU would I use if I went that route ?to be honest I don't know how schmitt trigger inverters or comparators work .. I know it switches on and off at high and low threshold but that's about allI don't need battery low indicator as most of the circuit will work off of 12v+ but I need an led to light up when the circuit is at 11v or loweralso, this circuit has to be kinda small

author: jlmoon
author_rank: Unknown
timestamp: June 27, 2014, 03:09:48 pm
content: check out Intersil's ICL8211.. not sure you can get any simpler than that.

author: Mr Smiley
author_rank: Frequent Contributor
timestamp: June 27, 2014, 05:52:17 pm
content: TL431

author: katzohki
author_rank: Frequent Contributor
timestamp: June 27, 2014, 07:32:04 pm
content: Quote from: chase on June 27, 2014, 02:41:03 pmPretty sure that was meant as joke.A comparator is fairly straight forward. One input takes a known voltage (to compare to, say 11 volts off a divider) and another takes in your "test" voltage. Depending on how it's set up, if the test voltage is lower than your comparison (11) voltage then the output becomes "high".You said you don't need a battery low indicator, which is good. As a note; if you powered your comparator and your known voltage from the same battery that you are checking, you could run into trouble.

author: Psi
author_rank: Super Contributor
timestamp: June 27, 2014, 09:37:47 pm
content: Yeah, it was meant as a joke.But it would work, if your happy to write a simple page of code to read the ADC and set/clear a output pin based on the voltage.The advantage is that its code, so you can tweak the set limits however you want, programmatic or externally with pot or buttons etc..The disadvantage is that it's silly and total overkill using something more powerful that the Apollo flight computer to light an LED based on a voltage levelA MCU i often use for simple tasks, though not this simple, is a 14pin ATTiny44, they're about $2But you could do it with ATtiny5 which are around $1, but with a mcu that small you'd have to code it in ASM rather than C.Or im sure there's a 50c PIC that would work too.

author: mariush
author_rank: Super Contributor
timestamp: June 27, 2014, 09:44:19 pm
content: Joke aside, a PIC10F202T is just 55 cents if you buy one, 38 cents if you get 100:http://www.digikey.com/product-detail/en/PIC10F202T-I%2FOT/PIC10F202T-I%2FOTDKR-ND/17752576 pin surface mount (SOT-23-6), works from 2v, built in oscillator, 2 adc channels ...The programmer costs a chunk of money but if you have one already... it's cheap, smaller than a comparator (most likely), probably close to same price, may even fit in some led dimming/pwm or blinking inside the chip.. it's doable to write code in c, has enough flash.. to light/blink a led.

author: Zero999
author_rank: Super Contributor
timestamp: June 27, 2014, 10:31:35 pm
content: What's the maximum supply voltage?There's the MIC842 but the maximum voltage rating is 5.5V

author: David Hess
author_rank: Super Contributor
timestamp: June 27, 2014, 10:57:48 pm
content: You can do it with a single transistor, zener diode, two resistors, and the LED. Above the zener breakdown voltage, the transistor turns on shunting the LED. A microamp or nanoamp version would be a little more complicated.

author: electronwaster
author_rank: Regular Contributor
timestamp: June 27, 2014, 11:12:43 pm
content: I was messing around trying to make a single transistor and resistors do this with a self powered circuit.R3 and R4 create a voltage divider, sampling a section of the supply voltage. When the supply is at 12V (normal), then R4 is dropping enough voltage to turn on Q1. This shorts out R1 to ground, preventing the current from flowing through the LED and R2.When the supply drops to 11V, R4 no longer drops enough voltage to turn on Q1, so the current flows through R1, D1 and R2, lighting the LED.In reality this may prove too inefficient, too picky about resistor values and transister gain. I just thought it would be fun to try and make it work. At the very least you'd need a trim pot near R3 and R4.As someone else said, a Zener would be a better idea. I was just going for as simple as I could here.Edit: Green is the input voltage, Blue is LED current. I just used a sine wave to make it easy to test.

author: oPossum
author_rank: Super Contributor
timestamp: June 28, 2014, 12:34:31 am
content: Simple 2 transistor circuit. The JFET provides somewhat constant current to the LED as the voltage decreases.

author: electronwaster
author_rank: Regular Contributor
timestamp: June 28, 2014, 01:03:06 am
content: Hi oPossum,Could you describe how your circuit operates please (if you have time)? I tested it and it works well, but where the gate and source are tied together on the JFET confuses me. I thought there needed to be a voltage difference here for the drain and source legs of the JFET to conduct.Thankselectronwaster

author: c4757p
author_rank: Super Contributor
timestamp: June 28, 2014, 01:05:56 am
content: Nope. A JFET is a depletion-mode device, which means that it conducts by default, and you must apply a negative potential to the gate to shut it off.Seethis article.

author: electronwaster
author_rank: Regular Contributor
timestamp: June 28, 2014, 01:11:09 am
content: Ah - that changes things a lot! So a depletion mode JFET can basically be used as a two terminal current source. Very cool!Thanks c4757p.

author: oPossum
author_rank: Super Contributor
timestamp: June 28, 2014, 02:23:30 am
content: Yes, they make a simple current source. The current can be reduced and made a bit more stable with the addition of a source resistor. Most JFET have a VGS == 0 current of only a few mA, or even less than a mA. The J309 is one of the few that is around 10 mA (when VDS is high enough)- so good for use with LEDs.

author: onlooker
author_rank: Frequent Contributor
timestamp: June 28, 2014, 11:40:36 am
content: If the OP were asking for a low battery voltage warning circuitry, an additinal design consideration would be to minimize the power consumption by the monitoring itself.For example, the circuitry should cut down the current consumption at LED off state to,say, a few uAs.

author: electronwaster
author_rank: Regular Contributor
timestamp: June 28, 2014, 06:03:17 pm
content: Quote from: onlooker on June 28, 2014, 11:40:36 amI didn't worry about it, because he said:QuoteIf current consumption was important, could we pulse the whole circuit to come on 1-5% of every second? That'd cut down most of the wastage, and remain almost as useful.I'd be keen to see how to do it with just a few uA though?

author: David Hess
author_rank: Super Contributor
timestamp: June 28, 2014, 06:58:46 pm
content: Tektronix used a modification of the two transistor low voltage indicator to make it flash.