Need help understanding constant current circuit.

Thread Starter

dsharp02

Joined Aug 8, 2015
17
Please bear with me. I'm a total newb to electronics. I apologize if this question is stupid.

I'm having trouble working out how the attached circuit is able to maintain a constant current.

Transistor Q2 has no current flowing through it, but if I remove it from the circuit, then the current is no longer regulated.

I'm trying to apply KCL and Ohm's law but things just keep looping back and I end up just restating what I already know.

I(R1) = Ice(Q2) + Ibe(Q1)
I(Load) = Ice(Q1)
I(R2) + Ibe(Q2) = Ibe(Q1) + Ice(Q1)
I(R1) + I(Load) = Ibe(Q2) + Ice(Q2) + I(R2)
V(R1) = I(R1) * 10k
V(R1) = 10k * (Ice(Q2) + Ibe(Q1))
I(R2) = Ibe(Q1) + Ice(Q1) - Ibe(Q2)
V(R2) = (Ibe(Q1) + Ice(Q1) - Ibe(Q2) ) / 33
Vce(Q2) = V(R1)
Vce(Q2) = 10k * (Ice(Q2) + Ibe(Q1))
Vce(Q2) = Ice(Q2) * Rce(Q2)
Vce(Q2) = 10k * Ice(Q2) + 10k * Ice(Q1)
10k * Ice(Q2) + 10k * Ice(Q1) = Ice(Q2) * Rce(Q2)
9.999k * Ice(Q2) + 10k * Ice(Q1) = Rce(Q2)
9.999k * Ice(Q2) = Rce(Q2) - 10k * Ice(Q1)
Ice(Q2) = (Rce(Q2) - 10k * Ice(Q1) ) / 9.999k ... at this point my mental stack overflows and I'm lost.

Intuitively it seems like the base emitter junction of Q2 prevents the voltage across R2 from exceeding its forward voltage drop which in turn prevents the current from exceeding the (forward voltage drop of base emitter junction for Q2 / 33 ) amps. But what prevents Ice(Q1) from becoming so high that it swamps Q2 and causes the voltage across R2 to rise? I can see that Ice(Q2) can pull some of the I(R1) current away from Ibe(Q1) but I can't figure out how to calculate the magnitude of the effect.

What's the proper way to analyze this circuit so that I can calculate the effects modifying R1 and R2 will have on the circuit.

Thanks,
Dave
upload_2015-9-26_15-15-7.png
 

MikeML

Joined Oct 2, 2009
5,444
How much current are you trying to get through the Diodes shown as "load" (presumably LEDs)?

That current puts an upper bound on R1 = (Iload/Q1hfemin).

R2 drops Vbe = ~0.6V when Iload flows in it.

My preferred version of this circuit uses an NPN for Q2, but uses an enhancement NFET for Q1. Then R1 can be 100K.
 

#12

Joined Nov 30, 2010
18,224
Another point of view: R1 provides the only drive current to Q1. If Q1 has enough gain, it allows current to flow through the LEDs, through Q1, and through R2 until the voltage across R2 becomes enough to turn on Q2. As Q2 begins to allow more current to ground, the supply of current from R1 becomes less available to Q1 and the circuit arrives at equilibrium.

ps, you can't get 16 volts worth of LEDs to run on 10 volts. Tear it down to one LED and the circuit should start up with a bit less than 0.018 amps of current through the LED.
 

Thread Starter

dsharp02

Joined Aug 8, 2015
17
>How are you going to power 10 leds with a 10v supply?

This isn't a circuit I intend to use in an actual project. It's just something I whacked together in LT-spice to try and understand how the circuit works. The voltage drops on the LEDs in LT-Spice seem to be small enough to still allow the circuit to work. It's not realistic, but not really germane to what I'm trying to understand.

>How much current are you trying to get through the Diodes shown as "load" (presumably LEDs)?
>That current puts an upper bound on R1 = (Iload/Q1hfemin).
>R2 drops Vbe = ~0.6V when Iload flows in it.
>My preferred version of this circuit uses an NPN for Q2, but uses an enhancement NFET for Q1. Then
>R1 can be 100K.

The intent is to supply 20ma across the LEDs. I saw a version of this circuit on Instructables, and thought I'd try to analyze it. I was avoiding looking at the hfe because it's not a known value. I didn't think about using the minimum. But your comment about how it affects the maximum value for R1 makes sense.

So how do we know that R2 is dropping Vbe = 0.6v? is the base-emitter junction acting like a 0.6v zener? And 0.6v is a maximum? I'm assuming that if the load resistance is too high, then the voltage won't reach 0.6 and thus won't reach the current limit.

Thanks,
Dave
 

Thread Starter

dsharp02

Joined Aug 8, 2015
17
Another point of view: R1 provides the only drive current to Q1. If Q1 has enough gain, it allows current to flow through the LEDs, through Q1, and through R2 until the voltage across R2 becomes enough to turn on Q2. As Q2 begins to allow more current to ground, the supply of current from R1 becomes less available to Q1 and the circuit arrives at equilibrium.

ps, you can't get 16 volts worth of LEDs to run on 10 volts. Tear it down to one LED and the circuit should start up with a bit less than 0.018 amps of current through the LED.
For some reason LT-Spice seems to be using a voltage drop less than 1v for the generic LED. When I actually built this circuit I used 1 to 3 LEDs.

This circuit seems much simpler than a transconductance amplifier. What factors would play into a decision to use one or the other for to drive a constant current? (If I need to start a separate thread for this, let me know).

Thanks,
Dave
 

peter taylor

Joined Apr 1, 2013
106
Start your analysis by replacing your transistors and LED's with their equivalent models.

Untitled1.jpg

Define your loop currents and nodal voltages, then use KCL, KVL, nodal and loop analysis.
 

#12

Joined Nov 30, 2010
18,224
This circuit seems much simpler than a transconductance amplifier. What factors would play into a decision to use one or the other for to drive a constant current?
Can you build a transconductance amplifier cheaper than 2 transistors and 2 resistors?

In my post, we are looking at the difference between book learnin' and practical application. You can run 16 lines of math and not arrive at understanding, while I can type words for about 4 lines and describe the operating principles. I can't pass the test you are going to have in school, but I actually understand how this works. Which is your goal today?
 

dannyf

Joined Sep 13, 2015
2,197
I'm having trouble working out how the attached circuit is able to maintain a constant current.
The only way for that to work is for the voltage source to have infinite (output) impedance so that whatever load you put to it, the current is invariant.

There are a lot of ways to achieve that. The approach you highlighted earlier utilizes negative feedback: Q2 will work to maintain a constant Vbe, thus a constant voltage / current across R2. That means constant current through Q1's emitter + collector -> constant current through the leds.

How does Q2 do that? Let's say that for some reason the current through the leds (thus the current through R2) goes up. This will open up Q2 more, thus increasing the collector current on Q2, thus increasing the voltage drop on R1, which lower's Q1's base potential thus its Vbe. That in turns turns off Q1 a little bit -> lowering the current through R2 (thus current through the leds).

So an action to increase the current through R2 will lead to a reaction to reduce the current through R2 -> negative feedback, maintaining a (relatively) constant through R2/leds.
 

MikeML

Joined Oct 2, 2009
5,444
Naw, just use real LED models...

For example, this circuit shows a single white LED that has a forward drop of ~3.2V @ 20mA.

Your circuit was using ideal diodes that have a forward drop of ~0.6V. Any LED will have a Vf of at least 1.9V (red).

Note that V1 must be greater than (Vf of all the LEDs) + V(b2) + Q1's Vcesat.

Note V(b2) =~0.6V, while V(b1) is just another Vbe higher...

Note that the approximate LED current is 0.6/R2.

Also note that Ib(Q1) has to be at least I(D1)/βQ1. If it is more, then Q2 has to shunt the excess.
 

Attachments

Last edited:

WBahn

Joined Mar 31, 2012
29,976
For some reason LT-Spice seems to be using a voltage drop less than 1v for the generic LED. When I actually built this circuit I used 1 to 3 LEDs.

This circuit seems much simpler than a transconductance amplifier. What factors would play into a decision to use one or the other for to drive a constant current? (If I need to start a separate thread for this, let me know).

Thanks,
Dave
It's not a matter of LTSpice using a voltage drop of 1V for a generic LED. An LED, like any diode, has a continuous forward I-V characteristic that is exponential in nature. The more voltage you put across it, the more current. Conversely, the less voltage you put across it, the less current. With your circuit, you are only able to put, at most, 10V across a string of eight diodes, so the most voltage you can get across each is about 1.25 V. At this voltage, the current will be extremely small, which would result in a very small voltage drop across either Q1 or R2.

However, this ignores the base circuit of Q1. With the collector current being negligible, the current in R2 will come completely from the base current. Assuming Q2 is off (for the moment), this means that the current in R2 will be the same as in R1, which will be (10V-0.6V)/(10033Ω) = 0.94 mA. This will place the base of Q2 at 30 mV confirming that it will be in cutoff). While small, this should be more than sufficient base current to place Q1 in saturation for the very small LED current that it has to pass.
 

WBahn

Joined Mar 31, 2012
29,976
Intuitively it seems like the base emitter junction of Q2 prevents the voltage across R2 from exceeding its forward voltage drop which in turn prevents the current from exceeding the (forward voltage drop of base emitter junction for Q2 / 33 ) amps. But what prevents Ice(Q1) from becoming so high that it swamps Q2 and causes the voltage across R2 to rise? I can see that Ice(Q2) can pull some of the I(R1) current away from Ibe(Q1) but I can't figure out how to calculate the magnitude of the effect.
If the Ice current of Q1 increases, then the voltage drop across R2 increases, which increases the Vbe of Q2, which increases the Ice of Q2, which increases the current in R1, which increases the voltage drop across R1, which lowers the base voltage on Q1, which lowers the Ice current in Q1. This forms what is known as a negative feedback loop in the circuit such that any change away from equilibrium starts a chain of events that reestablishes that equilibrium (or something very close to it).

What's the proper way to analyze this circuit so that I can calculate the effects modifying R1 and R2 will have on the circuit.
Assume that the circuit is in equilibrium, which means that you will have Vbe of about 0.6V across R2. Size R2 to give the desired Ice you want in Q1.

Sizing R1 is a bit more complicated, but is also not nearly as critical. In this case let's say that the target current in Q1 is 20 mA, so R2=33Ω is a reasonable choice which would give about 18 mA. Assume that the transistors have a beta that is at least 100. That means that you need a base current of about 200 uA. The base voltage on Q1 is going to be about 1.2 V to 1.4 V, placing about 8.7 V across R1. Neglecting the current in Q2 for a moment, that would require R1 to be 43.5 kΩ. If the beta is actually higher, then we could use an even larger resistor. But we need to allow for some collector current in Q2, as well. So we make R1 quite a bit smaller (they chose 10 kΩ in this case). The negative feedback aspect of the circuit will simply turn Q2 on a bit more in order to sink the additional current. This has the effect of making the circuit very insensitive to variation in transistor beta.

To show how non-critical the actual choice of R1 is, if you were to use, say, 100 Ω for R1, then you would need about 87 mA of current in it. Nearly all of this would flow through Q2, which would then require a base current of about 0.9 mA. This would be supplied by the circuit increasing the drive to Q1 so that the collector current would be about 18.9 mA with 18 mA of that going through R2 (to keep the base voltage of Q2 at about 0.6 V) and the rest going to the base of Q2. With that much current in Q2, the needed Vbe would actually increase, possibly by 100 mV give or take, and this will increase the current in R2 by 10% to 20% as well. So even a radical 100x reduction in R1 will likely only increase the LED current by 25% or so.
 

peter taylor

Joined Apr 1, 2013
106
Untitled4.jpg

I know:
I1 = (V0 - V3 - V4) / R1
I6 = V4 / R3

I don't know I2, I3, I4 or I5, so I need two equations in I3 and I4.

I1 = I2 + I3 and I2 = B.I4 so:
I3 + B.I4 = I1 (0)

I3 + I5 = I4 + I6 and I5 = B.I3 so:
I3.(1 + B) - I4 = I6 (1)

Solution (0) + B.(1):
I3 + B.I3.(1 + B) = I1 + B.I6
I3.(1 + B + B.B) = (V0 - V3 - V4) / R1 + B.V4 / R3

Where B is beta
 

dl324

Joined Mar 30, 2015
16,839
Transistor Q2 has no current flowing through it, but if I remove it from the circuit, then the current is no longer regulated.
What makes you think Q2 has no current flowing through it?

If you assume V1 is high enough to turn on both transistors, the collector of Q2 will be at about 1.4V (2*Vbe). That gives you a current of about 8.6mA in R1. Ignoring the base current of Q1 for now, that means the collector current in Q2 is about 8.6mA.
What's the proper way to analyze this circuit so that I can calculate the effects modifying R1 and R2 will have on the circuit.
Assume the voltage across R2 is 0.7V (some prefer to use lower voltages, but I think you'll find that it'll be closer to 0.7-0.8V at 10-20mA); this sets the emitter current in Q1.

R1 depends on the beta of Q1 and needs to be small enough to provide enough current for the voltage across R2 to be what you want.

Of course, your circuit won't function with V1=10V. It needs to be greater than Vbe+10*Vf.
 
Last edited:

peter taylor

Joined Apr 1, 2013
106
Now that I have I3, I can find all the currents and voltages in the circuit (assuming it is functional).

I1 = (V0 - V3 - V4) / R1
I2 = I1 - I3
I3 =[ (V0 - V3 - V4) / R1 + B.V4 / R3 ] / (1 + B + B.B) ]
I4 = (I1 - I3) / B
I5 = B.I3
I6 = V4 / R2
V1 = I1.R1
V2 = V0 - V1
V3 = Vbe1
V4 = Vbe2
V5 = V0 - VD - V6
V6 = I6.R2

NOW we can discuss whether the circuit works.
Obviously, if Vbe1 and Vbe2 are below about 6.0 volts, the circuit won't work, and the discussion is mute.
 
Top