A first step in understanding op-amps, and amplification generally, is to see that op-amps are like a water faucet that controls the water pressure in a garden hose. In the simplest setups, the faucet alternates between completely closed and wide open. As a result, the output of the op-amp is either the lowest or the highest available voltage, in analogy with no water pressure or maximum water pressure in the hose.
An example of this idea is to tie the input with a minus sign, called the inverting input, to ground and to feed the input with a positive sign, called the non-inverting input, a sine wave. In the LTSpice simulation shown here, the non-inverting input is connected to an AC source with a 1V 800Hz sine wave. The op-amp is supplied by a 9V DC source with the positive terminal connected to the positive power pin and ground connected to the negative power pin.
Just to be sure it’s clear, this schematic is equivalent to the next one, with a connection running explicitly from the power supply to the op-amp.
The V+ label on both the 9V power supply V2 and the op-amp positive power pin take the place of running a connection. The ground symbols do the same thing. Such labels simplify a schematic by reducing the number lines that appear.
Here is a plot of the input in+ and the output out signals for this simulation:
As indicated, the green curve is the in+ sine wave with a 1V amplitude and an 800Hz frequency. The blue plot is the signal at out which jumps between 0V (ground) and 9V, the two polar values of the power supply to the op-amp. Whenever the sine wave voltage is negative, or below ground, the output is 0V, and whenever the sine wave voltage is positive then the output is 9V.
This occurs in part because an op-amp responds only to the difference in the voltages at the two inputs. The difference is calculated by subtracting the inverting input voltage from the non-inverting input voltage. In the present case the inverting input voltage is connected to ground so that the difference in voltages simplifies to be the non-inverting input voltage alone.
So if we reversed the input connections, hooking the sine wave to the inverting input and ground to the non-inverting input, the op-amp would be responding to the negative value of the sine wave and the square wave would be inverted: when the sine wave voltage is positive then the output voltage would be 0V and when the sine wave is negative then the output voltage would be 9V.
The other reason for this square-wave output is that the op-amp has an extremely sensitive output “faucet.” A very small positive difference in input voltages “turns the faucet” to the maximum voltage. And the opposite is also true: a very small negative difference in input voltages “turns the faucet” to the minimum voltage.
In the first example the minimum is 0V but things are symmetric if we introduce a dual polarity (or bipolar or split) power supply:
When the minimum voltage available is -9V then a negative voltage difference on the inputs produces an output of -9V. So the analogy with a water faucet does not extend to this case. Turning the faucet in opposite directions does not produce opposite directions of water pressure.
Again, switching the inputs inverts the output:
It is possible to create a similar relationship with the original single-supply circuit. One creates a virtual ground between actual ground and the positive voltage supply at the inputs of the op-amp.
Vr is the virtual ground in this circuit. A voltage divider places Vr at half the supply voltage V+. A 10uF decoupling capacitor (C2) assists in keeping Vr steady. The capacitor C1 and the resistor R1 pull the signal up from alternating around ground to alternating around the virtual ground. C1 acts as a coupling capacitor and preserves any difference in DC levels between the signal source and the non-inverting input. R1 sets the DC voltage level approximately at Vr. Here are the results:
The source signal (blue) is cycling around ground as before but the non-inverting input (green) is cycling around Vr (red). The inverting input is connected to Vr instead of ground.
As a result, the voltage difference across the inputs is the same as the signal source. Now the output signal is on the positive power rail when the green sine wave is above the red line and on the ground power rail when the green sine wave is below the red line. The red line at 4.5V is playing the same role as ground in the bipolar supply circuit above.
This virtual ground will be useful in the next post, which discusses output that stays between the power rails.
In all of the circuits in this post, the output is on one power rail or the other. Such op-amp circuits are called comparators because the output indicates whether one input voltage is greater than the other. That is, one voltage is compared to another and the output is high for one outcome and low for the other.