JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Summing, Difference, and Building Blocks

The virtual ground accepts many currents at once, and that single fact unlocks a toolbox: a summing amp that mixes signals, a difference amp that subtracts them, and the instrumentation amp that fixes the difference amp's flaws. Same golden rules, brand-new powers.

One node, many currents

Guide 2 handed us a strange and wonderful node: the virtual ground at the inverting input of the inverting amplifier. Under negative feedback, the op-amp holds that node at 0 V — yet by the first of the golden rules, no current ever flows into the input pin there. We used it to find a gain of -Rf/Rin from a single input resistor. Now ask the obvious next question: what if more than one resistor lands on that node?

Here is the key insight, and it is pure bookkeeping. Every resistor tied to the virtual ground delivers its own current, set only by the voltage at its far end (its near end is pinned at 0 V). Because golden rule 1 forbids any of that current from disappearing into the op-amp input, all of those currents must meet at the node and continue together. That is just Kirchhoff's current law: what flows in must flow out. The node is a tidy meeting point where currents simply add — and that adding is the whole secret of this guide.

The summing amplifier: a mixer made of resistors

Take the inverting amplifier and feed it several inputs, each through its own resistor, all arriving at the same virtual-ground node. Input V1 through R1 pushes I1 = V1/R1; input V2 through R2 pushes I2 = V2/R2; and so on. They all add at the node, and the sum is forced to flow out through the feedback resistor Rf. The output must drop far enough that Rf carries that total current, so Vout = -(I1 + I2 + ...) times Rf. This is the summing amplifier — a weighted adder built from nothing but resistors and one op-amp.

  V1 o--[ R1 ]--+
                |
  V2 o--[ R2 ]--+----+------[ Rf ]------+
                |    |                   |
  V3 o--[ R3 ]--+  (-)|\                 |
                     | | \               |
          0 V node   | |  >--------------+--o Vout
                     | | /
                    (+)|/
                     |
                    GND

  I1 = V1/R1, I2 = V2/R2, I3 = V3/R3 all meet at the
  0 V virtual-ground node. Rule 1: none enters the (-)
  input, so the whole sum flows on through Rf:

     Vout = -(I1 + I2 + I3) x Rf
          = -Rf x (V1/R1 + V2/R2 + V3/R3)

  Equal resistors (R1=R2=R3=R):  Vout = -(Rf/R)(V1+V2+V3)
The summing amplifier. Each input has its own resistor into the shared virtual ground; the currents add, and Rf converts the total back into an output voltage.

Put numbers on it. Make all four resistors 10 kΩ (R1 = R2 = R3 = Rf = 10 kΩ). Then Vout = -(V1 + V2 + V3) exactly — a clean inverting adder. Feed in 1 V, 2 V, and 0.5 V and the output is -3.5 V. Want an average instead of a raw sum? Use Rf = 10 kΩ but R = 30 kΩ on each input: Vout = -(10/30)(V1 + V2 + V3) = -(V1 + V2 + V3)/3, the negative average of the three. And the weights need not be equal: a smaller resistor gives that channel more say, exactly like a fader on a mixing desk.

The difference amplifier: subtracting two signals

Often you do not want a sum but a difference: the voltage across a Wheatstone bridge, the small imbalance between two sensor legs, or a signal riding on top of a big unwanted offset that is common to both wires. The job is to amplify what is different between two inputs while ignoring what they share. That is the difference amplifier (or subtractor), and it takes one op-amp and four resistors.

Feed V1 through Ra into the inverting input, with Rb as feedback. Feed V2 through an identical Ra into the non-inverting input, and from that + node put an identical Rb down to ground. The cleanest way to read it is superposition. Kill V2 (ground it): the + input sits at 0 V, so V1 sees a plain inverting amp and contributes -(Rb/Ra)V1. Now kill V1: the + input becomes a divider giving V2 times Rb/(Ra+Rb), and a non-inverting amp of gain (1 + Rb/Ra) lifts it, which works out to +(Rb/Ra)V2. Add the two: Vout = (Rb/Ra)(V2 - V1). The shared part cancels; only the difference survives, amplified by the ratio Rb/Ra.

A worked example shows why this is so useful. Pick Ra = 10 kΩ and Rb = 100 kΩ, so the difference gain is Rb/Ra = 10. Suppose a bridge sensor gives V1 = 2.00 V and V2 = 2.05 V — a 50 mV difference riding on a 2 V common level. The output is 10 times (2.05 - 2.00) = 0.5 V, while the 2 V that both inputs share is, ideally, rejected completely. You have plucked a tiny 50 mV signal out from under a 2 V pedestal and turned it into a comfortable half-volt. That ability to ignore the common level is called common-mode rejection.

When matching matters: CMRR and the instrumentation amp

Now the honest part. That perfect cancellation only happens if the two Ra/Rb ratios match exactly. In real life resistors have tolerance, and any mismatch lets a sliver of the common level leak through to the output, where it masquerades as signal. We measure this with the common-mode rejection ratio (CMRR): how much better the amp treats the difference than the common part. With ordinary 1% resistors a simple four-resistor subtractor often manages only a few hundred — roughly 45 to 50 dB — of CMRR. That is fine for rough work, but to do better you must use closely matched resistors (or a precision part with them trimmed on-chip).

There is a second flaw: the two inputs of the plain subtractor have different, fairly low input resistances (one input feeds a virtual ground through Ra, the other a divider), so they load the two sensor wires unequally — which by itself wrecks CMRR when the source is not perfectly stiff. The classic cure is the instrumentation amplifier: bolt a high-impedance buffer in front of each input (built from non-inverting stages like the non-inverting amplifier you met in guide 3), so each sensor wire sees a near-infinite input resistance, and let those feed a matched difference amp. A single resistor then sets the gain, the inputs are symmetric, and CMRR can reach 100 dB or more. It is the go-to front end for bridges, thermocouples, and biomedical electrodes.

The building-block mindset, and the chip with no feedback

Notice the pattern across this whole rung. The inverting amp, the buffer, the summer, the subtractor — they are all the same two golden rules applied to a different arrangement of parts around the virtual ground. They are Lego bricks: a summer to mix and scale, a difference amp to reject a common offset, a buffer to stop one stage loading the next. You snap them together into a signal chain, each stage doing one clean job. And the bricks are not finished yet — swap the feedback resistor for a capacitor and the very same node math gives you an integrator (and its mirror, the differentiator), the subject of guide 5.

  1. Decide the operation: are you mixing/scaling several signals (summer) or extracting the difference between two (subtractor)? That picks the topology.
  2. Set the gain by a ratio. For a summer, Vout = -Rf x sum(Vn/Rn); for a subtractor, gain = Rb/Ra. Choose input resistors in the few-kΩ-to-tens-of-kΩ range so you neither overload the source nor invite noise, then size the feedback resistor for the gain you need.
  3. Match the resistors that need matching. A subtractor's CMRR lives and dies on how well the two Ra/Rb pairs agree — use 0.1% parts or a trimmed array if you need real rejection.
  4. Check the output swing and the source impedance. Make sure gain times the largest input stays inside the supply rails (or it clips), and if a delicate source cannot tolerate the input loading, put a buffer or an instrumentation amp in front.