When several signals must be summed with weights, or two signals differenced, the op amp summer and subtractor do it in one stage. This page works the formulas, the resistor matching rules and the field usage.
The inverting summer merges inputs through Ra and Rb into the virtual ground node with feedback Rf, so the output is minus Rf times the sum of each input over its own resistor. With Ra 10k, Rb 20k and Rf 20k the output is minus two times Ua plus Ub. The virtual ground keeps the inputs from crosstalking, the natural advantage of the inverting connection, per GB/T 4728; follow with one inverter when the sign matters.
The single-op-amp subtractor feeds Ua to the inverting side through R1 and Ub to the non-inverting side through R2, with Rf feedback and R3 from the non-inverting input to ground. When the ratios match, R2 over R3 equals Rf over R1, the output is Rf over R1 times Ub minus Ua. With all four at 10k it is a plain difference. Resistor mismatch is the enemy of common-mode rejection, so start at 1 percent and go 0.1 percent or network resistors for precision.
Summers mix sensor channels, audio and DAC outputs. Subtractors read bridge sensors and current shunts. Traps: mismatched ratios drop the common-mode rejection below 40dB and mains hum marches in; more than four inputs into one virtual ground raises the node impedance and the channels interact, so split stages or use an instrumentation amplifier; a single-supply subtractor clips negative inputs unless you lift the reference. Testing trick: tie both inputs to one voltage, the output should sit near zero, and any offset means the ratios are off.
| Circuit | Key formula | Watch |
|---|---|---|
| Inverting summer | Uo = -Rf * sum(Ui/Ri) | virtual ground fights crosstalk |
| Non-inverting summer | divider then sum | channels interact |
| Subtractor | Uo = (Rf/R1)(Ub - Ua) | 1 percent resistors minimum |
| Ratio mismatch | CMR falls | hum passes straight in |
| More than 4 inputs | use in-amp | node impedance rises |
| Single supply | lift reference | negative swing clips |
Use these stages for signal mixing, bridge conditioning and shunt sensing. Check resistor ratios twice at 1 percent precision minimum, split large sums into two stages, lift the reference on single supplies, and reach for an instrumentation amplifier when common-mode noise is heavy.
The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Analogue computation circuits per GB/T 4728; safety IEC 60204-1. Always check the device datasheet and the product design file for ratings and derating.
Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.