Op-Amp Basics: Inverting and Non-Inverting Amplifier Gain
The operational amplifier is a high-gain differential amplifier in an IC package. On its own its gain is so high, often 100 000 or more, that it is useless as a direct amplifier. With negative feedback from a pair of resistors, though, it becomes a precise and predictable building block whose gain depends only on the resistor ratio. This tutorial covers the ideal op-amp rules, the two basic amplifier configurations, and the real-world limits you must check before your circuit works on the bench.
The Two Golden Rules
An op-amp has a non-inverting input (+), an inverting input (-) and an output. Its output is Vout = Aol x (V+ - V-), where Aol is the open-loop gain. When negative feedback is applied (output connected back to the inverting input through a network), analysis becomes simple using two rules for an ideal op-amp:
- The output does whatever is necessary to make the voltage difference between the two inputs zero (V+ = V-).
- The inputs draw no current.
These rules hold only while the op-amp is operating within its limits: output not saturated at a supply rail, and signal frequency well below the bandwidth limit.
The Inverting Amplifier
Vin ---[ Rin ]---+---[ Rf ]---+
| |
(-) |
op-amp ----+---- Vout
(+)
|
GND
Gain: Av = Vout / Vin = -Rf / Rin
Input resistance = RinDerivation: the + input is grounded, so by rule 1 the - input is also at 0 V, a 'virtual ground'. The current through Rin is Vin / Rin. By rule 2 none of it enters the op-amp, so it all flows through Rf, giving Vout = -(Vin / Rin) x Rf. The minus sign means the output is inverted, 180 degrees out of phase.
Worked example
Design an amplifier with a gain of -10 and an input resistance of 10 kΩ. Rin = 10 kΩ, Rf = 10 x 10 kΩ = 100 kΩ. A 0.2 V peak input gives a 2 V peak output, inverted. A useful variant, the summing amplifier, adds more input resistors to the same virtual-ground node: with three 10 kΩ inputs and Rf = 10 kΩ, Vout = -(V1 + V2 + V3).
The Non-Inverting Amplifier
Vin ------------(+)
op-amp ----+---- Vout
+-------(-) |
| |
+------[ Rf ]-------+
|
[ Rg ]
|
GND
Gain: Av = 1 + Rf / Rg
Input resistance: very high (the op-amp input itself)Derivation: by rule 1, the - input equals Vin. Rf and Rg form a voltage divider from Vout, so Vin = Vout x Rg / (Rf + Rg). Rearranging gives Vout / Vin = 1 + Rf / Rg. The output is in phase with the input, and the gain can never be less than 1.
With Rf = 0 and Rg removed, the gain is exactly 1: the voltage follower or buffer. It draws almost no current from its source and can drive a much heavier load, which makes it the standard fix for the voltage-divider loading problem.
Worked example
Amplify a sensor output of 0 to 0.3 V to 0 to about 3 V. Required gain is 10. Choose Rg = 1 kΩ, then Rf = 9 kΩ; the nearest E24 value is 9.1 kΩ, giving Av = 1 + 9.1 = 10.1 and a maximum output of 3.03 V.
Real Op-Amp Limits
Gain-bandwidth product
For a voltage-feedback op-amp, gain times bandwidth is roughly constant. The LM358 and the 741 both have a gain-bandwidth product of about 1 MHz.
Bandwidth ~ GBW / noise gain Non-inverting gain 10.1 with GBW = 1 MHz: f(-3 dB) ~ 1 000 000 / 10.1 ~ 99 kHz Inverting gain -10: noise gain = 1 + Rf/Rin = 11 f(-3 dB) ~ 1 000 000 / 11 ~ 91 kHz
Note that for the inverting amplifier the bandwidth is set by 1 + Rf / Rin, not by Rf / Rin. Slew rate imposes a second limit on large, fast signals: the 741 is specified at about 0.5 V/µs, so a 10 V peak sine wave above roughly 8 kHz will distort.
Supply and output swing
| Op-amp | Supply | Input range includes ground? | Output swing |
|---|---|---|---|
| 741 | Dual, typically ±15 V | No | About 1 to 2 V from each rail |
| LM358 | Single 3 to 32 V or dual | Yes | Down to near 0 V, up to about 1.5 V below V+ |
| Rail-to-rail CMOS types (e.g. MCP6002) | Low voltage single supply | Yes | Close to both rails |
In the worked non-inverting example, an LM358 running from 5 V cannot reach 3.03 V comfortably if the load is heavy, and cannot exceed about 3.5 V at all. Running it from a higher supply, or using a rail-to-rail part, solves this.
Common Mistakes
- Connecting feedback to the + input; this is positive feedback and the output slams to a rail.
- Using an inverting amplifier on a single supply without biasing the + input to mid-supply; negative outputs are impossible.
- Leaving out 100 nF decoupling capacitors on the supply pins, leading to oscillation.
- Choosing very large resistors (megohms), which increases noise and offset errors from input bias current.
- Expecting a 741 to work from a single 5 V supply.
Summary
With negative feedback, an op-amp holds its inputs at equal voltage and draws no input current. That gives a gain of -Rf / Rin for the inverting amplifier and 1 + Rf / Rg for the non-inverting one. Before building, check bandwidth with the gain-bandwidth product, check slew rate for large signals, and confirm the op-amp's input and output ranges suit your supply.