# Transistor not behaving as expected

Discussion in 'General Electronics Chat' started by atanumukerji, May 31, 2011.

1. ### atanumukerji Thread Starter New Member

Apr 1, 2011
18
0
I am trying to drive a 1W LED from 4 1.2V NiCd cells. My intent is to cut off the power to the LED when the battery falls below 4.2 V and light up a RED LED to let everyone know that the batteries need to be recharged.

My circuit is attached. Please let me know what am I doing incorrectly.

The transistor Q1 is driving the 1W LED well by pumping around 200mA of current, but when the transistor Q1 cuts-off I hope that at that point Q2 would turn on, thus lighting up the RED LED. Am I missing something?

The latter part does not seem to work.

Any help is greatly appreciated.

-AM

• ###### 1W lamp.png
File size:
5.5 KB
Views:
59

Apr 30, 2011
1,426
364
I didn't analyze it very thoroughly but at a glance R5 looks to be far too high to ever allow the red LED (D2) to illuminate.

3. ### Laird Scooby New Member

May 31, 2011
11
0
The trouble is, when the 1W LED turns off because the battery voltage has dropped and Q1 is no longer conducting, it presents as an open circuit between +ve and the base of Q2. I can see where you're going with this and would suggest moving the resistor from the cathode of the 1w LED to the anode. This way when the 1W Led is on, the voltage at the anode will be approx 2.2V (based on a normal LED) and when it turns off, it will be approx 4.2V so you may have to experiment with the value of the base resistor for Q2.

Hope this helps!

4. ### mbohuntr Active Member

Apr 6, 2009
413
32
Assuming no effect from Q2,
4.2V-1.8Vled = 2.4V
2.4/ .02amps = 120 ohms. (R5)

Take this with a grain of salt, as I still make many mistakes and incorrect assumptions. I do not use more than 20mA for standard LED's as I know they stink when they burn....

5. ### Kingsparks Member

May 17, 2011
118
5
KJ6EAD is correct and so is mbohntr.

That is if the LED is a 1.5V. If it is a 3.5 then you have to crank that into the figures. By the by. since the 1W LED is on and the red is off it could be as simple as changing the value of the resistor R5.

Be aware you still have .6V at the collector of Q1 when it's on and that may be enough to turn on Q2. If so you need to set up a voltage divider to take that .6V low enough it does not turn on Q2 but Q2 will turn on when Q1 turns off. You should have 4.8V at the collector of Q1 since there is no current flow through the Q1 circuit when it is off.

Calculate the saturation voltage for Q2 from that. There will be a slight amount of base current through Q2 but it should not be enough to affect your calculations.

Disclaimer: I am not an EE, just a technician and have been known to be wrong a time or two. I think that is correct, anyway won't hurt anything to try.

6. ### Laird Scooby New Member

May 31, 2011
11
0
Good point about the collector of Q1 Kingsparks, i should have thought of that but in fairness, i'm a bit rusty (like nearly 20 years rusty!) although it did cross my mind to mention putting a small signal diode in series with the base of Q2 to eliminate that problem - i just forgot to put it in my previous post as i was in a hurry to go out to walk the hound! A suitable diode would be a 1N4148 - no need for big current capacity as we're only talking μA for the base current of Q2.
Don't forget to deduct the 0.6V for the diode from the bias resistor calculations though.

Dec 26, 2010
2,147
300
I've had a bit of a play with this, but can't get it to work decently with two transistors, except with ridiculously low bias resistors for the first transistor bias chain. The problem is that with 200mA collector current, the transistor input impedance won't be more than a few tens of ohms (unless it has an extremely high current gain).

The indicator LED needs to go in series with the collector of its drive resistor, as otherwise it is hard to get enough voltage to drive it - even with a bleed resistor across the main LED.

Here is my version, using a third PNP transistor to do the voltage detection. It is still not much good, but perhaps may help you as a learning exercise. Note that my freebie simulator does not have the right LEDs, so you would have to adjust the resistor values to suit.

Edit: This time with a real transistor for Q3, but note this thing is never going to be very predictable. If you really want to sense supply voltages properly, a band-gap reference would be more the thing, or even one of the power monitor devices made for the job.

• ###### LED_3.png
File size:
175.7 KB
Views:
27
Last edited: May 31, 2011
8. ### Kingsparks Member

May 17, 2011
118
5
I noticed you are using LTspice. I just downloaded the free version also but have not able to get my head around it yet. I use WinQcad for schematics and as far as I know they should be able to interface but maybe not. I can not locate a support group on line for WinQcad which is unfortunate as I find it one of the easiest CAD programs I have every used. I need to spend a couple of days getting into the LTspice but so far....

9. ### atanumukerji Thread Starter New Member

Apr 1, 2011
18
0
Thanks everyone.. and to Adjuster in particular. You are right, the circuit you have is a good learning tool for me. My bad! I had LTSpice but did not use it o qualify my design. I am glad that everyone is also of the same view that it will be difficult to get the same concept to work with two transistors.

I will tweak the three-transistor version to get a more robust design. Will post my findings.

Rgds
-AM

10. ### pistnbroke Member

May 9, 2011
32
1
I might be stupid but should not the red led be in the collector not the emmitter..??

11. ### steveb Senior Member

Jul 3, 2008
2,433
469
I would recommend modifying the circuit so that the voltage sensing of the battery, and switching of the LED, has a digital nature with a Schmitt trigger function. The situation in the present circuit is too unreliable due to sensitivity with temperature. Also, even when the trip-point is stable, there is really no hard turn-on/turn-off ability with that circuit. There is also a possiblity (not sure) of instability since, when the LED shuts off, the load on the battery is less and the voltage then increases. This could then allow the LED to turn back on, thus loading the battery down again. So, you might get some type of limit cycle with this design (under some conditions when you least expect it).

There are a number of ways to do a proper digital control with Schmitt trigger. For example a 74HC14 does this naturally and works with that voltage range. Or a comparitor configured with hysteresis can give a Schmitt trigger function, and there are low voltage comparitors that could do the job. There are also some old simple designs using transistors that give the Schmitt trigger function.

Some Schmitt trigger designs have a nearly fixed turn on and turn off voltage (independent of supply voltage) which could be used to provide clear turn on and turn off voltages. For other designs that don't give a fixed voltage trip-point (for example the 74HC14 which scales as a percentage of the supply voltage), a voltage reference could be used in some way. (by the way, don't use the 74HCT14 since it requires an inappropriate supply voltage for your application)

To do this design the best way possible in term of cost, complexity, reliabiltiy and performance, some good thought should go into all the possible options. Only after you have the basic circuit in place should the other "warning" LED be considered. That part of the design is relatively trivial once you have a clear digital on/off functon designed and tested for the main LED load.

Without doing any digging or analysis, my best guess of the simplest and best performing approach is to use a single-supply, low-voltage comparitor (cheapest you can find), and use a voltage reference to provide a stable trip-point. You will have total control on the trip-point voltage and you can set the level of hysteresis precisely.

Last edited: Jun 1, 2011

Dec 26, 2010
2,147
300
If the main requirement of the OP was to obtain a circuit with good performance, then clearly a combination of a level comparator and a stable voltage reference could do the job much better. There are also comparators made with built-in reference devices, and even dedicated power-supply "watchdog" ICs which could all give give excellent results.

One would of course need to be careful of the possibility of instability and cyclic on-off switching that might be even more probable with such a high-gain system, although a suitable level of hysteresis should avoid this. For this purpose, prefer a comparator with an external feedback network to any Schmitt device with internally set (and hence fixed) hysteresis. The type of device which has thresholds related to its own power supply is also unsuitable here, unless an independent and stable supply can be arranged.

Note however the title of the original enquiry was "Transistor not behaving as expected." The OP appears to be interested in learning something about transistor circuits, which such a standard solution might not give him.

13. ### steveb Senior Member

Jul 3, 2008
2,433
469
The standard solution still requires understanding of transistors, but my thoughts are to get the OP interested in learning some things even beyond this. This is a really good example for learning. One will quickly see the various issues trying to do it this way. The next logical question is, " How do we make it better?".

The Catch-22 in this circuit is particularly instructive. In order to light the red LED to tell you that the main LED is off, you have to forward bias the main LED to provide a current path to drive Q2. But, forward biasing the main LED is sure to generate some (albeit low level) light. This might be good or bad depending on the application, but it's still ironic and borders on a Catch-22.

Dec 26, 2010
2,147
300
This apparent "Catch-22" can be mitigated by placing a bleed resistor across the main LED, as in the circuit I posted. This of course wastes a few mA in normal operation. This would allow a red LED in the second position to remain alight even if the supply voltage was too low to turn the white LED on. You may guess that I wasted some time on this pretty useless arrangement.

15. ### steveb Senior Member

Jul 3, 2008
2,433
469
Yes, very good! This is the origin of great circuits. We continue the process of identifying the issues and solutions. Then one day we get that inspiration while sleeping. Your 3 transistor solution suddenly becomes 4, 5 or 6 transistors with just the right trip-point for the battery type, and just the right hysteresis for reliable operation, with a component cost < \$2.00.

I love these types of design problems and enjoy that moment when the solution is clear. However, it's very rare to find the modern applications for these beautiful little circuits. The microprocessors and FPGAs and multifunction chips are the latest trend, and it's rare for an employer to allow the necessary design time and verification steps to demonstrate a cheaper and better performing solution, even when we know it exists.

It seems the economics don't work any more. If the production quantity is expected to be small, then the engineer's time can't be recovered. If the production quantity is expected to be large, then a (inelegant, brute-force) custom specialized single chip realization will be the preferred way to go. In the 1990s this was already happening, but at that time I could at least sneak in a few good designs by putting some time in at home. But, I don't even try anymore, and just do that stuff as a hobby now. I could definitely have fun wasting time on this one.

16. ### atanumukerji Thread Starter New Member

Apr 1, 2011
18
0
Thanks for all the inputs and suggestions. I really enjoyed the discussion around whether a cheaper digital circuit with a schmitt trigger would have given me a good hysteresis with my control circuit and then a more trivial indicator .. which makes a lot of sense to me.

But as rightly pointed out my intention was to try to get the transistor based circuit to work and learn some aspects of this circuit as I go along. I am also trying to get a robust design in place without using off the shelf components like LDOs and programmable power supply watch dog monitors etc., I want to have a good robust design in the cheapest possible cost. If this tests out well with some manageable tolerances, I think this is a better bet than the other options.

Again my view. I also tried simulations with different devices like using a couple of SL100s and once BC 547B. Looks like it will work. Will update finally when I am done.

Rgds
-AM