Current mirror explanation - Page 1
Forum section: electronics / beginners

author: Analog Kid
author_rank: Super Contributor
timestamp: October 22, 2024, 10:05:48 pm
content: I ran across this in my electronic document archive, part of an explanation of how current mirrors work:OK, fine: I don't really understandhowthis (adding the two resistors) helps. They sayQuoteHow, exactly, does it do that? What is the mechanism that accomplishes this? (Please, please, no Ebers-Moll! that stuff gives me a headache.)Nothing said about the value of those resistors; I'm assuming it should be something low, something <100Ω.

author: Benta
author_rank: Super Contributor
timestamp: October 22, 2024, 10:15:42 pm
content: It's simply because when making a current mirror, the VBEof the two transistors should be equal and track each other over temperature, current etc. Only possible on a single substrate.The emitter resistors equalize differences in VBE. The resistor value is dependent on the current range in the mirrors, but a voltage drop of 50...100 mV across them is reasonable.

author: Analog Kid
author_rank: Super Contributor
timestamp: October 22, 2024, 10:22:08 pm
content: Quote from: Benta on October 22, 2024, 10:15:42 pmOK;howdo they do that? Still mystified here.

author: tggzzz
author_rank: Super Contributor
timestamp: October 22, 2024, 10:22:21 pm
content: Quote from: Analog Kid on October 22, 2024, 10:05:48 pmThe mechanism is a variant of "emitter degeneration".That is the simplest current mirror variant, and unsurprisingly it has non-ideal behaviour. Slightly more complex ones reduce the non-idealities.To understand the non-ideal behaviour requires understanding the Ebers-Moll equations, or similar. No point in trying to sugar-coat a complex subject, and make ittoosimple. Understanding complex subjects requires a lot of hard work and effort; deal with it.Key search term, other than "current mirror", is "translinear circuits".

author: Analog Kid
author_rank: Super Contributor
timestamp: October 22, 2024, 10:26:42 pm
content: Quote from: tggzzz on October 22, 2024, 10:22:21 pmYou're missing the point. I'm not trying to understand the "non-ideal behavior" here; I'm trying to understand the basic mechanism by which those resistors (at least somewhat) equalize differences in VBE.

author: golden_labels
author_rank: Super Contributor
timestamp: October 22, 2024, 10:44:06 pm
content: Tggzzz did answer that in the first sentence: “the mechanism is a variant of ‘emitter degeneration’.”The rest is a commentary giving you a wider perspective.

author: langwadt
author_rank: Super Contributor
timestamp: October 22, 2024, 10:46:08 pm
content: Quote from: Analog Kid on October 22, 2024, 10:26:42 pmif one transistor has a slightly lower Vbe it'll draw abit more current, the extra current will cause a higher voltage drop over the emittor resistor, that extra voltage is subtracted from the voltage on the base

author: TimFox
author_rank: Super Contributor
timestamp: October 22, 2024, 11:21:07 pm
content: The total voltage from each base to the negative rail includes aVbeand the voltage across the series resistor (R1 or R2) to the negative rail.There will be a small variation from part to part onVbe, but the resistors can be matched to very tight tolerance.If the voltage across the resistor is greater than theVbe, then it dominates the current mirroring and improves the match in the two emitter currents.The emitter current of the right transistor will be determined by the voltage across its emitter resistor R2.In the limit where the resistors are huge, whereV(R1 or R2) >>Vbe, then the current ratio becomes independent of the difference between the twoVbes.

author: Kim Christensen
author_rank: Super Contributor
timestamp: October 22, 2024, 11:27:42 pm
content: FYI, matched pairs for current mirrors are pretty cheap to buy.BCM61Bfor a matched NPN pair in a single package or BCM62B for PNPs. Less than $0.50 at Digikey.

author: Analog Kid
author_rank: Super Contributor
timestamp: October 22, 2024, 11:36:39 pm
content: Quote from: TimFox on October 22, 2024, 11:21:07 pmThe source I quoted above goes on to say:QuoteSo I take that to mean that by intentionallynotmatching the Rs, you can build a proportional current mirror where the output (sink) is some multiple or fraction of the input current: is that correct?

author: langwadt
author_rank: Super Contributor
timestamp: October 22, 2024, 11:40:32 pm
content: Quote from: Kim Christensen on October 22, 2024, 11:27:42 pmI seem to remember someone xraying and thermal imagining some transistor pairs, and I think all of them where separate dies in a package, which might be good enough

author: Analog Kid
author_rank: Super Contributor
timestamp: October 22, 2024, 11:48:45 pm
content: Heh; I've thought of hand-matching 2 Qs (breadboard a current mirror and measure how well it tracks), then epoxying the 2 Qs together to make a DIY "matched pair". ("With temperature compensation!")Could sell them on eBay, maybe.

author: David Hess
author_rank: Super Contributor
timestamp: October 22, 2024, 11:53:24 pm
content: The trick here has to do with the emitter resistance of the transistors, which determines the change in emitter current versus a change in base-emitter voltage:rein ohms = 0.026 volts / IE(emitter current in amps) orrein ohms = 26 / IE(emitter current in milliamps)So 1 milliamp yields 26 ohms, 10 milliamps yields 2.6 ohms, etc.Now the transistors have a mismatch in Vbe voltages, which when combined with the emitter resistances produces an error in the emitter currents, and thereby the collector currents. Adding the external emitter resistors reduces this error because they add to the emitter resistances of the transistors so the difference in Vbe voltages has less of an effect.Note that this also applies to noise. The transistor operates as if a voltage noise source is in series with the base-emitter voltage, and the total emitter resistance converts this into a noise current, so adding the external emitter resistors also reduces the current noise.

author: Analog Kid
author_rank: Super Contributor
timestamp: October 23, 2024, 12:02:23 am
content: Quote from: Kim Christensen on October 22, 2024, 11:27:42 pmThanks. Unfortunately we only use through-hole parts here at AnalogKid Laboratories, GmbH.

author: TimFox
author_rank: Super Contributor
timestamp: October 23, 2024, 12:07:08 am
content: For non-precision applications, the left transistor Q1 is not actually necessary. As mentioned above, the current in Q2 is determined by R2 and the voltage across it.Q1 helps to reduce the temperature dependence of the mirror, since the twoVbevoltages tend to track each other with temperature.For precision applications, with non-huge resistors, IC designs often parallelnidentical transistors at Q2 to get a higher mirrored current whereI(Q2) =nxI(Q2), each component of Q2 having its own emitter resistor R2.If the transistors are matched really well, since each transistor's emitter current is determined by itsVbe, the mirror can omit the two resistors R1 and R2.There is also a three-transistor current mirror circuit that improves performance, which you can find by searching the literature.

author: David Hess
author_rank: Super Contributor
timestamp: October 23, 2024, 12:09:26 am
content: Quote from: Analog Kid on October 22, 2024, 11:48:45 pmIt works fine, but I doubt you could sell them at any sort of profit.I match the transistors by measuring their Vbe at a suitable test current. It usually only takes a few minutes to get several matches better than 100 microvolts.Quote from: langwadt on October 22, 2024, 11:40:32 pmSeparate dies in the same package works fine, and even has some advantages like less parasitic coupling between the transistors. There are many circuits which work better with matched pairs rather than monolithic matched pairs because of parasitic elements in the later.

author: golden_labels
author_rank: Super Contributor
timestamp: October 23, 2024, 12:10:02 am
content: You may also approach this starting from an emitter follower configuration.Ignoring small current to Q1’s base, all input current must go through Q2 and R1. This means voltage across R1 reflects input current. The base-emitter junction of Q2 offsets that by about +600 mV.The right part, if seen as an emitter follower, outputs the same voltage, reduced by Q1’s base-emitter drop of -600 mV, on R2. If voltage on R2 is the same as on R1 and they’re the same value, by Ohm’s law the current on them must also be equal. And since that current on R2 is mostly drawn from Q2’s collector, Q2 pulls the same current as Q1 is fed.This isn’t true, because components are mismatched. So they’re not going to be identical. However, an emitter follower configuration is highly resistant to variation in transitor’s amplification and base-emitter drop. Much, much more than the original configuration, which depends on both transistors having identical behavior. Since the emitter resistors can’t be too big, this is goign to be a very imperfect emitter follower, but in principle the benefits are still there.

author: TimFox
author_rank: Super Contributor
timestamp: October 23, 2024, 12:12:50 am
content: Quote from: Analog Kid on October 23, 2024, 12:02:23 amIn the current trend of discontinuing TH parts, it is hard to find dual transistors.You might still find them on eBay, in TO-5 shaped TH packages.Another interesting obsolescent part is the old RCA CA3046 transistor arrays and others in that series, which were originally in DIP.Jameco is a reasonable source for obsolete semiconductorshttps://www.jameco.com/z/CA3046N-Major-Brands-IC-CA3046N-LM3046N-DIP-14-General-Purpose-NPN-Transistor-Array_12079.html

author: Analog Kid
author_rank: Super Contributor
timestamp: October 23, 2024, 12:31:02 am
content: Quote from: TimFox on October 23, 2024, 12:07:08 amYes, the Wilson mirror. Was just reading about it a minute ago in Horowitz & Hill.

author: mawyatt
author_rank: Super Contributor
timestamp: October 23, 2024, 01:24:30 am
content: Quote from: Analog Kid on October 23, 2024, 12:31:02 amA good book on Current Sources & Voltage References is by Harrison.https://books.google.com/books?id=03JmxpE39N4C&pg=PA87&lpg=PA87&dq=Wyatt+Current+Source&source=bl&ots=5zevJ8Ypzb&sig=ACfU3U3DvUbu9AotugZ_GWm2zi6zyEj6pA&hl=en&sa=X&ved=2ahUKEwicmoqB9Oj2AhWOSjABHRumDjYQ6AF6BAgYEAM#v=onepage&q=Wyatt%20Current%20Source&f=falseOrginial EDN Article.https://www.edn.com/peaking-current-source-has-high-rejection/#google_vignetteSee #2 mentioned below.https://www.eevblog.com/forum/projects/some-free-bw-in-a-cascode-amp/msg3719158/#msg3719158See #10 mentioned below.https://www.eevblog.com/forum/chat/leds-as-a-low-noise-shunt-regulator/msg3899102/#msg3899102Best,

author: ejeffrey
author_rank: Super Contributor
timestamp: October 23, 2024, 02:33:00 am
content: Quote from: Analog Kid on October 22, 2024, 10:22:08 pmConsider a 10 mA current mirror. Let's say Vbe of one transistor at equal current is 25 mV less than the other. In the first circuit, the operating Vbe is constrained to be equal so that transistor will have 2.7 times the current flow or 27 mA. That's the ebers moll equation.Now instead put a 10 ohm resistors on each emitter. Now the emitters can float relative to each other, and the 25 mV difference in emitter current is now only 2.5 mA instead of 17 mA.

author: ButchJames
author_rank: Newbie
timestamp: October 25, 2024, 07:48:06 pm
content: QuoteSome of thestability reasonsare ...*** The base-emitter junction needs to be biased correctly, and an emitter resistor Re makes that mathematically easier and safer for the base-emitter junction.*** The resistors in the emitter are there - to preventThermal Runaway.*** The resistors in the emitter leg of the circuit also generate effectivelyCurrent-Series(negative) feedback, and as mentioned - naturally helps prevent Thermal Runaway.{Current-Series: A 'sample' of the output current generates an effective Voltage (in series, at the input) feedback}

author: Analog Kid
author_rank: Super Contributor
timestamp: October 25, 2024, 09:09:07 pm
content: Quote from: ButchJames on October 25, 2024, 07:48:06 pmOK, fine: buthowexactly? Without further explanation that just sounds like a lot of handwaving to me.QuoteOK, kind of like you'd have in a push-pull emitter follower, right? Sometimes referred to as a "cushion".QuoteAgain, this is insufficient explanation.Thanks anyhow.

author: TimFox
author_rank: Super Contributor
timestamp: October 25, 2024, 09:12:20 pm
content: Read reply 14 above.

author: tggzzz
author_rank: Super Contributor
timestamp: October 25, 2024, 09:38:03 pm
content: Quote from: Analog Kid on October 25, 2024, 09:09:07 pmI suggest you devote some time and effort to reading textbooks and literature. The authors of such material will have taken a lot of time and care to make complex and subtle points understandable in detail. Several previous posts have provided pointers.If you think that someone making a quick post on a forum is going to spend their timepoorlyduplicating that, then you are deluding yourself.Personally I will spend some of my life pointing someone in the right direction. I will not spend my life spoon-feeding someone with information readily available elsewhere. People that demand spoon-feeding are time-vampires, and I have little sympathy for them.

author: Analog Kid
author_rank: Super Contributor
timestamp: October 25, 2024, 09:45:09 pm
content: Fortunately there are others here who don't share your unhelpful elitist attitude.if that's your answer to everything, then why even bother having this forum at all? Just go read a book or three.

author: tggzzz
author_rank: Super Contributor
timestamp: October 25, 2024, 10:26:13 pm
content: Quote from: Analog Kid on October 25, 2024, 09:45:09 pmWe haven't missed that you have carefully avoided addressingallof the points I made. TBH that didn't surprise me.It isn't an elitist attitude. It isn't an answer to everything; nothing is. Your comment about why a forum exists is just silly.I've read far more than three books. Often the more difficult they are the more I enjoy them.Electronics isn't a simple subject; grokking small bits of the subject requires a lifetime of hard work. If that doesn't suit you, then you may find other activities more fulfilling.

author: magic
author_rank: Super Contributor
timestamp: October 26, 2024, 05:18:50 am
content: Quote from: tggzzz on October 25, 2024, 09:38:03 pmThis is very demonstrably incorrect.You would have a point if you left out "poorly"

author: tggzzz
author_rank: Super Contributor
timestamp: October 26, 2024, 10:04:11 am
content: Quote from: magic on October 26, 2024, 05:18:50 amYeah, there are counter-examplesAn excellent counter-example is the threadhttps://www.eevblog.com/forum/beginners/what-an-oscilloscope-recommended-for-a-woman-passionate-about-electronics/msg3100087/#msg3100087with 972 posts in it. That OP was also a beginner, but they had an attitude (and aptitude) that encouraged people to help them.This thread's OP could do worse than skimming that thread to see how the OP managed that feat.

author: RoGeorge
author_rank: Super Contributor
timestamp: October 26, 2024, 10:10:49 am
content: The current mirror might make more sense after reading about the"Translinear Principle"or"Translinear Circuits".If the video doesn't clarify the miror current, search online for the above terms"Translinear Principle"or"Translinear Circuits".The best read would be Chapter 2 of "Analogue IC Design - the current mode approach" (edited by Toumazou-Lidges). That chapter is called"Current-mode Circuits From a Translinear Viewpoint: A Tutorial" by Gilbert Barrie.The tutorial is an enlightening read, because once you get that, not only the current-mirror but also most of the other circuit structures typically used in analog IC will become clear. The article has almost no math in it, and the explanations are based on intuitive descriptions of the BJT, not on math. It was written by the author who proposed the name "Translinear" in an IEEE paper, though the paper might not be as good for learning as the tutorial article is.

author: tggzzz
author_rank: Super Contributor
timestamp: October 26, 2024, 03:38:14 pm
content: Quote from: RoGeorge on October 26, 2024, 10:10:49 amAlready suggested (and apparently ignored) in reply #3That Toumazou book is indeed excellent, as is his "spiritual companion" book Switched-Currents: An Analogue Technique for Digital Technologyhttps://www.amazon.co.uk/Switched-Currents-technique-technology-Materials/dp/0863412947

author: Analog Kid
author_rank: Super Contributor
timestamp: October 26, 2024, 10:28:46 pm
content: Well guess what, @tggzzz; I watched that very video last night. Found it all on my own searching for stuff on translinear circuits. (If you posted a link to it I missed it.) It's an excellent video: Gilbert is clearly an exceptional thinker and innovator, on top of which he's a very good teacher. I could see having him as an electronics prof, had I gone that route. Very smart guy. I must say, however, that I still really don't understand how translinear circuits work; part of it is my antipathy to mathematical explanations. (If you think that's a fault or defect on my part, then so be it. No shame here.) Maybe if I dig into it a bit more it'll become clearer. In the meantime it's enough to know that it works.Since you've bothered to reply to me--thrice--let's play one more round here. I still have to say that I find your whole approach here repugnant, extremely unhelpful, antagonistic and high-handed. If you were my Electronics 203 prof that would be one thing, as I'd have something of a contractual obligation to follow your teaching method. But you aren't and I don't. So what do you think gives you the say-so to treat anyone who doesn't follow your prescribed advice to the letter with contempt?My objection to your approach, which I've stated here before, is that people like you seem to insist that if I have a question about some electronic topic, I have to understand the whole enchilada or else I'm sunk. But that's not the case: what I'm after here (and I think I made it pretty clear) was just a first- or maybe a second-order explanation of some aspects of how current sources work. But you're trying to shove down my throat the whole subject, down to 4th-, 5th-order and beyond ramifications. Ebers-Moll, the Early effect, temperature effects, etc., etc. That would be fine, if that's what I asked for, but I clearly did not. Yet you insist that if I even try to ignore what you're preaching here that I'm either an ignoramus who doesn't deserve any help from anyone, or an ungrateful bastard. Regarding the second, I think you'll find that I do express gratitude to those who really do try to help me here, so you really can't accuse me of ingratitude. If you think I'm biting the hand that feeds me, it's only if it doesn't feed me but annoys me instead that it might get bitten.I'm not sure why you (and others like you here) persist in your high-and-mighty attitude; perhaps it's an ego gratification thing. However, I'll refrain from any further attempt at psychoanalysis here, as I don't know you and don't really have a clue as to your motivation.As I wrote before, fortunately there are plenty of others here who are willing to give of their time and knowledge to help a poor wretch like me, even if my knowledge is far beneath theirs, so in the future if you persist in your browbeating you can simply be ignored. However, before I finish, a small piece of free advice: if you somehow feel compelled to reply to someone here not by answering their question but by browbeating them, you can always choose to simply STFU. Just sayin'.

author: TimFox
author_rank: Super Contributor
timestamp: October 26, 2024, 10:55:03 pm
content: Quote from: Analog Kid on October 22, 2024, 10:05:48 pmBack to your original question: Force a currentI1down the input into Q1 and R1, so thatV(R1) =I1R1The voltage across R2 is given byV(R2) =V(R1) +Vbe1-Vbe2=I1R1+Vbe1-Vbe2Now, the differenceVbe1-Vbe2should be small: what will cause a mismatch?1. The two transistors, even from the same part number, differ slightly.2. The junction temperatures of the two transistors are a bit different.3. The operating conditions of the two transistors, with different connections, are different.Nevertheless, the difference is small.Make the equal resistancesR1=R2large compared to that small difference, and the voltagesV(R2) andV(R1) will be close to equal, since the small difference does not affect the larger voltages much. It is easy to buy good metal-film resistors with 1% tolerance.The emitter current in Q2 will then equalV(R2) /R2, which will be very close toI1.For large resistors, the difference will be mainly due to the resistor tolerance, hence statements of predictability.Of course the collector current in Q2 is slightly changed due to the finitehFEof Q2, but that is probably less than the 1% tolerance on the resistors.

author: tggzzz
author_rank: Super Contributor
timestamp: October 26, 2024, 11:13:24 pm
content: Quote from: Analog Kid on October 26, 2024, 10:28:46 pmIt isn't a fault or defect, but avoiding the mathematical models is a limitation in the long term. Weallhave limitations, of one sort or another; some we can overcome, some we can't.Grokkinganydeeply technical subject is alifelonglearning experience; that's what makes it worthwhile. It takes a lot of hard work, and isn't easy.

author: BillyO
author_rank: Super Contributor
timestamp: October 27, 2024, 12:26:05 am
content: QuoteHow? We can try a simplified “intuitive” approach, although you won’t truly understand what is going on unless you look into the theory a bit more.Let’s say for one reason or another Q1 tends to pass more current for a given base voltage (Vb is the same for both transistors - obviously) than Q2. Let’s also say R1=R2, just to keep things simple in your mind. If Q1 tries to pass more current than Q2 then the voltage across R2 will be higher than across R1, this will reduce the Vbe on Q1 thereby reducing the current through Q1 (as opposed to having no resistors) and balance things out a little better between them. This is known as "negative feedback". Iout will still not equal Iin, but it will be better. The larger R1 and R2 are the better the current though Q1 and Q2 will match and the better Iout will mirror Iin.The alternative situation, where Q1 tends to pass less current than Q2, is left as an exercise to the student.