Innies and outies

One thing I’m trying to improve my understanding of is current limiting resistors in output stages and where to put them.

Rarely do you see an op amp output connected directly to an output jack. Instead there will be a resistor in series. The usually stated reason is to protect the op amp in case the output gets shorted to ground or one of the rails — and in fact the output does get shorted to ground frequently though briefly, with 2-conductor patch cables, because that just typically happens during the act of inserting a plug into a jack. (Score one for bananas.) In the old days op amps couldn’t withstand shorting for long. Less ancient op amps like the TL07x can be shorted to ground or either rail indefinitely, and some say series resistors are just unneeded with them, but they’re usually included. “Can withstand” is after all not the same as “is good for”.

Besides that, what if two op amp outputs are connected to one another (inadvertently or otherwise)? Then they get into a fight, both trying to set the same point to different voltages. It might not damage the op amps but the resulting signal isn’t going to be one you like.

So current limiting resistors are used, very commonly 1k though sometimes 300Ω or even 100Ω. You’ll often see output stages that look like this:

where Rcl is the current limiting resistor.

But there’s a problem here. Suppose the module in question is supposed to be supplying a 1V/oct control voltage. If nothing ‘s plugged in and you check Vout you find it is indeed 1V/oct. But then you plug it into another module, one whose input impedance RL is a typical 100k. (That is, the input connects to a 100k resistor that effectively connects to ground.) Rcl and RL form a voltage divider, and Vout is no longer equal to V0; it’s (100k/101k)V0 or about 0.99V0. Now what you have isn’t 1 V/oct, it’s 0.99 V/oct.

Does that really matter? Indeed it does. It means what’s supposed to be an octave, 1200 cents, is only 99% of an octave, 1188 cents — a note that’s supposed to be an octave above another is 12 cents flat. That’s noticeable. A note that’s supposed to two octaves above is 24 cents flat. That’s bad. Four octaves is 48 cents flat — almost a full semitone. 99% is just not good enough at all.

But here’s another topology, with Rcl in the feedback loop instead of out of it:

At first you might think putting the resistor inside the loop will affect the gain of the output stage, but it doesn’t. V0 is exactly the same as before. But now V0 is equal to Vout. When you connect it to another module there’s no voltage divider — RL is still there but V0 connects directly to it. Your 1 V/oct output stays 1 V/oct regardless of the impedance of the downstream module.

Good, right? But there’s drawbacks.

First, note that you do have a voltage drop across Rcl — even if it’s hidden from the downstream module. To put 10 volts on the module output (with, again, Rcl = 1k and RL = 100k) the op amp output has to be about 10.1 volts. You’re closer to the rail than you might think, though not by much, maybe nothing to worry about. And it doesn’t really count as a disadvantage compared with the out-of-loop resistor. There you stay further from the rail only because your output is further from the desired value, so it’s kind of a wash.

A potential real problem has to do with capacitive loads. If there’s enough capacitance downstream — and a long patch cable might be enough — you can get overshoots, ringing, oscillation.

This is something I don’t understand very well myself, but here are a couple of discussions:

The takeaways as I understand:

An out-of-loop series capacitor can stabilize the circuit. It doesn’t need to be large; 5 to 50Ω is usually enough.

An in-the-loop resistor will not stabilize it, not by itself. Instead you need to add a capacitor in the loop, specifically from the op amp output to the input. Okay, but how big a capacitor? And that’s the sticky bit.

The article provides a couple of formulas to calculate not only the optimum capacitance but the optimum series resistance (though only for the non inverting case). They depend on Rin, Rf, RL, RO (the internal open loop output resistance of the op amp) and CL (the capacitive load). If I’m doing it right, for 100k Rin, Rf, and RL, 125Ω for RO (from the TL07x datasheet), and 50 pF for CL (which I take to be in the right ballpark for a meter of cable), then the optimum Rcl is 125Ω — way below the typical 1k — and the feedback capacitor should be a mere 0.2 pF. The latter is proportional to CL and to RO/Rf, which is small, so you get a small value out.

In the North Coast article the author doesn’t even consider numerical values of the capacitive load in choosing a feedback capacitor. Instead they seem to want the largest value consistent with acceptable frequency response. Because that’s a thing: The capacitor in the loop means you’re making a low pass filter, and you want the cutoff to be high enough not to be audible, for audio signals, or to too severely round off waveforms. They end up with (for an inverting case with 100k for Rin, Rf, and RL and 1k for Rcl) 33 pF.

And in this post, someone calling themself Dr. Sketch-n-Etch advocates 3.3 pF with a 220Ω to 1k Rcl, but with no explanation for how that value was arrived at. In the non inverting follower case they use 100 pF, with Rf = 4.7k and no Rin.

That’s only about a range of a factor of 500, though admittedly not for exactly comparable situations. A factor of 10 between the two inverting cases.

One additional drawback to in-the-loop is that, once again, V0 connects directly to the output. You don’t have to worry about shorting to ground or the rails, because the current is limited. But again, if one such output is connected to another, a fight breaks out and the results are ugly.

Some people even like to connect outputs deliberately, by putting them both into a passive multiple, or by stacking cables from the outputs. With an out-of-loop resistor you can get away with that. It makes a passive mixer giving you the mean of the two output voltages if the series resistances are equal. But you can’t do that with in-the-loop topologies. And arguably you shouldn’t, anyway.

To summarize:

Limits currentyesyes
Does not attenuate voltagenoyes (though this means you operate a little closer to the rail)
Stabilizes capacitive loadsyesno, unless feedback capacitor added
Does not limit frequency responseyesno, if feedback capacitor added
Well behaved if outputs connectyesno
Allows passive output mixing, if you’re into that sort of thingyes, if Rcl large enoughno

There’s not a clear winner for all situations. For 1 V/oct outputs you almost have to use in-the-loop. For audio, out-of-loop is probably better.

And as pointed out in that MW discussion, there’s also the belt and braces approach: Use an innie and an outie. A small resistor outside the loop stabilizes it without limiting frequency response and reduces the badness if outputs are connected, and then a larger resistor in the loop gives more current limiting protection. You do get some attenuation but if the outie resistor is say 50Ω then it’s only 0.6 cents per octave with a 100k load — pretty much negligible. It’s too small to do passive mixing, but that’s okay. I’ve never seen it done, though, so maybe there’s some other problem with it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s