Sub topic 5
The non-inverting amplifier: Vout = (1 + Rf/Rg) Vin
This chapter assumes you know Ohm's law, the voltage divider, and the ideal op amp model with its virtual short from earlier chapters. Here you will derive the non-inverting gain, check it numerically, and note where it differs from the inverting amplifier.
The circuit
The input signal goes straight to the non-inverting (+) input. Feedback resistor Rf connects the output to the inverting (−) input. Resistor Rg connects the inverting input to ground. Rf and Rg form a voltage divider that samples the output and returns a fraction of it to the − input.
Derivation
Use the two ideal rules. Negative feedback forces the virtual short, so V− = V+. No current flows into either input.
- The + input is driven by the source, so V+ = Vin.
- The virtual short gives V− = Vin.
- No current enters the − input, so Rf and Rg carry the same current. The divider gives V− = Vout · Rg / (Rf + Rg).
- Set the two expressions for V− equal: Vin = Vout · Rg / (Rf + Rg).
- Solve for the gain: Vout / Vin = (Rf + Rg) / Rg = 1 + Rf/Rg.
The gain is always 1 or greater, and its sign is positive. The output is in phase with the input. The fraction returned to the − input is β = Rg / (Rf + Rg), and the ideal gain is 1/β.
Worked example
Design a gain of 10 with Rg = 1 kΩ. Then Rf = (10 − 1) × 1 kΩ = 9 kΩ. With Vin = 1 V, the output is 10 V, and the − input sits at 10 V × 1k / 10k = 1 V, matching the + input.
Check it in code
This script compares the ideal gain with the gain when the open-loop gain A is 100,000.
def noninverting_gain(rf, rg, open_loop_gain=float('inf')):
ideal = 1 + rf / rg
if open_loop_gain == float('inf'):
return ideal
beta = rg / (rf + rg)
return open_loop_gain / (1 + open_loop_gain * beta)
print(noninverting_gain(9e3, 1e3)) # 10.0
print(noninverting_gain(9e3, 1e3, 1e5)) # about 9.9990The finite-gain result is low by about 0.01%, so the ideal equation is a good model here.
You can confirm the same result in SPICE. The controlled source E1 models the op amp, with gain 1e5 from (in − inv) to the output.
* Non-inverting amplifier, ideal gain 10
Vin in 0 DC 1
Rf out inv 9k
Rg inv 0 1k
E1 out 0 in inv 1e5
.op
.endThe operating point should show V(out) near +10 V.
Input and output behavior
The source connects only to the + input, which draws almost no current in the ideal model. The input resistance is therefore very high, ideally infinite, and it does not depend on Rf or Rg. This differs from the inverting amplifier, whose input resistance is about Rin. A non-inverting stage barely loads its source, so it suits high-impedance sensors. Feedback also drives the output resistance close to zero.
Common errors
- Using Rf/Rg without the 1. A gain of 10 needs Rf = 9·Rg, not 10·Rg.
- Swapping Rf and Rg. Rg goes to ground, and Rf goes to the output.
- Expecting a gain below 1. This circuit cannot attenuate. Use a divider for that.
- Forgetting the rails. The output cannot exceed the supply voltage, so a 10 V result needs supplies above 10 V.
Exercises
Exercise
A non-inverting amplifier uses Rf = 47 kΩ and Rg = 4.7 kΩ. What is the ideal gain, and what is Vout for Vin = 0.3 V?
Show answer
Gain = 1 + 47k/4.7k = 1 + 10 = 11. Vout = 11 × 0.3 V = 3.3 V.
Exercise
You need a gain of 5 with Rg = 2 kΩ. Find Rf, and give the voltage at the inverting input when Vin = 2 V.
Show answer
Rf = (5 − 1) × 2 kΩ = 8 kΩ. By the virtual short, the inverting input sits at 2 V, the same as Vin. The output is 10 V, and the divider returns 10 V × 2k/10k = 2 V, which confirms it.