Configuring a bipolar junction transistor as a current source

PeteHL

Joined Dec 17, 2014
442
In the second figure of the book section that I'm including a link to, the author shows a diode connected from the base termination to the emitter termination of a transistor configured to be a current source. Given that the base to emitter junction is a diode of sorts, what purpose does it serve to connect a diode across that junction? It seems to me that operation of the transistor would be the same with or without the diode, except that the current through the bias resistor would be divided between the diode and the base-emitter junction of the transistor.

boostbuck

Joined Oct 5, 2017
381
The single junction diode serves to maintain a fixed voltage at the base junction of the transistor, and this generates a defined collector current. The base junction is a diode of sorts but the voltage across it is a reflection of collector current.

The page you link to explains it very well if you read it carefully.

Papabravo

Joined Feb 24, 2006
20,378
It is no different than voltage divider bias with one of the resistors being a diode to establish a constant 0.7V drop across the diode and across the BE junction. Take the diode away and you have a very different and much less stable configuration. This will be easy to show with a simulation if that will help with your understanding.

PeteHL

Joined Dec 17, 2014
442
The single junction diode serves to maintain a fixed voltage at the base junction of the transistor, and this generates a defined collector current. The base junction is a diode of sorts but the voltage across it is a reflection of collector current.

The page you link to explains it very well if you read it carefully.
Doesn't base to emitter current determine collector to emitter current, and not vice versa? Also, the voltage drop across the base to emitter junction largely stays the same regardless of the amount of current through the junction, that being the nature of the P-N junction.

boostbuck

Joined Oct 5, 2017
381
The idea that a PN junction has a fixed voltage drop is a simplification that is not always applicable:

WBahn

Joined Mar 31, 2012
29,149
Doesn't base to emitter current determine collector to emitter current, and not vice versa? Also, the voltage drop across the base to emitter junction largely stays the same regardless of the amount of current through the junction, that being the nature of the P-N junction.
While treating the base-emitter voltage as a constant and the collector current as a function of the base current is a very, very useful simplification that is good enough in many instance, treating the collector current as a function of base-emitter voltage is a higher fidelity model. It's very difficult to fully understand current mirrors without doing so.

Papabravo

Joined Feb 24, 2006
20,378
Doesn't base to emitter current determine collector to emitter current, and not vice versa? Also, the voltage drop across the base to emitter junction largely stays the same regardless of the amount of current through the junction, that being the nature of the P-N junction.
There is one small problem with your statement. In an NPN BJT there is no such thing as the base to emitter current. There is base current, emitter current and collector current. KCL insists that:

$$I_C+I_B+I_E= 0$$

Only voltage differences are expressed as occurring between two nodes.

crutschow

Joined Mar 14, 2008
32,848
The author is using a diode as a lead-in to explaining how a current-mirror works, where the diode is replaced by a diode-connected transistor.

MrAl

Joined Jun 17, 2014
10,590
Hello there,

The more traditional constant current source using a single bipolar uses two diodes for the voltage bias source. This configuration has been around for decades.

In Circuit 1, D1 has approximately the same voltage drop as the transistor base emitter voltage. D2 sets the current via R1 due to the voltage across D2 being the same as the voltage drop across R1 approximately. Changing R1 changes the current level.

In Circuit 2, we see two transistors and no diodes. R5 sets the current via the base emitter voltage drop of Q2. Q3 provides the current.
I had designed that circuit independently for someone who was making an LED flashlight some 10 or 15 years ago, but now i see it popping up on the web in some places. I wanted to avoid having any diodes in the circuit and hopefully a little better current set point.

Attachments

• 15.2 KB Views: 16

PeteHL

Joined Dec 17, 2014
442
In the circuit of the second figure in the page of the book that I linked to in my first post, if the current versus voltage characteristics of the diode and and the P-N junction of the transistor are the same, then nothing is accomplished by connecting the diode across the base and emitter terminals of the transistor.

crutschow

Joined Mar 14, 2008
32,848
if the current versus voltage characteristics of the diode and and the P-N junction of the transistor are the same, then nothing is accomplished by connecting the diode across the base and emitter terminals of the transistor.
Not true.
Connecting the diode means the transistor collector current is now not from the current through the bias resistor multiplied by the current-gain (beta), which varies significantly between transistors, but from the diode voltage as determined by the transistor's transconductance (gm below), which varies little between transistors.
That is why a current-mirror with two matched transistors has a constant-current from the second transistor determined mainly by the current through the diode-connected first transistor.

VT is the thermal voltage of a transistor; at room temperature, the value is approximately 25mV. The current, IEQ, is obtained by doing DC analysis of the transistor.

Note that the theory for a BJT shows it to be a voltage-controlled device but, for many applications such as bias calculations or switching, it's easier to view it as a black-box, current-controlled device.

Last edited:

MrAl

Joined Jun 17, 2014
10,590
In the circuit of the second figure in the page of the book that I linked to in my first post, if the current versus voltage characteristics of the diode and and the P-N junction of the transistor are the same, then nothing is accomplished by connecting the diode across the base and emitter terminals of the transistor.
Hi,

Yes, that is true that the current is now shared between the diode and the transistor base emitter diode, but that's not the only function of the diode.
The diode acts as a sort of constant voltage regulator, and that helps to regulate the base emitter voltage of the transistor. When we regulate the base emitter voltage of the transistor we also end up regulating the collector current. That's what makes the circuit a constant current regulator.

There are also other side effects that cause the diode voltage to change. One of those is temperature. That causes the diode voltage to change. However, the transistor base emitter voltage also changes with temperature and the hope is that the diode change will be the same or close to the change in the transistor base emitter voltage (both due to temperature) and so the current regulator circuit will still keep the current regulated to the same level.
This does not work out perfect in practice, so the next idea is to connect a second transistor of a similar type as a diode and use that for the diode and have the two transistors on the same semiconductor die. This means the temperature of both transistors is almost the same meaning the voltages will be close and so the circuit will continue to regulate the current to the same original level. This may not be prefect either, but it works out ok in many circuits that need this kind of regulation.

Another idea is to use an FET with the gate tied to the source. That's a completely different way of doing this though and a subject for maybe another time.

crutschow

Joined Mar 14, 2008
32,848
One important parameter of a current source is its "stiffness" or change in current with a change in its load voltage.
Ideally there should be no change in current with voltage.

Below is the sim of an interesting comparison between a standard two-transistor mirror, and a Wilson mirror which has a third transistor to add negative feedback and stiffen its output (ah, the magic of negative feedback).

Notice that the collector current of the standard output transistor (green trace) changes significantly with a change in the collector voltage (horizontal trace), due to the normal transistor finite collector resistance (here about 117kΩ).

By comparison, the Wilson transistor collector current (yellow trace) barely changes, due to the negative feedback from Q5 through Q3.
(Any increase in Q5's current also increases the current mirror current of Q4, thus reducing Q5's base voltage to keep its collector current constant).
This increases the effective collector resistance to about 4.5MΩ, for a stiffness factor increase of about 38.

Last edited:

WBahn

Joined Mar 31, 2012
29,149
The metric for the "stiffness" of a current mirror is it's output resistance. An ideal current source, of course, has an infinite output resistance.

While you can do the full-blown analysis of the feedback mechanisms in various mirror topologies, a very good understanding their different characteristics can be had without doing so.

In a basic current mirror, the reference transistor is diode-connected which forces it to establish the Vbe that corresponds to the programming current with Vce equal to Vbe (call it 700 mV).

The output transistor will only have that same current when it's Vce happens to also be 700 mV. If the Vce happens to be more than that, the current will be more than the programmed current (and, also, if Vce is less the current will be less). The variability in the collector current with Vce is the the output resistance and it is fairly-well modeled by the Early voltage, which parameterizes the slope of the Ic vs Vce curve. For most BJT transistors, the Early voltage is low enough that the output resistance isn't very good.

What improved current mirror designs strive to do is to hold the Vce of the mirror transistors constant. Ideally, they would be the same, but at the end of the day it's far more important to minimize the change in the Vce of those two transistors with load. This is done by some kind of buffering to separate the mirror voltage from output voltage.

Image snagged from Wikipedia.

In the Wilson mirror, the output current is (for the most part, I_C2 isn't quite the same as I_out) the input current to the mirror (the bottom two transistors, Q1 and Q2 -- not including the buffer transistor, Q3, at the top) and the output transistor (Q1) is the one that the overall reference current, I_in, is fed to. As a mirror, Q1 sets its Vce to whatever is needed to match the current in Q2. However, doing a simple analysis shows that Vce of Q2 is ~700 mV while the Vce of Q1 is going to be about ~1400 mV. This means two things. First, since the Vce on the two transistors is different, I_out is going to be less than I_in, even with infinite-beta transistors. But that's not a biggie, since it just means that there is a gain from input to output that is a little less than unity and that's something that can be easily accommodated. The second thing, however, is the key. The Vce voltages across both mirror transistors is essentially constant, which means that the variation in collector current as the output voltage (which manifests itself almost entirely as Vce voltage across Q3) is going to be all-but eliminated.

Now, one might point out that Q3 has an Early voltage that probably gives it a pretty poor output resistance, so why doesn't increases in its Vce cause the same kind of increases in current that the we see in any BJT transistor?

This is where the feedback mechanism that crutschow mentioned come into play. While the above qualitative discussion of why the Wilson mirror has such high output resistance is pretty easy to grasp, the more detailed discussion to answer this question is generally quite a bit harder for people to grasp at first blush, so don't be discouraged if it takes a few passes for it to make sense.

As the Vce of Q3 increases, the current can be prevented from increasing by simply applying a suitable smaller Vbe to Q3. But how does this happen?

Imagine that I_out did increase due to the higher Vce across Q3. Where does that current go? It is going into a diode-connect transistor (Q2), which will happily accept the higher current and, in response, produce a higher Vbe across Q2 to match.

But this same Vbe is being applied to the output transistor of the mirror (Q1), meaning that IT wants to increase I_in. But how does it do this? It lowers its Vce -- which in turn lowers Vbe of Q3, which in turn increases it's Vce to lower I_out back toward its original value.

If you chase the math around this loop, you discover that the output resistance of the overall circuit is has been increased, relative to the basic current mirror, by about a factor of beta/2. For typical small-signal transistors, this can be a factor of one hundred or more, which is a HUGE improvement.

MrAl

Joined Jun 17, 2014
10,590
The metric for the "stiffness" of a current mirror is it's output resistance. An ideal current source, of course, has an infinite output resistance.

While you can do the full-blown analysis of the feedback mechanisms in various mirror topologies, a very good understanding their different characteristics can be had without doing so.

In a basic current mirror, the reference transistor is diode-connected which forces it to establish the Vbe that corresponds to the programming current with Vce equal to Vbe (call it 700 mV).

The output transistor will only have that same current when it's Vce happens to also be 700 mV. If the Vce happens to be more than that, the current will be more than the programmed current (and, also, if Vce is less the current will be less). The variability in the collector current with Vce is the the output resistance and it is fairly-well modeled by the Early voltage, which parameterizes the slope of the Ic vs Vce curve. For most BJT transistors, the Early voltage is low enough that the output resistance isn't very good.

What improved current mirror designs strive to do is to hold the Vce of the mirror transistors constant. Ideally, they would be the same, but at the end of the day it's far more important to minimize the change in the Vce of those two transistors with load. This is done by some kind of buffering to separate the mirror voltage from output voltage.

View attachment 293846

Image snagged from Wikipedia.

In the Wilson mirror, the output current is (for the most part, I_C2 isn't quite the same as I_out) the input current to the mirror (the bottom two transistors, Q1 and Q2 -- not including the buffer transistor, Q3, at the top) and the output transistor (Q1) is the one that the overall reference current, I_in, is fed to. As a mirror, Q1 sets its Vce to whatever is needed to match the current in Q2. However, doing a simple analysis shows that Vce of Q2 is ~700 mV while the Vce of Q1 is going to be about ~1400 mV. This means two things. First, since the Vce on the two transistors is different, I_out is going to be less than I_in, even with infinite-beta transistors. But that's not a biggie, since it just means that there is a gain from input to output that is a little less than unity and that's something that can be easily accommodated. The second thing, however, is the key. The Vce voltages across both mirror transistors is essentially constant, which means that the variation in collector current as the output voltage (which manifests itself almost entirely as Vce voltage across Q3) is going to be all-but eliminated.

Now, one might point out that Q3 has an Early voltage that probably gives it a pretty poor output resistance, so why doesn't increases in its Vce cause the same kind of increases in current that the we see in any BJT transistor?

This is where the feedback mechanism that crutschow mentioned come into play. While the above qualitative discussion of why the Wilson mirror has such high output resistance is pretty easy to grasp, the more detailed discussion to answer this question is generally quite a bit harder for people to grasp at first blush, so don't be discouraged if it takes a few passes for it to make sense.

As the Vce of Q3 increases, the current can be prevented from increasing by simply applying a suitable smaller Vbe to Q3. But how does this happen?

Imagine that I_out did increase due to the higher Vce across Q3. Where does that current go? It is going into a diode-connect transistor (Q2), which will happily accept the higher current and, in response, produce a higher Vbe across Q2 to match.

But this same Vbe is being applied to the output transistor of the mirror (Q1), meaning that IT wants to increase I_in. But how does it do this? It lowers its Vce -- which in turn lowers Vbe of Q3, which in turn increases it's Vce to lower I_out back toward its original value.

If you chase the math around this loop, you discover that the output resistance of the overall circuit is has been increased, relative to the basic current mirror, by about a factor of beta/2. For typical small-signal transistors, this can be a factor of one hundred or more, which is a HUGE improvement.

Hi there,

The way i understand it is that the extra transistor balances the currents in the other two transistors.
To balance the two voltages, i believe you can connect a fourth transistor connected as a diode in series with the Q4 transistor (cruts' diagram or Q1 in your diagram). That of course increases the number of transistors yet again.
Both of those circuits will have a higher overhead voltage requirement than the standard two transistor type.

WBahn

Joined Mar 31, 2012
29,149
Hi there,

The way i understand it is that the extra transistor balances the currents in the other two transistors.
To balance the two voltages, i believe you can connect a fourth transistor connected as a diode in series with the Q4 transistor (cruts' diagram or Q1 in your diagram). That of course increases the number of transistors yet again.
Both of those circuits will have a higher overhead voltage requirement than the standard two transistor type.
The extra transistor isn't balancing currents, it's acting as a current follower (akin to a voltage follower) to isolate load voltage changes from the mirror.

It is an improvement on an improvement.

One of the ways you can stiffen a basic current mirror source is to add a cascode transistor above the output transistor. It's purpose is to hold the collector of the the output transistor constant and thus eliminate the Early effect. But it doesn't have the strong feedback mechanism that the Wilson mirror has, so it doesn't do quite as good a job.

You have to be careful adding a transistor above Q1 (in my diagram), because you need to have enough overhead to move the base voltage of Q3 up or down as needed, though you could use Schottky diodes to remove most of it while leaving sufficient working room. However, the differences in collector current between Vce of 700 mV and Vce of 1400 mV are usually pretty minor and can be accounted for in other ways. Base current compensation is normally more important before that is.

It's important to keep in mind that current mirrors are best when integrated on the same chip, which means that there are both limitations that have to be lived with and opportunities that can be exploited that are different than when working with discrete components.

MrAl

Joined Jun 17, 2014
10,590
The extra transistor isn't balancing currents, it's acting as a current follower (akin to a voltage follower) to isolate load voltage changes from the mirror.

It is an improvement on an improvement.

One of the ways you can stiffen a basic current mirror source is to add a cascode transistor above the output transistor. It's purpose is to hold the collector of the the output transistor constant and thus eliminate the Early effect. But it doesn't have the strong feedback mechanism that the Wilson mirror has, so it doesn't do quite as good a job.

You have to be careful adding a transistor above Q1 (in my diagram), because you need to have enough overhead to move the base voltage of Q3 up or down as needed, though you could use Schottky diodes to remove most of it while leaving sufficient working room. However, the differences in collector current between Vce of 700 mV and Vce of 1400 mV are usually pretty minor and can be accounted for in other ways. Base current compensation is normally more important before that is.

It's important to keep in mind that current mirrors are best when integrated on the same chip, which means that there are both limitations that have to be lived with and opportunities that can be exploited that are different than when working with discrete components.
Hi,

Im not so sure about the complete function of the third transistor. We could do some experiments to investigate further.
I don't think the fourth transistor should increase the required overhead voltage too much though but we could look into that better also. The three transistor circuit also requires more voltage too.

Yes it's a shame that it's hard to do this with discrete transistors. There is the temperature gradient and also the physical differences.
I ran into this years ago when designing a simple charger circuit for someone and i needed a good reference. I matched the transistors as well as possible, but to get the thermal gradient as low as possible i had to wrap the transistors in Styrofoam and then a layer of aluminum, followed by another layer of Styrofoam, and i think i used one more of each (long long time ago). Any heat that would like to get in or out of the package would be distributed by the metal and insulated by the Styrofoam. That took care of the temperature gradient which is more important when all the transistors have to be at the same temperature. I did not care to incorporate an oven to hold the temperatures steady though as was done in some of the best reference IC's way back then.

I came up with a way to regulate the voltages over temperature that used a very different method a long time ago after studying the behavior of regular silicon diodes. I could get a very stable reference voltage, but before i actually got to build one for use i think it was Maxim came out with a very good reference which was pretty stable too, very stable, so i never built one. I purchased a Maxim unit and was very pleased with the accuracy and the performance. Those IC's far outperform what any of us could ever build without the help of a foundry or a much more complicated design.

Last edited:

MrAl

Joined Jun 17, 2014
10,590
One important parameter of a current source is its "stiffness" or change in current with a change in its load voltage.
Ideally there should be no change in current with voltage.

Below is the sim of an interesting comparison between a standard two-transistor mirror, and a Wilson mirror which has a third transistor to add negative feedback and stiffen its output (ah, the magic of negative feedback).

Notice that the collector current of the standard output transistor (green trace) changes significantly with a change in the collector voltage (horizontal trace), due to the normal transistor finite collector resistance (here about 117kΩ).

By comparison, the Wilson transistor collector current (yellow trace) barely changes, due to the negative feedback from Q5 through Q3.
(Any increase in Q5's current also increases the current mirror current of Q4, thus reducing Q5's base voltage to keep its collector current constant).
This increases the effective collector resistance to about 4.5MΩ, for a stiffness factor increase of about 38.

View attachment 293844
Hi,

That's a nice comparison. If you feel up to it, you can compare that to the four transistor current mirror i was talking about in this thread.
That would be interesting to see also. It is supposed to help with the Early effect issues.

WBahn

Joined Mar 31, 2012
29,149
Hi,

Im not so sure about the complete function of the third transistor. We could do some experiments to investigate further.
I don't think the fourth transistor should increase the required overhead voltage too much though but we could look into that better also. The three transistor circuit also requires more voltage too.
The overhead voltage I'm referring to is enough Vce on Q1 so that it has sufficient margin to lower the base voltage of Q3. Putting a diode-connected transistor above Q1 reduces that margin significantly, but there probably would still be enough for proper control.

Yes it's a shame that it's hard to do this with discrete transistors. There is the temperature gradient and also the physical differences.
It's actually quite easy to do with discrete transistors -- you simply add a ballast resistor at the emitter of each. Now you can use wildly mismatched transistors, such as a small-signal transistor for one and a power transistor for the other, and the quality of the mirror is dictated by the voltage drop across the ballast resistors and how well matched the resistors are (and getting well-matched discrete resistors is easy).

MrAl

Joined Jun 17, 2014
10,590
The overhead voltage I'm referring to is enough Vce on Q1 so that it has sufficient margin to lower the base voltage of Q3. Putting a diode-connected transistor above Q1 reduces that margin significantly, but there probably would still be enough for proper control.

It's actually quite easy to do with discrete transistors -- you simply add a ballast resistor at the emitter of each. Now you can use wildly mismatched transistors, such as a small-signal transistor for one and a power transistor for the other, and the quality of the mirror is dictated by the voltage drop across the ballast resistors and how well matched the resistors are (and getting well-matched discrete resistors is easy).
Hello,

Part1:
But it seems like if Q2 (your diagram) has collector voltage of Vc, then the collector voltage of Q1 is already close to Vc+Vbe, so putting another transistor Q4 (as diode) into the collector of Q1 would just reduce the collector voltage of Q1, which means VcQ1=VcQ2 and that was the goal wasn't it?
I haven't actually tried any of this yet i was hoping Cruts felt like doing it with a simulation. I guess i can dive into it also.

Part2:
If it was that easy to do why don't they do it that way, or do they? Could it be the overhead issues or the gain reduction.

BTW as a side issue, the part i got from Maxim had a terminal voltage of 4.096 volts, and it read 4.095 volts with one $350 meter and 4.096 volts with one$450 meter. I thought that was pretty good (room temperature but it's well compensated).