Last time, I teased you about the dark side of opamp supply current, especially when we’re talking about negative supply pins and how the Single Supply Gang are going around connecting all those pins to GND. It’s time to dig deeper (this time with pictures).
We’ll need some help from Herr Kirchhoff – but we’ll also need to bring him up to date. As it happens, Kirchhoff was born in the same year (1824) that Berzelius is credited with discovering the element Silicon. He also died before anyone knew about energy levels, let alone semiconductors and opamps.
So let me introduce you to my take on Kirchhoff’s Current Law As Applied To Opamps. That’s not a particularly memorable mouthful, though; you’ll have forgotten it by tomorrow. It needs to sound more like a spy movie. How about…
The Kirchhopamp Protocol.
To derive The Kirchhopamp Protocol I’ll make some simplifying assumptions. First, that the opamp’s input terminals play no part in our current discussions. Sure, a few stray electrons shuffle back and forth in the circuits we build, but they generally amount to picoamps or nanoamps of leakage, and that’s too small to worry about here.
Second, that there are no hidden batteries or other generators inside an opamp. Put another way, it cannot be a source of net energy in any circuit. We’ll ignore the fact that if the package were made from a material that’s transparent at some optical wavelength, then the pn junctions in the opamp circuit could act as little photocells when light hits the chip. There’s more to say about how and when light can mess up semiconductor circuits, but that’s for another day.
So as far as we are concerned for this discussion, then, our ideal Kirchhopamp has three terminals: positive supply, negative supply, and output. Or pin 7, pin 4 and pin 6, as we old guys call them, remembering those DIP8 days when opamps were big enough to see with the naked eye. I just designed in an opamp that comes in a package that’s about 1 x 0.7 mm. About the same size as the grain of sand that, in our romantic imagination at least, the silicon wafer came from.
Here, then, is The Kirchhopamp Protocol in a nutshell: the sum of the currents flowing into the three terminals of a Kirchhopamp is always zero.
Figure 1: A Kirchhopamp and its currents.
In equation format: Iplus + Iminus + Iout ≡ 0.
Now, just in case you’re about to reach for your trusty simulator to validate this claim, let me say just one thing: STOP. In the scary world of opamp SPICE models, the laws of thermodynamics, conservation of charge and conservation of energy frequently do not apply. Opamp models regularly contain non-physical voltage and current sources that can make external circuit currents appear and disappear in baffling ways. It shouldn’t surprise you to know that the biggest culprit is GND, which frequently turns up in the netlists of these opamps models even though a real-world opamp doesn’t have a GND pin. Don’t even get me started about non-physical noise behaviour…
Our equation is interesting both for what it tells you and for what it does not tell you. Let’s start with what it tells you: if there’s no load (i.e. Iout = 0), then in this quiescent condition:
Iminus(q) ≡ ‑Iplus(q)
In other words, the magnitudes are equal: |Iminus(q)| ≡ |Iplus(q)| = (ideally) the quiescent current consumption figure given in the amplifier’s datasheet. As an aside, Iplus(q) > 0 and Iminus(q) < 0 must be the case, at least in the long term, otherwise something is violating our no-internal-battery constraint. Hope that’s obvious.
Note that I snuck in an (ideally) there. I’m ignoring the actual output voltage of the opamp here because it should not make a difference; if you’re not taking any output current from a well-designed opamp, the current that it sucks from the power supply should not depend on what it’s doing. Yet again, the behaviour of some devices is a disappointment here. I’ve seen opamps whose supply current rises alarmingly when the amplifier’s output nears the supply voltage, even though the amplifier’s output stage isn’t doing any useful work. Just be alert to the fact that the quiescent current may not actually be independent of other circuit conditions. Oh, it’ll be temperature-dependent too, for sure… but we’re deviating from my intended narrative.
Now let’s go back to the equation to see what it does not tell you: that we don’t know anything about the value of either Iminus or Iplus when Iout <> 0. This is the complicated bit that makes The Kirchhopamp Protocol such an interesting adventure, not just a dry equation. But why is this?
The answer is to be found in the output stage topology. Of course, an opamp has several other stages, but by and large these don’t take much current, and that current doesn’t depend much on external conditions. Nearly all the grief you’ll experience comes from that output stage. It’s where the rubber meets the Rload, as it were…
Note that here we’re talking about output stages that can both source and sink the output current; in other words, both Iout < 0 (i.e. is negative, meaning that it flows out of the pin) and Iout > 0 (it’s positive, flowing into the pin) are permitted. This is mandatory for any kind of general-purpose opamp.
There are quite a few potential output stage topologies to consider. Each one presents a different challenge to the system and board designer. Getting useful bidirectional currents out of amplifier circuits has always been of great interest to audio engineers, so it’s no surprise that much of the material you’ll find out there on the web has a strong audio focus.
There’s not nearly enough space available here to descend either into the definitions of, or the relative merits of, so-called Class A, Class B and Class AB output stage forms. In essence, there are two things you need to know about an output stage to figure out what supply current issues it will cause you.
First, look at the relationship between the expected output current and the output stage’s own quiescent current. Broadly speaking, if the output stage has a quiescent current significantly greater than the expected load current, it’s referred to as operating in class A. If the maximum output stage current (of either polarity) is much greater than the quiescent current that indicates class B operation. And class AB fills in a rather poorly-defined range between these extremes.
Second, are you dealing with a ‘push-pull’ output stage or a single-ended one? This can actually be a little tricky to determine from a simplified schematic. The distinction is this: in a single-ended stage, only one of the transistors that connect the output pin to either the positive or the negative supply pins is actually controlled by the signal. The other one just sits there taking a fairly constant current. By contrast, in a push-pull circuit, both the ‘push’ transistor (the one connected between the output pin and the positive supply) and the ‘pull’ transistor (between output and the negative supply) can be controlled, so that the current in both of them can vary.
Let’s consider the difference in externally visible behaviour between what I’ll call an ideal push-pull stage (audio guys call this a Class B output stage) and the two obvious variants of the single-ended output stage. The ideal class B push-pull stage we’ve already seen can be thought of as a current-steering block. If Iout is negative (i.e. coming out of the pin), then Iout is drawn from the positive pin while the current in the negative supply pin is unchanged. In other words,
Iminus = Iminus(q)
Iplus = Iplus(q) – Iout (remember, Iout is negative so Iplus > Iplus(q))
Analogously, if Iout is positive (i.e. going into the pin, sorry to keep emphasizing this), then
Iplus = Iplus(q)
Iminus = Iminus(q) – Iout
What happens if Iout is supposed to be a nice clean sinewave? It should be pretty clear (even without a diagram) that the current in the positive supply pin is the quiescent current plus the positive half-wave rectified bits of the sinewave. The negative supply current has the quiescent part plus the other, negative-going half-wave parts. So both currents are horribly distorted. Figure 3 shows the currents resulting from the test harness in Figure 2.
Note: by no means all simulation models of opamps are Kirchhopamps! I have an aversion to using amplifiers whose simulation models aren’t good. You only need to look at my Bypass Capacitor sequence to see how this has been a thing for me for since the early years of this Century.
Figure 2: a test circuit to show distorted supply currents.
Figure 3: the currents of figure 2 and their sum. Kirchhopamp = YES (green trace).
If you are trying to build a high-linearity circuit, well, would you want those nasty distortion components flowing in your ground plane and power traces? I thought not. But that’s often what will happen on your board if you let the Single Supply Gang connect the negative supply pin to GND even though it does have to be at that potential!
This is why some designers (especially high-end audio designers) like a single-ended output stage design. And here, there are two choices to make:
Figure 4: an amplifier that only modulates Iminus.
Constant current on the positive side: Here the ‘upper’ transistor to the positive supply pin just sits there as a constant current source (figure 4), while the ‘lower’ transistor to the negative supply does all the varying. All changes in the output current are faithfully mirrored in the current emerging from that negative supply pin. Now, if that pin gets connected to GND, at least the current injected is undistorted. You might get crosstalk, but not additional system-level distortion. And the power supply gets an easy ride, because the current it has to deliver does not vary with the signal.
Figure 5: an amplifier that only modulates Iplus.
Constant current on the negative side: This is the other way round. Now all the output current variation is cleanly sourced by the power supply connected to the positive supply pin, and there’s no variation in the current emerging from the negative supply pin (figure 5). It’s therefore actually safe to connect the negative supply pin to GND without injecting any rubbish into that net. The power supply (or the nearby bypass capacitor) needs to supply the signal current.
As a parting thought, remember that even if your amplifier is running on a single supply, it may be receiving from, and sending to, circuits that have signals of both polarities, due to the presence of input and output coupling capacitors.
As always, ping me with questions, comments, complaints and (especially) with ground-breaking new circuit ideas (see what I did there?).