A differential amplifier is an electronic circuit that amplifies the voltage difference between two input signals while actively rejecting any voltage that is common to both inputs. In a real circuit, this changes everything: it allows you to extract a fragile 10mV sensor signal that is riding on top of 2.5V of noisy common-mode voltage, turning it into a clean, readable 0-5V signal for your microcontroller's ADC. The most common point of confusion for makers is conflating a standard operational amplifier (op-amp) wired with four resistors with a dedicated instrumentation amplifier. While both can perform differential amplification, a basic op-amp circuit suffers from low input impedance and poor common-mode rejection unless you use expensive, perfectly matched resistor networks.

The Core Job: Rejecting the Noise

Think of a diff amplifier like a pair of noise-canceling headphones for your circuit. Noise-canceling headphones use a reference microphone to listen to the ambient hum of an airplane cabin (the common-mode signal) and subtract it from the audio you want to hear (the differential signal). A differential amplifier does exactly this with voltage.

The Golden Rule of Diff Amps:
VOUT = Gain × (VIN+ - VIN-)
Any voltage present equally on both VIN+ and VIN- is theoretically ignored. In practice, how well it is ignored is defined by the Common-Mode Rejection Ratio (CMRR).

If you are measuring a current shunt or a Wheatstone bridge, both input pins might sit at 12V relative to ground, but the actual measurement is the 20mV difference between them. The diff amplifier strips away the 12V and amplifies only the 20mV.

The Math in Action: A Worked Load Cell Example

Let us look at a concrete numeric example using a 5V-excited strain gauge load cell. At full scale, the load cell outputs 2mV/V. With a 5V excitation, our full-scale differential voltage is 10mV. Because it is a balanced bridge, both output wires sit at exactly half the excitation voltage: 2.5V relative to ground.

Input Conditions: VIN+ = 2.505V | VIN- = 2.495V | VDIFF = 10mV | VCM = 2.5V | Target Gain = 100

If our amplifier is ideal, the output is simply 10mV × 100 = 1.000V. But real amplifiers leak a tiny bit of the common-mode voltage through to the output. We calculate this error using the CMRR, expressed in decibels (dB).

Scenario A: Basic Op-Amp Diff Circuit (LM358)

A standard LM358 wired as a difference amplifier with 1% tolerance discrete resistors typically yields a system CMRR of about 60dB to 80dB. Let us assume 80dB. An 80dB CMRR means the common-mode gain is 10,000 times smaller than the differential gain.

  • Differential Gain (Ad) = 100
  • Common-Mode Gain (Acm) = 100 / 10,000 = 0.01
  • Common-Mode Error at Output = 2.5V × 0.01 = 25mV
  • Total Output: 1.000V + 0.025V = 1.025V (A 2.5% error at full scale)

Scenario B: Dedicated Instrumentation Amp (AD620)

If we swap to an Analog Devices AD620 instrumentation amplifier, the internal laser-trimmed resistors push the CMRR to 120dB at a gain of 100. A 120dB CMRR means the common-mode gain is 1,000,000 times smaller.

  • Common-Mode Gain (Acm) = 100 / 1,000,000 = 0.0001
  • Common-Mode Error at Output = 2.5V × 0.0001 = 0.25mV
  • Total Output: 1.000V + 0.00025V = 1.00025V (A negligible 0.025% error)
Bench Tip: If you must build a discrete diff amp using a standard op-amp, never use standard 1% resistors. The mismatch between the four gain-setting resistors will destroy your CMRR. Use a matched resistor network IC (like the LT5400) or 0.1% tolerance resistors to keep the CMRR above 80dB.

Where You Meet Differential Amplifiers in Practice

You will rarely see a diff amplifier used just to subtract two arbitrary DC voltages. They are the critical front-end for specific sensor topologies:

  1. Current Shunt Monitors: Measuring the voltage drop across a low-side or high-side shunt resistor (e.g., 50mV at 10A). High-side shunts require a diff amp that can tolerate common-mode voltages up to 60V or more, like the INA180 series.
  2. Load Cells and Pressure Transducers: Wheatstone bridges output tiny differential signals centered around a mid-supply common-mode voltage. Instrumentation amps are mandatory here to avoid loading down the high-impedance bridge.
  3. Thermocouples: Type K thermocouples generate roughly 41μV per °C. A diff amp extracts this microvolt signal while rejecting the 50/60Hz AC mains noise that inevitably couples into the long sensor wires.
  4. Balanced Audio Lines: XLR microphone cables carry audio as a differential signal. The receiving preamp uses a diff amplifier to cancel out any RF interference or ground loop hum picked up along the cable run.

Decision Tree: Picking the Right Diff Amplifier IC

Do not default to wiring up four resistors and an LM358 unless you are constrained by a sub-$0.10 BOM cost. Use this decision path to select the correct integrated circuit for your schematic.

If your application is... And your constraint is... Then choose this IC topology Concrete Part Number
High-side current sensing (12V-48V rails) Needs to survive high common-mode voltage High-Side Current Shunt Monitor INA180 or MAX4372
Load cell / Wheatstone bridge Needs high input impedance >1GΩ and high CMRR Instrumentation Amplifier INA128 or AD620
Balanced audio line receiver Needs fixed unity gain and low distortion Audio Difference Amplifier INA134 or SSM2142
Low-side current shunt (near 0V) Ultra-low cost, precision is secondary Standard Op-Amp (Discrete Diff Config) LM358 (with 0.1% resistors)
Thermocouple (Type K / J) Needs microvolt offset and low drift Zero-Drift Instrumentation Amp AD8421 or INA828

Common Mistakes and How to Avoid Them

Why is my diff amplifier output saturated at the positive rail?

You have likely violated the input common-mode voltage range. Every amplifier has limits on how close the input pins can get to the supply rails. If you are powering an LM358 with 5V and trying to measure a 4V common-mode signal, the internal transistors will saturate. Always check the datasheet's 'Input Voltage Range' table, or switch to a rail-to-rail input op-amp like the MCP6002.

Why does my circuit oscillate when I add a filter capacitor to the inputs?

Placing unequal RC low-pass filters on the IN+ and IN- pins creates a mismatch in phase delay at high frequencies. This converts common-mode high-frequency noise into differential noise, which the amplifier then happily amplifies, often leading to instability. If you must filter, use a single capacitor placed between the two input pins (differential filtering) rather than from each pin to ground.

Do I need to connect the Reference (REF) pin?

Yes. On almost all instrumentation and difference amplifiers (like the TI INA128), the REF pin sets the output baseline. If you leave it floating, the output will drift unpredictably. Tie the REF pin directly to your ADC's analog ground, or to a stable voltage divider if you need to level-shift a bipolar signal into a unipolar ADC range (e.g., shifting a ±10V signal to a 0-3.3V range by tying REF to 1.65V).

When designing a sensor front-end, stop trying to save pennies with discrete resistor networks on general-purpose op-amps. For 90% of maker and commercial sensor projects involving bridges, shunts, or thermocouples, the default pick should be a dedicated instrumentation amplifier like the AD620 or INA128. The internal laser-trimmed resistors guarantee a CMRR above 100dB, the high input impedance prevents bridge loading, and the single external gain resistor simplifies your BOM and PCB layout, ultimately saving you hours of bench debugging.