Author Topic: how to make led light up or transistor switch on when voltage drops to 5v??  (Read 5285 times)

0 Members and 1 Guest are viewing this topic.

Offline chaseTopic starter

  • Newbie
  • Posts: 2
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
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2842
  • Country: au
Sure, one way is to use a comparator circuit.  Have a search for that and we can go from there.
 

Offline kizzap

  • Supporter
  • ****
  • Posts: 477
  • Country: au
Hell you don't even need to use a comparator. A simple PNP transistor is all you need.
<MatCat> The thing with aircraft is murphy loves to hang out with them
<Baljem> hey, you're the one who apparently pronounces FPGA 'fuhpugger'
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10091
  • Country: nz
hell, you dont even need a PNP transistor, A 50cent 8pin MCU can do that easy.




(It had to be done)
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline electronwaster

  • Regular Contributor
  • *
  • Posts: 60
  • Country: au
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.
« Last Edit: June 28, 2014, 12:13:47 am by electronwaster »
 

Offline nowlan

  • Frequent Contributor
  • **
  • Posts: 649
  • Country: au
Did you want a battery low indicator? Plenty of circuits on google images.
 

Offline chaseTopic starter

  • Newbie
  • Posts: 2
wow.. thanks for all the help guys  ;D

how 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 all

I 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 lower

also, this circuit has to be kinda small
 

Offline jlmoon

  • Supporter
  • ****
  • Posts: 609
  • Country: us
  • If you fail the first time, keep trying!
check out Intersil's ICL8211.. not sure you can get any simpler than that. 

Recharged Volt-Nut
 

Offline Mr Smiley

  • Frequent Contributor
  • **
  • Posts: 324
  • Country: gb
TL431   :-+

 :)
There is enough on this planet to sustain mans needs. There will never be enough on this planet to sustain mans greed.
 

Offline katzohki

  • Frequent Contributor
  • **
  • Posts: 378
  • Country: us
    • My Blog
which 8pin MCU would  I use if I went that route ?

Pretty 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.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10091
  • Country: nz
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 level :P

A MCU i often use for simple tasks, though not this simple, is a 14pin ATTiny44, they're about $2

But 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.
« Last Edit: June 27, 2014, 09:42:17 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5105
  • Country: ro
  • .
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/1775257  6 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.
« Last Edit: June 27, 2014, 09:46:00 pm by mariush »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19672
  • Country: gb
  • 0999
What's the maximum supply voltage?

There's the MIC842 but the maximum voltage rating is 5.5V
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16895
  • Country: us
  • DavidH
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.
 

Offline electronwaster

  • Regular Contributor
  • *
  • Posts: 60
  • Country: au
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.
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1428
  • Country: us
  • Very dangerous - may attack at any time
Simple 2 transistor circuit. The JFET provides somewhat constant current to the LED as the voltage decreases.
 

Offline electronwaster

  • Regular Contributor
  • *
  • Posts: 60
  • Country: au
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.

Thanks
electronwaster
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
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.

See this article.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline electronwaster

  • Regular Contributor
  • *
  • Posts: 60
  • Country: au
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.
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1428
  • Country: us
  • Very dangerous - may attack at any time
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.
 

Offline onlooker

  • Frequent Contributor
  • **
  • Posts: 395
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.
« Last Edit: June 28, 2014, 11:46:30 am by onlooker »
 

Offline electronwaster

  • Regular Contributor
  • *
  • Posts: 60
  • Country: au
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.

I didn't worry about it, because he said:

Quote
I don't need battery low indicator

If 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?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16895
  • Country: us
  • DavidH
Tektronix used a modification of the two transistor low voltage indicator to make it flash.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf