Sub topic 10
The summing amplifier
This chapter assumes you know KCL, node-voltage analysis, and the ideal op amp constraints from earlier chapters. Those constraints are zero input current and a virtual short between the inputs when negative feedback is present.
What the circuit does
The inverting summing amplifier is an inverting amplifier with several input resistors that all connect to the inverting node. The non-inverting input is grounded. The output is a weighted sum of the input voltages, with a sign change.
Derivation
Let the inverting node voltage be V−. The non-inverting input is at 0 V, so the virtual short gives V− = 0. This node is called a virtual ground.
- Each input resistor carries a current set only by its own source: I1 = V1/R1, I2 = V2/R2, I3 = V3/R3. The other sources cannot change these currents, because V− is held at 0 V.
- The op amp input draws no current. By KCL at the inverting node, all of the summed input current must flow through Rf.
- The current through Rf, flowing toward the output, is I1 + I2 + I3. The voltage across Rf is Vout − V− = Vout.
Writing KCL at the node, with currents leaving the node taken as positive:
(V1 − 0)/R1 + (V2 − 0)/R2 + (V3 − 0)/R3 + (0 − Vout)/Rf = 0
Solving for Vout gives:
Vout = −Rf (V1/R1 + V2/R2 + V3/R3)
Each input has its own gain of −Rf/Rn. If all resistors are equal, Vout = −(V1 + V2 + V3), which is an inverted sum.
Computing the output
def summing_amp(rf, inputs):
"""Output of an ideal inverting summing amplifier.
inputs is a list of (voltage, resistance) pairs."""
return -rf * sum(v / r for v, r in inputs)
# Rf = 10k, weights -10, -5, -2 for inputs 0.2 V, 0.4 V, 0.5 V
print(summing_amp(10e3, [(0.2, 1e3), (0.4, 2e3), (0.5, 5e3)])) # -5.0The terms are 0.2/1k = 0.2 mA, 0.4/2k = 0.2 mA, and 0.5/5k = 0.1 mA. The total is 0.5 mA, and 0.5 mA × 10 kΩ gives −5 V.
Weighted sums and averages
You choose each resistor to set that input's weight.
| Goal | Resistor choice | Result |
|---|---|---|
| Inverted sum | R1 = R2 = … = Rf | Vout = −(V1 + V2 + …) |
| Inverted average of N inputs | all Rn = R, Rf = R/N | Vout = −(V1 + … + VN)/N |
| Weighted sum | Rn = Rf/wn | Vout = −Σ wn·Vn |
A weighted sum is the basis of a simple digital-to-analog converter, where binary-weighted resistors scale the inputs by powers of two.
Common errors
- Forgetting the sign. The output is inverted. To get a positive sum, follow the stage with an inverting stage of gain −1.
- Using the output voltage across the wrong resistor. The voltage across each Rn is Vn, and the voltage across Rf is Vout, because the node is at 0 V.
- Ignoring saturation. The result holds only if the computed Vout lies within the supply rails. With ±15 V supplies, a computed −20 V means the output sits near −15 V and the linear model no longer applies.
- Assuming the inputs load nothing. Each source sees its own Rn to ground, so a source with high output resistance will be loaded. Choose Rn large compared with the source resistance.
Exercise
A summing amplifier has Rf = 20 kΩ, R1 = 10 kΩ, and R2 = 4 kΩ. The inputs are V1 = 1 V and V2 = −0.5 V. Find Vout, and state whether it is valid with ±12 V supplies.
Show answer
Vout = −20k × (1/10k + (−0.5)/4k) = −20k × (0.1 mA − 0.125 mA) = −20k × (−0.025 mA) = +0.5 V. This lies within ±12 V, so the linear analysis is valid.
Exercise
You need Vout = −(3·V1 + 6·V2) using Rf = 12 kΩ. Which values of R1 and R2 do you use?
Show answer
Each weight equals Rf/Rn. R1 = 12k/3 = 4 kΩ and R2 = 12k/6 = 2 kΩ.