Op-amp output hits the rails because op-amps are powerful amplifiers with gains in excess of 200,000. With a 9V single-supply, all it takes is an input voltage difference of 9V/200,000 = 45uV to hit the positive rail. Guitar outputs are around one thousand times that magnitude. So how do you keep the output of an op-amp between the rails? You use feedback.
Photo credit: Mike Malak on WikiMedia Commons
The simplest application of feedback is shown below, where the inverting input is connected directly to the output, instead of a constant reference voltage like ground. This is called negative feedback because the negative of the output feeds back into the output itself. The effect is to attenuate output.
In a plot of the input and the output for this circuit, one can only see one of the two because they lie in exactly the same place. In other words, the gain of this circuit is almost exactly unity.
As mentioned above, the gain of an op-amp is at least 200,000. For the sake of argument, suppose the gain is exactly 200,000. In the absence of supply constraints, the behaviour of the op-amp is described completely by
|Vout = 200,000 × (Vin+ − Vin-)|
where Vout is the output voltage, Vin+ is the non -inverting input voltage, and Vin- is the inverting input voltage. For small voltage levels, an op-amp will permit a voltage 200,000 times the difference in the two input voltages.
This allowed voltage may exceed the available power supply and then, as described in the previous post, the output will hit a power rail.
When there is negative feedback,
|Vout = Vin-|
as well. Putting these two equations together gives a relationship between the source signal and the output signal:
|Vout = 200,000 × (Vin+ − Vout)|
|Vin+ ≅ Vin+|
so that Vout is almost exactly Vin+.
You might well ask what good this is. We start with Vin+ and we end up with Vin+. The answer lies in understanding input and output impedance. The inputs of an op-amp are very high impedance which essentially means that the rest of the circuit is unaffected by their presence. The output of an op-amp is very low impedance and that essentially means that its output is affected only through its inputs. Apart from this, the rest of the circuit is typically irrelevant.
These properties are not shared, for example, by guitar pickups. Whatever you plug your guitar cable into, even your cable itself, can change the signal received from the pickups. So the benefit of the op-amp with negative feedback is that it can take a vulnerable guitar pickup signal and transform it into something invincible. That should sound good. 😉
A single-supply version of this unity-gain circuit places the virtual ground half-way between ground and the positive supply so that the audio signal can swing equally in either direction. Using the same approach as in the preceding post,
with the resulting plot
where once again the noninverting input is hidden behind the output signal.
Let’s look at some applications of this circuit in actual stompboxes.
This is a Buffer
This single-supply op-amp circuit (without the load resistor) appears four times in the B. Blender circuit designed by Sean MacLennan. It provides (voltage) buffers that keep two channels, one for an effects loop and one for the clean signal, separate until they are mixed together at the end of the circuit, where another buffer provides a low impedance output. Buffer is the name for amplifiers that have unity gain and that lower the output impedance of a signal path. Buffers are also called voltage followers because the output voltage is a copy of the input voltage.
In general, the components throughout a circuit influence the signal at any point. It is tempting to think of circuits as sequential, with the signal flowing in just one direction–from input to output–but this is often incorrect. To give a simple example, putting an additional resistor in series with a resistive voltage divider changes the voltage at the junction of the divider, whether you put the resistor before the divider or after.
Considered in isolation, this op-amp buffer circuit is an exception: what’s happening at the output does not affect the non-inverting input without a route for feedback. So for audio, the op-amp buffer works as a backflow valve and prevents the signal from “backing up.” Returning to the divider example, placing this buffer in series with a voltage divider does not change the voltage produced by the divider. Indeed, this is a property exploited by another stompbox application.
Decoupling Virtual Ground
This buffer also appears in stompbox power supply circuits. The 9V Electric Mistress uses it in place of a decoupling capacitor to hold the virtual ground in the power supply steady. See the op-amp after the pair of 200K resistors, R2 and R3, in the upper left-hand corner of the schem linked here. And the Blues Driver uses both the capacitor and the buffer. See the Vref op-amp version in the project pdf file with the op-amp after the R25 and R26, a pair of 10K resistors, or R4 and R5 in the schematic available at freeinfosociety.com:
The Faucet Analogy
An analogy between an op-amp and a water faucet seems helpful once again. First, the pressure created in a hose by turning a water faucet highlights the difference between the input and the output. They are synchronized but they are not the same thing. The output is a power supply controlled by the input. In addition, a relatively small input force, turning the faucet, can result in a huge output force depending on the water supply pressure. Those features coincide with the high gain, low impedance characteristics of the op amp output.
Second, whatever happens to the water in the hose attached to the faucet, the water pressure (output) does not feedback on the faucet (input) unless special arrangements are made.
This analogy does not capture the high impedance of the inputs. Indeed, a lot of water faucets are very hard to turn and make your hand tired and sore. So such faucets load down the source (your hand) which is quite the opposite of op-amp inputs. They are like faucets that turn with the slightest breeze.
But that’s the problem with many analogies; they aren’t a substitute for understanding the real thing, just an aid. If you have questions about all this, please comment. It will help improve what’s written here. And chances are, if you have the question then lots of other people do also.