Sub topic 9
Choosing resistor values for a design
This chapter assumes you can derive the two gain equations, Vout = -(Rf/Rin) Vin and Vout = (1 + Rf/Rg) Vin. It also assumes you know the input resistance of each configuration and the supply-clipping rule. The gain equations fix only the ratio of two resistors, so infinitely many pairs give the same gain. This chapter covers how to pick one pair.
What the gain equation leaves open
For a gain of 10, a non-inverting stage works with Rf = 9 kΩ and Rg = 1 kΩ. It also works with 900 kΩ and 100 kΩ, or 9 Ω and 1 Ω. The ideal equations treat all three the same. A real op amp does not, because the resistors act as the amplifier's load, as noise sources, and as part of the circuit at the input pins.
A design starts from a few requirements:
- The target gain and its sign.
- The supply voltages and the largest input signal.
- The source impedance, meaning the resistance the driving circuit presents.
- The accuracy needed, which sets resistor tolerance.
- The bandwidth needed.
Step 1: confirm the output fits the supply
Check headroom before choosing resistors. With ±12 V supplies and a 0.5 V peak input, a gain of 10 gives a 5 V peak output. That is well inside the rails. A gain of 40 would ask for 20 V and clip. A general-purpose op amp usually stops 1 V to 2 V short of each rail. A rail-to-rail output stage gets within tens of millivolts but still cannot reach the rail exactly.
If the output does not fit, resistor choice cannot fix it. Lower the gain, reduce the input, or raise the supply.
Step 2: choose the absolute resistance level
The ratio sets the gain, so the absolute level is a trade-off. The table shows what goes wrong at each end.
| Resistor level | Problem | Mechanism |
|---|---|---|
| Below about 1 kΩ | Output overload | Rf + Rg (or Rf + Rin) sits across the output. A 10 V output into 1 kΩ needs 10 mA, close to the limit of many general-purpose parts. |
| Below about 1 kΩ | Heavy source loading | An inverting stage presents only Rin to the source. |
| Above about 100 kΩ | Thermal noise | Johnson noise voltage density is `sqrt(4kTR)`. That is about 4 nV/√Hz at 1 kΩ and about 41 nV/√Hz at 100 kΩ at room temperature. |
| Above about 100 kΩ | Bias current error | Input bias current flowing through the resistors makes a DC offset of `Ib × R`. |
| Above about 100 kΩ | Lost bandwidth | The resistors form a low-pass filter with the input capacitance. |
The bandwidth effect is easy to estimate. The feedback network looks like Rf || Rg driving the input capacitance C at the inverting pin. That gives a pole near 1 / (2π (Rf || Rg) C). For Rf = 1 MΩ, Rg = 100 kΩ, and C = 10 pF, Rf || Rg is about 90.9 kΩ. The pole is near 175 kHz, regardless of how much bandwidth the op amp has. At 9 kΩ the same capacitance puts it near 1.8 MHz.
Step 3: apply the configuration's own constraint
Inverting amplifier
The source sees Rin from the summing node to the source, because the summing node is held at 0 V. Any source resistance Rs adds in series with Rin:
Gain = -Rf / (Rin + Rs)
If Rs is not much smaller than Rin, the gain depends on a source property you may not control. Choose Rin at least 10 times Rs, which holds this error under 10%. Choose 100 times to get under 1%. If the source resistance is known and fixed, you can instead include it in the design: with Rs = 1 kΩ, Rin = 10 kΩ, and Rf = 110 kΩ, the overall gain is exactly -10. This relies on the source resistance staying put.
Inverting gain is also limited by how much Rin the source can drive. A high-gain inverting stage (say -100) with Rin = 1 kΩ needs Rf = 100 kΩ. With Rin = 100 kΩ it needs Rf = 10 MΩ, which is large enough for the bandwidth and bias problems above. In that case a T-network or a two-stage design is the usual answer.
Non-inverting amplifier
The source drives the op amp pin directly, so the input resistance is very high and Rs does not change the gain. The level of Rf and Rg is therefore free. The gain also cannot fall below 1, which sets a minimum: for a gain of 1 you leave out Rg and use a follower.
For a bipolar-input op amp, add a resistor equal to Rf || Rg in series with the non-inverting input. This makes both inputs see the same resistance, so bias currents cancel to first order. In the inverting amplifier the same idea puts Rin || Rf between the non-inverting pin and ground. A later chapter treats these DC errors in full.
Step 4: round to standard values and apply tolerance
Resistors come in preferred series. The E24 series has 24 values per decade (1.0, 1.1, 1.2, 1.3, 1.5, 1.6, 1.8, 2.0, 2.2, 2.4, 2.7, 3.0, 3.3, 3.6, 3.9, 4.3, 4.7, 5.1, 5.6, 6.2, 6.8, 7.5, 8.2, 9.1). These are normally sold at 5% or 1% tolerance. E96 has 96 values and is sold at 1% or better.
Because the gain depends on a ratio, two resistors that each have ±1% tolerance can produce a ratio that is off by about 2% in the worst case. The following program searches E24 pairs for a non-inverting gain and shows the worst-case spread.
E24 = [1.0, 1.1, 1.2, 1.3, 1.5, 1.6, 1.8, 2.0, 2.2, 2.4, 2.7, 3.0,
3.3, 3.6, 3.9, 4.3, 4.7, 5.1, 5.6, 6.2, 6.8, 7.5, 8.2, 9.1]
def e24_values(low=1e3, high=1e6):
values = []
decade = 1.0
while decade <= high:
for m in E24:
v = round(m * decade, 3)
if low <= v <= high:
values.append(v)
decade *= 10
return values
def best_noninverting(target, total=20e3, low=1e3, high=1e6):
best = None
for rf in e24_values(low, high):
for rg in e24_values(low, high):
gain = 1 + rf / rg
key = (round(abs(gain - target) / target, 4), abs(rf + rg - total))
if best is None or key < best[0]:
best = (key, rf, rg, gain)
return best[1], best[2], best[3]
def worst_case_noninverting(rf, rg, tol):
high = 1 + rf * (1 + tol) / (rg * (1 - tol))
low = 1 + rf * (1 - tol) / (rg * (1 + tol))
return low, high
def inverting_with_source(rf, rin, rs):
return -rf / (rin + rs)
rf, rg, gain = best_noninverting(10)
low, high = worst_case_noninverting(rf, rg, 0.01)
print(f"Rf={rf:.0f} Rg={rg:.0f} gain={gain:.3f}")
print(f"1% parts: {low:.3f} to {high:.3f}")
print(f"{inverting_with_source(100e3, 10e3, 1e3):.2f}")
print(f"{inverting_with_source(110e3, 10e3, 1e3):.2f}")The search keeps the pair with the smallest gain error and, among equal errors, the pair whose total resistance is closest to 20 kΩ. For a gain of 10 it finds Rf = 18 kΩ and Rg = 2 kΩ. Both are E24 values, and the ratio is exactly 9. With 1% parts the gain lands between about 9.822 and 10.182, which is roughly ±1.8%.
The last two lines show source loading. With Rf = 100 kΩ, Rin = 10 kΩ, and Rs = 1 kΩ, the gain is -9.09, not -10. Rf = 110 kΩ restores -10.00.
Step 5: verify the result
After rounding, check each item again with the real numbers:
- Peak output is still inside the rails with the actual gain, including the high end of the tolerance range.
- Output current
Vout,peak / (Rf + Rg)(plus any load) is within the op amp's rating. - The inverting stage's
Rinis at least 10 times the source resistance. - The input-capacitance pole
1 / (2π (Rf || Rg) C)is well above the signal bandwidth, and the gain-bandwidth product still allows the closed-loop bandwidth you need. - The DC error
Ib × (Rf || Rg), multiplied by the gain, is acceptable.
Exercise
An inverting amplifier must have gain -5. The source has an output resistance of 2 kΩ, and you want the source resistance to change the gain by under 1%. Choose Rin and Rf, then give the gain if Rs doubles to 4 kΩ.
Show answer
Under 1% error needs Rin at least 100 × Rs = 200 kΩ. That makes Rf = 1 MΩ, which raises the bias error and lowers the input-capacitance pole. A practical compromise is Rin = 100 kΩ (about 2% error) with Rf = 500 kΩ, or follow the source with a unity-gain buffer. For a fixed source, Rin = 18 kΩ with Rf = 100 kΩ gives -5.00 overall, because 18 kΩ + 2 kΩ = 20 kΩ. If Rs doubles to 4 kΩ, the gain becomes -100/22 = -4.55, a 9% error. This shows why you should not rely on a fixed source resistance.
Exercise
A non-inverting amplifier uses Rf = 1 MΩ and Rg = 100 kΩ. The inverting input has 10 pF of capacitance. What is the gain, and where does the input-capacitance pole fall?
Show answer
Gain = 1 + 1 MΩ / 100 kΩ = 11. The resistance driving the capacitance is Rf || Rg = (1 MΩ × 100 kΩ) / 1.1 MΩ ≈ 90.9 kΩ. The pole is 1 / (2π × 90.9 kΩ × 10 pF) ≈ 175 kHz. A smaller pair with the same ratio, such as 100 kΩ and 10 kΩ, moves the pole to about 1.75 MHz.