Modified current-mirror circuit?

Thread Starter

ebeowulf17

Joined Aug 12, 2014
3,307
I'm writing because I'd like to add a current-limiter to an output to make it idiot-resistant against short circuits and such. I'm starting with 5V and need to retain as much of that as I can, which eliminates easy solutions like configuring an LM317 as a current regulator (dropout voltage is way too high.) I've pretty well decided that I'd like to go with a transistor based current limiter like the current mirror, where the voltage drop will just be the CE saturation voltage (typically 0.3V?) which should be acceptable.
standard-current-mirror-schematic.png
However, I got curious when I was trying to understand the circuit and I realized that it wastes a huge amount of energy. For whatever current limit you want to set on your load output, you must also dump that much current to ground continuously through the bias side. So if I want a 100mA limit, I have to dump another 100mA into the void 24/7. This seems silly and horribly inefficient, so...

I looked at the schematic for a circuit I'm vaguely familiar with, which appears to be a modified version of the current mirror layout:
modded-current-mirror-schematic.png
I can simulate this in LTSpice, and it basically works, but I can't find any references online to how this circuit works. The two extra resistors (R61 and R62) seem to be allowing us to use a high-value resistor at R67 so that we're running about 5mA to ground instead of having to run 80mA to ground in order to set an 80mA limit. This is appealing to me (I hate the idea of dumping all that current to ground for no reason,) but I'd love to understand it better.

1) Is this a standard setup?
2) Are there formulas to calculate the current limit for different resistor values?
3) My understanding is that the standard current mirror is fairly independent of specific transistor specs - as long as the two transistors are reasonably well matched, it will work properly. Does this modified circuit share that trait, or is it highly dependent on hFe or other transistor specs?

Thanks in advance for any guidance you can provide!

*** EDIT:
adding one more question:
4) I've simmed this in LTSpice and played with values a lot, but with little understanding of why things are working the way they do. Along the way, it occurred to me that R62 might not be necessary, and I found that I can eliminate that, while getting roughly the same current limit, with R61 and R67 at 27 ohms and 1k, respectively. Any thoughts on what importance (if any) R62 has in this circuit?
 
Last edited:

OBW0549

Joined Mar 2, 2015
3,566
I can simulate this in LTSpice, and it basically works, but I can't find any references online to how this circuit works. The two extra resistors (R61 and R62) seem to be allowing us to use a high-value resistor at R67 so that we're running about 5mA to ground instead of having to run 80mA to ground in order to set an 80mA limit.
Yup, that's exactly what R61 and R62 do.

1) Is this a standard setup?
I don't know how "standard" it is, but that arrangement is pretty well known.

2) Are there formulas to calculate the current limit for different resistor values?
I don't know of any ready-made formulas, but it's pretty easy to figure it out:

1) Decide what current you'd like to limit at.
2) Calculate a value for R62 such that when that current passes through it, it will drop a couple of tenths of a volt.
3) Decide what you want your control current to be (i.e., the current through Q23, R61 and R67.)
4) Calculate a value for R61 such that when that current passes through it, it will drop the same voltage as the voltage across R62 (chosen in Step 2 above).
5) Calculate a value for R67 based on the supply voltage, the expected Vbe drop of the transistor(s), and the voltage drop across R61, to give the current chosen in Step 3.

3) My understanding is that the standard current mirror is fairly independent of specific transistor specs - as long as the two transistors are reasonably well matched, it will work properly. Does this modified circuit share that trait, or is it highly dependent on hFe or other transistor specs?
It shares that trait; provided the transistors are not wildly different in Vbe drop, and further provided their hFe is sufficiently high, the circuit will work as intended.

Note that this is not a precision current source, and the currents involved will be only approximately what's calculated. But for purposes of current limiting, they should be close enough.
 

crutschow

Joined Mar 14, 2008
38,322
1) It's not a common circuit variation, if that's what you mean.
2) You'd likely have to generate the formulas.
For example, here are the equations for a mirror with a single resistor.
3) It should not be significantly dependent on things like hFE but the two transistors should be matched and kept at the same temperature.
A dual type transistor on the same substrate would be best.
4) Removing R62 could make it more sensitive to temperature differences between the two transistors.
Again a dual transistor would minimize this.
 

#12

Joined Nov 30, 2010
18,224
R61 and R62 are scaling resistors. They enable the smaller current in the waste leg.
They also help compensate for variance in Vbe. Caution! Simulators have only one model for any transistor number and so assume the transistors are matched and that can lead you down the garden path if you are not aware of how transistors act when they are not matched. This is another case of, "You can math the bejesus out of the design and it won't be what you calculated." Build it and then adjust for final specs.

R67 uses up most of the voltage in the waste leg so the Vce on Q23 resembles the Vce on Q24, thus encouraging match of Hfe/Vce.
Glueing the transistors together encourages match by reducing dI/dTemperature. A matched dual on a single silicon chip would be a wonderful thing to do.

I must be really slow today. Other People already said most of what I said.:(
 

OBW0549

Joined Mar 2, 2015
3,566
Caution! Simulators have only one model for any transistor number and so assume the transistors are matched and that can lead you down the garden path if you are not aware of how transistors act when they are not matched.
Hear, hear!!! That's excellent advice, and it also applies to other components-- diodes, MOSFETs, resistors, capacitors, inductors, and whatever. In Spice, a 10kΩ resistor is EXACTLY 10kΩ, and is absolutely identical to every other 10kΩ resistor in the circuit. It's quite possible, using a simulator, to unintentionally create a circuit which depends on matched components and/or infinitely tight component tolerances-- and which doesn't work worth crap once moved over into "solder space."

I must be really slow today. Other People already said most of what I said.:(
I've been chattering like a magpie today; I've been up since 4 this morning, and I'm still burning off the residue from 7 cups of Jet Fuel Extra Bold coffee.
 

#12

Joined Nov 30, 2010
18,224
Coffee fiend? I've been up for 27 hours right now.:rolleyes:
And I am only considering bed because my back is holding some tension.
A 10 minute relaxation exercise would work wonders, but I wouldn't get up in 10 minutes. I would wake up about 11 tonight.:D
I would rather zoom around on a coffee high until after dark and wake up tomorrow morning.;)

I make really good coffee.:)
Yuban is my preference.
I don't know how many I've had since yesterday at noon.:oops:
It's quite possible, using a simulator, to unintentionally create a circuit which depends on matched components and/or infinitely tight component tolerances-- and which doesn't work worth crap once moved over into "solder space."
Right now I am in a debate with MrAl wherein I say, "You can calculate the bejesus out of a design problem and reality will usually intrude in some foul way.:(" and he says, "Sorry to say but you dont seem to be able to appreciate the value of cold hard theory."

https://forum.allaboutcircuits.com/...t-stage-of-filter-and-regulator.136315/page-3
Posts 33 and 42.

Maybe you can ask MrAl to design this down to milliamp accuracy.:D
 

Thread Starter

ebeowulf17

Joined Aug 12, 2014
3,307
Thank you all for your replies. This is exactly what I needed, and this forum is awesome, as usual! I'm going to manipulate some resistor values for my target current limit (allowing at least a 2:1 margin of error in each direction, or 4:1 overall span between the smallest amount of current I'm really depending on it to pass, and the largest amount that can slip through before real trouble begins.)

As for the misleading nature of sims assuming perfect parts, I was well aware of that - it's the main reason I came here in the first place. I knew better than to think that I could just try any old thing in the sim and have it work just like that in reality. I really appreciate all of your insights, and I think I'm on the right track now.

My favorite misleading sim trick was very early on, when I had simmed something that should've run out of juice at around 50 amps or so, but since I had a perfect voltage source, it maintained the requested 240VAC up into the thousands (millions?) of amps. Apparently LTSpice thought I was simulating a nuclear reactor, or the sun, or...
 

OBW0549

Joined Mar 2, 2015
3,566
Maybe you can ask MrAl to design this down to milliamp accuracy.:D
As a wise man once said, "I'd rather give a leopard an enema than try to tackle that one." Banging my head against the brick wall of someone else's obstinacy is not my idea of entertainment. (That's also why I don't bother with the political threads.)
 

OBW0549

Joined Mar 2, 2015
3,566
I'm going to manipulate some resistor values for my target current limit (allowing at least a 2:1 margin of error in each direction, or 4:1 overall span between the smallest amount of current I'm really depending on it to pass, and the largest amount that can slip through before real trouble begins.)
That might be unnecessarily conservative; my guess would be you can expect currents to be within +/- 25% of the values predicted, maybe even a bit better.
 

#12

Joined Nov 30, 2010
18,224
Banging my head against the brick wall of someone else's obstinacy is not my idea of entertainment.
MrAl is no fool, but sometimes I feel a certain abrasion between us.:rolleyes:
We have different opinions and I expect no progress in modifying each other.:(
I believe most of what he believes, but he thinks I don't believe in theory at all because I believe theory often differs from reality by the time the calculations get to the 4th decimal place.o_O
 
Last edited:

Thread Starter

ebeowulf17

Joined Aug 12, 2014
3,307
That might be unnecessarily conservative; my guess would be you can expect currents to be within +/- 25% of the values predicted, maybe even a bit better.
That's welcome news, and I'll keep it in mind for future projects. For this particular project, I've got about that much room between my component capabilities and my output needs anyway, so I might as well split the difference.
 

#12

Joined Nov 30, 2010
18,224
my guess would be you can expect currents to be within +/- 25% of the values predicted,
I'm thinking even better results, right after the resistor values are dialed in at normal operating temperature.;)
In the calibration lab, it is called, "select" which means the engineer designs it, then I select the resistor value which causes performance most closely resembling the intended results.
 

OBW0549

Joined Mar 2, 2015
3,566
MrAl is no fool, but sometimes I feel a certain abrasion between us.:rolleyes:
We have different opinions and I expect no progress in modifying each other.:(
I believe most of what he believes, but he thinks I don't believe in theory at all because I believe theory often differs from reality by the time the calculations get to the 4th decimal place.o_O
My 2011-2012 cancer scare prompted me to do a lot of re-evaluating and re-prioritizing of the various things in my life. One outcome from that is that I resolved to not waste any more of the time I have left-- whether it's 5 years, or 10, or even 15-- locked in "death-match" debates with people who just love to fight for fighting's sake. I prefer to say my piece as best I can, and be done with it.
 

#12

Joined Nov 30, 2010
18,224
I resolved to not waste any more of the time I have left locked in "death-match" debates with people who just love to fight for fighting's sake.
About once a year I get sucked into explaining myself to someone who only wants to believe they "won" but I figure it out pretty quickly and click on, "Ignore". You can see by my post count that I burn through a lot of "help needed" Threads by not stopping to argue.;)
 

Thread Starter

ebeowulf17

Joined Aug 12, 2014
3,307
So, I know we've just been talking about the fallibility of simulations, but I'm having trouble with mine, and I'm at least as fallible as they are, so let me run this by you guys. I tried to follow the steps laid out by OBW0549 above and came up with the following numbers:
  • 80mA Target load current limit
  • 5mA Target control current
  • 0.264V drop across R61 and same drop across R62
  • 3.3 ohms R62 to achieve 0.264V drop at 80mA
  • 52.8 ohms R61 to achieve 0.264V drop at 5mA
  • 4.086V needs to be dropped across R67 (5V supply - 0.65Vbe for 2N3906 - 0.264V dropped across R61)
  • 817.2 ohms R67 to achieve 4.086V drop at 5mA

When I tried simming this in LTSpice, I got very close to the expected control current, and pretty close to the expected voltage drops on the control side, but the load side doesn't work as expected. I get 173mV instead of 264mV dropped across R62, and I get a load current limit of 52.4mA instead of the intended 80mA.

Does it look I like I misunderstood the instructions and/or miscalculated something, or do you think this is just an error in the simulation? I know that I may have to adjust one or more resistor values once I've put the thing together, but I'd like to make my best first attempt, since I don't have a huge variety of resistor values on hand to try making substitutions with. I'll be ordering what I need for this project, and I'd like to at least be in the ballpark when I start!
 

OBW0549

Joined Mar 2, 2015
3,566
Does it look I like I misunderstood the instructions and/or miscalculated something, or do you think this is just an error in the simulation?
Neither-- it's an error by the doofus who wrote the instructions (me), in that they didn't account for the fact that the two transistors will not have the same Vbe: the transistor with the higher collector current is going to have a somewhat higher Vbe than the other, and this will cause the actual current to be lower than that predicted. Looking at Fig. 4 on the 2N3906 datasheet and extrapolating, it looks like the difference in Vbe from Ic = 5 mA to Ic = 80 mA would be about a hundred millivolts, which is roughly in line with what you're observing. You can reduce the value of R62 accordingly to compensate.

I apologize for the oversight.
 

Thread Starter

ebeowulf17

Joined Aug 12, 2014
3,307
Neither-- it's an error by the doofus who wrote the instructions (me), in that they didn't account for the fact that the two transistors will not have the same Vbe: the transistor with the higher collector current is going to have a somewhat higher Vbe than the other, and this will cause the actual current to be lower than that predicted. Looking at Fig. 4 on the 2N3906 datasheet and extrapolating, it looks like the difference in Vbe from Ic = 5 mA to Ic = 80 mA would be about a hundred millivolts, which is roughly in line with what you're observing. You can reduce the value of R62 accordingly to compensate.

I apologize for the oversight.
Nothing to apologize for. Thanks for all your help. I really appreciate having the basic framework for how to approach this problem, as well as learning what to look for on the datasheet to apply it. This is all good stuff! It's a bit of a handful for me to completely wrap my head around, but I think I at least understand it well enough to apply it for now.
 

Thread Starter

ebeowulf17

Joined Aug 12, 2014
3,307
Been swamped at work, but finally breadboarded this circuit today and everything works as planned.
IMG_1923.PNG
The current limit is higher than expected (~130mA instead of 80,) but probably still close enough for my purposes. All it needs to do is protect the rest of the circuit in case of a short on the output. I might see if I have any resistors lying around that would be suitable for fine tuning the current limit, but I'm not too worried about it either way.

Thanks again for all the help here. I could've blindly copied the circuit I referenced in the beginning and would've been ok since I ended up using very similar resistor values, but I would've had no idea how or why it worked. As it is, I learned a lot and got a working circuit. Thanks!
 

Thread Starter

ebeowulf17

Joined Aug 12, 2014
3,307
One more update - actually, the circuit works perfectly and is very close to the design current limit, passing 78mA through a short vs the designed limit of 80mA. The problem was D3. The two diodes were last-minute additions to the design and I just used some diodes I had lying around. I didn't realize they were zener diodes. Even at that, they're 5.1V Zeners, so I would expect them to still work at 5V supply, but the USB voltage I'm testing this with is over 5.3, so it's forcing the Zener to conduct and leak some amount of current constantly. The clue that alerted me to the fact that something besides my current calculations was off is that the indicator LED would light (albeit incredibly dimly) when the circuit was off. I was pretty sure that the MOSFET wouldn't leak enough current to do that, and I could easily verify that my Gate-Source voltage was correct, so I poked around some more and finally realized it was the Zener that was leaking. Without a Zener at D3, everything is perfect.

I'm embarrassed by such a silly mistake, but I'm glad I found it, and glad that the current limiting circuit really is working exactly as intended!
 
Top