Sub topic 10
The Summing Amplifier
The summing amplifier is an inverting amplifier with more than one input resistor. It adds several voltages, each with its own weight, and outputs the negative of the total. This chapter assumes you know the inverting amplifier, the virtual short, and zero input current. It also assumes you can apply KCL at a node.
The circuit
Take the inverting amplifier and connect several sources V1, V2, ..., Vn to the inverting input. Each source gets its own resistor R1, R2, ..., Rn. The non-inverting input is grounded, and a feedback resistor Rf runs from the output back to the inverting input.
Derivation
Use the standard procedure: constraints first, then KCL.
- The non-inverting input is at 0 V. The virtual short puts the inverting input, the summing node, at 0 V as well.
- Each resistor therefore has Vk across it on one side and 0 V on the other. The current flowing toward the node is Ik = Vk / Rk.
- The ideal op amp draws no input current. The sum of all the Ik must flow through Rf toward the output.
- The voltage across Rf is (0 − Vout). Ohm's law gives If = (0 − Vout) / Rf.
Setting the currents equal at the node:
If = I1 + I2 + ... + In
−Vout / Rf = V1/R1 + V2/R2 + ... + Vn/Rn
Solving for the output:
Vout = −Rf × (V1/R1 + V2/R2 + ... + Vn/Rn)
Each input is amplified by its own inverting gain, −Rf/Rk, and the results are added. If all input resistors equal R, the result simplifies to
Vout = −(Rf/R) × (V1 + V2 + ... + Vn)
If you also choose Rf = R, the output is exactly −(V1 + V2 + ... + Vn).
Why the inputs do not interact
Because the summing node stays at 0 V, a source Vk sees only its own resistor Rk connected to ground. Changing V2 does not change the current that V1 pushes through R1. This is superposition at work. The currents add only at the node, and each current depends on its own source and resistor.
This gives two practical benefits.
- Each weight Rf/Rk can be set independently by choosing Rk.
- Each source sees an input resistance of exactly Rk. You can predict the loading on each source without knowing what the other sources are doing.
Worked example
Use Rf = 10 kΩ, with three inputs:
| Input | Voltage | Resistor | Weight −Rf/Rk | Contribution to Vout |
|---|---|---|---|---|
| V1 | 1 V | 10 kΩ | −1 | −1 V |
| V2 | 2 V | 20 kΩ | −0.5 | −1 V |
| V3 | −0.5 V | 5 kΩ | −2 | +1 V |
The output is Vout = −1 − 1 + 1 = −1 V.
The currents confirm this. The input currents are 0.1 mA, 0.1 mA and −0.1 mA, which total 0.1 mA. That current flows through Rf, which drops 0.1 mA × 10 kΩ = 1 V. The current flows from the node toward the output, so the output sits 1 V below the node: −1 V.
Checking the result in code
The function below computes the ideal output. It also includes the finite open-loop gain correction and optional rail clipping, which are explained in the next two sections.
def summing_output(volts, rs, rf, a=None, rail=None):
"""Output of an inverting summing amplifier.
volts, rs : input voltages and their series resistors (ohms)
rf : feedback resistor (ohms)
a : finite open-loop gain (None means ideal)
rail : symmetric output limit in volts (None means no limit)
"""
ideal = -rf * sum(v / r for v, r in zip(volts, rs))
if a is None:
out = ideal
else:
rp = 1.0 / sum(1.0 / r for r in rs) # parallel combination of the Rk
out = ideal / (1 + (1 + rf / rp) / a)
if rail is not None:
out = max(-rail, min(rail, out))
return out
volts = [1.0, 2.0, -0.5]
rs = [10e3, 20e3, 5e3]
print(round(summing_output(volts, rs, 10e3), 6)) # -1.0
print(round(summing_output(volts, rs, 10e3, a=1e5), 6)) # -0.999955
print(round(summing_output([5, 5], [10e3, 10e3], 10e3, rail=13), 6)) # -10.0 (not clipped)
print(round(summing_output([9, 9], [10e3, 10e3], 10e3, rail=13), 6)) # -13.0 (clipped)Choosing resistor values
Start from the weights you need.
- Pick Rf. Values between about 10 kΩ and 100 kΩ are common. Much smaller values load the output, and much larger values make the circuit sensitive to bias current and noise.
- For each input, compute Rk = Rf / |weight|.
- Check the smallest Rk. Source k must be able to drive a load of Rk, since that is the resistance it sees.
For example, to build Vout = −(2·V1 + 5·V2) with Rf = 100 kΩ, you need R1 = 50 kΩ and R2 = 20 kΩ.
A classic application is the binary-weighted digital-to-analog converter. Resistors R, 2R, 4R, 8R with a common Rf give input weights in the ratio 8:4:2:1. Each input is either 0 V or a reference voltage. The output is then proportional to the binary number formed by the switch settings.
Edge cases and limits
Output saturation
The derivation assumes the op amp stays in its linear region. The output cannot go beyond the supply rails, and a real output stage usually stops 1 V to 2 V short of them. When the weighted sum exceeds that limit, the output clips. At that point the inverting input is no longer held at 0 V, so the virtual short and the formula above no longer apply.
The sign
The output is the negative of the weighted sum. If you need a positive sum, add a second inverting stage with gain −1. Alternatively, use a non-inverting summer.
The non-inverting summer
You can connect the sources through resistors to the non-inverting input instead. With two equal resistors, the voltage at that input is the average (V1 + V2)/2. A non-inverting amplifier with gain 1 + Rf/Rg amplifies that average. Choosing Rf = Rg gives a gain of 2, so Vout = V1 + V2. This circuit has no sign flip, but the weights are not independent. The sources load one another, so changing one resistor changes every weight. The inverting version avoids this because of the virtual ground.
Finite open-loop gain
With open-loop gain A, the inverting input is no longer exactly 0 V. It sits at −Vout/A. Applying KCL with this voltage gives
Vout = [−Rf × Σ(Vk/Rk)] / [1 + (1 + Rf/Rp)/A]
Here Rp is the parallel combination of R1 through Rn. The factor 1 + Rf/Rp is the noise gain, the gain seen by a signal applied at the non-inverting input. Every input you add lowers Rp and raises this factor. The error grows with the number of inputs, but with A = 10^5 and a noise gain of 4.5, the example above has an error of only 0.0045%.
Other non-ideal effects
The ideal model ignores input bias current, input offset voltage, and finite bandwidth. The offset voltage is amplified by the noise gain, so a summer with many inputs amplifies it more than a single-input stage does. Resistor tolerance also matters. With 1% resistors, each weight is only accurate to about 1% to 2%, and this is often the dominant error in practice.
Summary of the procedure
- Ground the non-inverting input, which puts the summing node at 0 V.
- Write each input current as Vk / Rk.
- Sum the currents and force them through Rf.
- Read off Vout = −Rf × Σ(Vk/Rk).
- Check that the result fits within the supply rails.
Exercise
A summing amplifier has Rf = 47 kΩ and three inputs: V1 = 0.2 V through 10 kΩ, V2 = −0.4 V through 22 kΩ, and V3 = 1.0 V through 47 kΩ. Find Vout, and state how much current each source must supply.
Show answer
The input currents are I1 = 0.2/10k = 20 µA, I2 = −0.4/22k ≈ −18.18 µA, and I3 = 1.0/47k ≈ 21.28 µA. Their sum is about 23.10 µA. Vout = −47k × 23.10 µA ≈ −1.086 V. Each source supplies its own current: 20 µA, −18.18 µA (it sinks current), and 21.28 µA.
Exercise
Design a summing amplifier with Rf = 100 kΩ that produces Vout = −(2·V1 + 5·V2). Then find the input resistance each source sees. Finally, with ±12 V supplies and an output limited to ±10 V, what is the largest V2 allowed when V1 = 1 V?
Show answer
Use R1 = Rf/2 = 50 kΩ and R2 = Rf/5 = 20 kΩ. Source 1 sees 50 kΩ and source 2 sees 20 kΩ, because the summing node is a virtual ground. With V1 = 1 V, the output is −(2 + 5·V2). To stay at or above −10 V, we need 2 + 5·V2 ≤ 10, so V2 ≤ 1.6 V.
Exercise
Two inputs use R1 = R2 = 10 kΩ with Rf = 10 kΩ, and the op amp has A = 1000. Using the finite-gain formula, find the actual output for V1 = V2 = 1 V, and the percentage error relative to the ideal output of −2 V.
Show answer
Rp = 5 kΩ, so the noise gain is 1 + 10k/5k = 3. The correction factor is 1 + 3/1000 = 1.003. Vout = −2 / 1.003 ≈ −1.994 V. The error is about 0.3%.