Transistor not switching LED on and off cleanly

Thread Starter

colin.t

Joined Jul 6, 2018
16
Hi everyone, I hope you can help. I am trying to make a small circuit that will switch on a LED when the supply voltage is 12.5 or above. This is to simply indicate that the battery is fully charged when a button is pressed. I have tried this circuit (see attached), it sort of works, but rather than a clean switch on and off, it sort of dims at around the correct voltage and only switches off when the supply gets down to around 11.4v. and the same on raising the voltage. I hope that someone could help me with this. Thank you, Colin

MOD: opened your PDF file to show image.

AA1 31-Aug-18 13.13.gif
 

Attachments

ericgibbs

Joined Jan 29, 2010
9,574
hi Colin,
Your circuit will have a poorly defined switch On/Off level, it is basically not suitable for your purpose.
Are you able to buy a LM393 or similar comparator IC.?
E
 

Dodgydave

Joined Jun 22, 2012
8,872
You have no Hysteresis on the circuit , ideally i would use a TL431 zener and set the voltage accuratly with two resistors R1,R2,

Or if you want to use transistors, then you need to use a Schmitt trigger .

12v-battery-monitor-with-tl431.jpg
 

crutschow

Joined Mar 14, 2008
24,405
Here's the LTspice simulation of Dd's circuit in post #3 (modified to trigger @ 12.5V).
The circuit trips when the voltage at the TL431's adjust pin equals 2.5V.

(If you want the voltage to be adjustable, use a 10kΩ pot in place of R2 and R3 [wiper to the TL431 adj pin]).

upload_2018-8-31_9-23-16.png
 
Last edited:

MrChips

Joined Oct 2, 2009
20,338
Here is a simpler circuit. The light transition is not abrupt but might be suitable for your application.
Try different colour LEDs. Blue gives a nice transition at 12.5V.

Battery Indicator.jpg
 

crutschow

Joined Mar 14, 2008
24,405
Here's an LTspice simulation of the basic LED-Zener circuit in post #6.
As can be seen, the transition is not real sharp due to the soft current-voltage characteristics of both the LED (blue trace), and the Zener (green trace).
The tolerance of the zener voltage will also have a significant effect on the transition point.

upload_2018-9-1_13-11-36.png
 
Last edited:

MisterBill2

Joined Jan 23, 2018
5,244
There is a simple circuit that I have used a few years back, it uses a green LED as the voltage reference and a red LED controlled by the transistor as the indicator. As the voltage drops below some value the red LED comes on. I think that the circuit used a PNP transistor. Unfortunately I did not save a copy of the circuit diagram.
 

MrChips

Joined Oct 2, 2009
20,338
I think I like the soft transition, somewhat like an analog meter. It provides a visual indication of how close you are, below and above the 12.5V threshold.
 

MisterBill2

Joined Jan 23, 2018
5,244
I think I like the soft transition, somewhat like an analog meter. It provides a visual indication of how close you are, below and above the 12.5V threshold.
I wish that I could remember that circuit. It was very simple, 2 leds, one transistor, and just a few resistors.
 

crutschow

Joined Mar 14, 2008
24,405
If you want to use more than one LED to indicate voltage, then you might consider an LM3914 dot-bar display IC.
You can use anywhere from two to ten LEDs.
 

crutschow

Joined Mar 14, 2008
24,405
Here's the Tl431 circuit modified to light a red LED when the voltage is below the threshold and a green LED when above.
That way you have an indication that the circuit is working whether the voltage is high or low.

At the transition, the LEDs will change over about a 65mV region with both being on to some degree during the transition.

Two red LEDs are used in series to get sufficient threshold voltage so that they completely go off when the green LED turns on.
(The minimum TL431 ON voltage is about 2V).

upload_2018-9-1_23-37-14.png
 
Last edited:

danadak

Joined Mar 10, 2018
3,912
The single zener approach also has an issue associated with modern
LED efficiency, that is Zener leakage can cause the LED, when "off",
to exhibit a low luminance "glow" that can be distracting. LED can exhibit
this phenomena with uA of current flowing thru them.

Regards, Dana.
 

Thread Starter

colin.t

Joined Jul 6, 2018
16
Hi All. Thanks for all of the replies. I want to make this as simple as possible so I think I will try post 6 first and see how that works for me. I just want to have a single LED for this application. I have used the LM3914 on the last project which works perfectly, but need to get this project smaller (sad that Texas no longer make the through hole version, I have had to use the SM one). Will be in contact when the parts arrive. Thanks again, Colin
 

Thread Starter

colin.t

Joined Jul 6, 2018
16
I have tried the simple version in post 6. it works really quite well (thanks MrChips). It switches off nicely at 12.5v falling, but it changes intensity on raising voltage until full on at 13.5v. I will now try post 5 and see if that is better, Thanks, Colin
 
Top