An op amp differential circuit (or difference amplifier) outputs a voltage proportional to the difference between its two input terminals, multiplied by a set gain. The governing equation, assuming matched resistor ratios, is Vout = (R2 / R1) × (V2 - V1). Unlike a simple instrumentation amplifier, this topology relies entirely on a four-resistor external network to set both the differential gain and the common-mode rejection ratio (CMRR). It is the workhorse of current-shunt monitoring, sensor bridging, and audio balanced-line reception.
Topology and Node Labels
The standard differential amplifier requires one operational amplifier and four precision resistors. To maintain high CMRR, the ratio of the feedback network must exactly match the ratio of the non-inverting input network.
- V1: Inverting input source voltage.
- V2: Non-inverting input source voltage.
- R1: Input resistor connecting V1 to the inverting node (V-).
- R2: Feedback resistor connecting the output (Vout) to V-.
- R3: Input resistor connecting V2 to the non-inverting node (V+).
- R4: Ground-reference resistor connecting V+ to circuit common (GND).
For the circuit to reject common-mode noise (voltages present equally on V1 and V2), the resistor ratios must satisfy: R2 / R1 = R4 / R3. If this balance is broken, common-mode voltage bleeds into the output, destroying your signal integrity.
Differential Amplifier vs. Instrumentation Amplifier
A common design dilemma is choosing between a discrete op amp differential circuit and a dedicated monolithic instrumentation amplifier (In-Amp) like the INA128 or AD620. Here is how they contrast on the bench.
| Criterion | Discrete Op Amp Differential Circuit | Monolithic Instrumentation Amplifier |
|---|---|---|
| Input Impedance | Relatively low (set by R1 and R3, e.g., 10kΩ) | Extremely high (GΩ range, buffered inputs) |
| CMRR Performance | Limited by external resistor matching (typically 40-60dB with 1% resistors) | Laser-trimmed internal resistors (typically 90-120dB) |
| Component Count & Cost | 1 op-amp + 4 resistors (~$1.50 total BOM) | 1 dedicated IC (~$4.00 - $12.00 BOM) |
| Gain Adjustment | Requires changing multiple matched resistors simultaneously | Single external resistor (Rg) sets gain |
Design Walkthrough: Sizing Real Component Values
Let’s design a differential amplifier to measure the voltage across a 50mΩ current shunt. We expect a maximum differential voltage of 50mV and want to amplify it to 250mV for a microcontroller ADC. This requires a gain of 5.
1. Op-Amp Selection: We need low input offset voltage (Vos) and low drift. The Texas Instruments OPA2277 is a precision dual op-amp with a maximum Vos of 20µV, making it ideal. We will power it with a dual ±12V supply to keep the inputs well within the common-mode range.
2. Resistor Sizing: To achieve a gain of 5, we need R2/R1 = 5. We also want the input impedance to be high enough not to load the shunt, but low enough to minimize Johnson-Nyquist thermal noise. Let’s set R1 = R3 = 10.0 kΩ. Therefore, R2 = R4 = 50.0 kΩ.
3. Tolerance and CMRR: Standard 5% resistors will yield a miserable CMRR of roughly 34dB. We must specify 1% tolerance (E96 series) resistors. The closest standard 1% value to 50kΩ is 49.9 kΩ. This yields an actual gain of 4.99. If exact gain is critical, you can use a 47.5 kΩ 1% resistor in series with a 2.4 kΩ 1% resistor, or use a 10kΩ trimpot in series with R2 to calibrate on the bench.
Behavior Table and Extreme Failure Modes
Understanding what happens when a component fails open or short is critical for troubleshooting a populated PCB. Assuming a nominal state where V1 = 1.0V, V2 = 1.1V, and Gain = 5 (Vout = 0.5V):
| Component | Fault Condition | Resulting Circuit Behavior |
|---|---|---|
| R1 (Inverting Input) | Opens | V- loses its DC path to V1. Input bias current charges parasitic capacitance, driving Vout to the negative supply rail. |
| R2 (Feedback) | Shorts | Vout is hard-tied to V-. The op-amp forces V- to equal V+. Vout becomes a unity-gain buffer of the V+ node, ignoring V1 entirely. |
| R3 (Non-Inverting Input) | Opens | V+ is pulled to GND via R4. The circuit degenerates into a standard inverting amplifier: Vout = -(R2/R1) × V1. |
| R4 (Ground Ref) | Shorts | V+ is hard-tied to GND. Identical to R3 opening; the circuit becomes an inverting amplifier with a gain of -5. |
| Op-Amp Output | Short to GND | The op-amp will source maximum short-circuit current (typically ~35mA for the OPA2277), potentially overheating the silicon if not current-limited. |
Step-by-Step Breadboard Testing Procedure
Do not just wire the circuit and apply power. Precision op-amps require a methodical bring-up sequence to avoid chasing phantom offsets.
- Verify Power Rails: With the op-amp removed from the breadboard, power your dual supply to ±12V. Measure the rails at the breadboard terminals with a multimeter. Ensure you have +12.0V, -12.0V, and a clean GND.
- Seat the IC and Check Quiescent Current: Insert the OPA2277. Place the multimeter in series with the positive supply rail. Quiescent current should be roughly 1mA per amplifier (approx. 2mA total for the dual package). If it reads >10mA, power down immediately and check for wiring shorts.
- Measure Input Offset Voltage (Vos): Tie both V1 and V2 directly to GND. Measure the DC voltage at Vout. With a gain of 5, a 20µV op-amp offset will appear as 100µV at the output. If you read several millivolts, you likely have a thermocouple effect from mismatched breadboard contacts or a ground loop.
- Common-Mode Rejection Test: Apply 2.000V to both V1 and V2 simultaneously. Ideally, Vout should remain exactly at 0V. In reality, with 1% resistors, expect an output shift of roughly 1mV to 5mV. This is your baseline common-mode error.
- Differential Gain Verification: Keep V1 at 2.000V and raise V2 to 2.050V (a 50mV differential). Measure Vout. It should read 250mV ± 5mV. If the gain is skewed, swap R1/R3 or R2/R4 with different 1% resistors from your kit to find a tighter ratio match.
Frequently Asked Questions
How do you calculate the CMRR of an op amp differential circuit?
The overall CMRR is a combination of the op-amp’s intrinsic CMRR and the CMRR dictated by the external resistor mismatch. According to Analog Devices application notes, if you use 1% tolerance resistors, the resistor network alone limits your CMRR to roughly 46dB, regardless of whether your op-amp boasts 120dB. To calculate the resistor-induced CMRR in dB, use the approximation: CMRR ≈ 20 × log10( (1 + R2/R1) / (4 × tolerance) ). For a gain of 5 and 1% (0.01) tolerance, CMRR ≈ 20 × log10( 6 / 0.04 ) ≈ 43.5dB. To improve this, you must use 0.1% resistors or a matched resistor network IC.
Why is my op amp differential circuit outputting a DC offset?
Unwanted DC offset usually stems from three sources. First, the op-amp’s input bias currents flowing through mismatched source impedances. Ensure the Thevenin equivalent resistance seen by both inputs is identical. Second, thermal EMFs (Seebeck effect) generated where dissimilar metals meet at the breadboard or PCB pads; this is exacerbated if one side of the circuit is near a heat-generating component. Third, poor PCB layout causing ground currents to flow through the R4 ground-trace, lifting the V+ reference node slightly above true zero. Always use a Kelvin connection or star-ground for the R4 ground reference.
Can I use an LM358 for a high-precision differential circuit?
While the LM358 is cheap and ubiquitous, it is a poor choice for precision differential amplification. As detailed in standard semiconductor textbooks, the LM358 suffers from high input offset voltage (up to 3mV, which a gain of 5 amplifies to a 15mV output error), high bias currents, and notorious crossover distortion when the output swings near zero volts on a single supply. If you are on a strict budget and need single-supply operation, upgrade to a modern rail-to-rail precision part like the TLV2372 or MCP6002, which cost only pennies more but eliminate the crossover dead-zone and offer vastly better DC accuracy.






