Op-Amp Series – Part 5: The Differential Amplifier

 The Differential Amplifier

A differential amplifier is an operational amplifier circuit that amplifies the difference between two input voltages.
Instead of measuring a signal relative to ground, it measures how much one signal differs from another.

This makes differential amplifiers incredibly useful for:

  • Rejecting noise
  • Comparing signals
  • Sensor interfaces
  • Audio and measurement circuits

In simple mathematical terms:

Output = (Input 1 – Input 2) × Gain

In the real world, signals are often noisy. Long wires, motors, power supplies, and digital circuits can all introduce interference.

A differential amplifier helps by:

  • Amplifying only the difference between inputs
  • Rejecting signals that appear equally on both inputs (called common-mode signals)

The Basic Differential Amplifier Circuit

Differential Amplifier Circuit


A classic differential amplifier uses four resistors and one op-amp.

For proper operation:

  • Resistor ratios must match
  • This ensures accurate subtraction and good noise rejection

How the Circuit Works

Let’s break it down conceptually:

  • One input is applied to the inverting (–) input through a resistor
  • The other input is applied to the non-inverting (+) input through a resistor
  • Feedback resistors control the gain
  • The op-amp adjusts its output so both inputs behave according to feedback rules

If both inputs rise by the same amount, the output ideally does not change.

If one input rises more than the other, the output changes proportionally to the difference.

Differential Amplifier Formula 

A differential amplifier is designed to amplify the difference between two voltages, not the voltages themselves. 

To make this work cleanly, the resistor values must be arranged in matched pairs.

  • R1 and R3 form the input resistors
  • R2 and R4 form the feedback / scaling resistors

When:

  • R1 = R3
  • R2 = R4

the circuit becomes symmetrical.
This symmetry is what allows the op-amp to subtract one input from the other accurately.

If the resistors are not matched, the subtraction will be imperfect and noise rejection will suffer.

When the resistor pairs are matched, the output voltage is given by:

Vout = (R2 / R1) × (V2 − V1)

Where:

  • V2 is the voltage applied to the non-inverting (+) input
  • V1 is the voltage applied to the inverting (–) input
  • R2 / R1 sets how much the difference is amplified (gain)

Understanding the Gain Term (R2 / R1)

The resistor ratio R2 / R1 is the gain of the differential amplifier.

Case 1: Unity Gain (Pure Subtraction)

If R2 = R1 then:

Gain = R2 / R1 = 1

So the output becomes:

Vout = V2 − V1

The circuit simply subtracts one voltage from the other — no amplification.

Case 2: Amplifying the Difference

If R2 > R1 then:

Gain > 1

Now the op-amp multiplies the voltage difference by that gain.

This is useful when:

  • The difference between the two signals is small
  • But you want a larger, easier-to-measure output

Math Example

Let’s use real numbers.

Given:
  • V2 = 2.5 V
  • V1 = 2.0 V
  • Gain = 10

Step 1: Find the difference
V2 − V1 = 2.5 V − 2.0 V = 0.5 V
Step 2: Apply the gain
Vout = 10 × 0.5 V = 5.0 V

The Key Takeaway

The absolute voltages don’t matter, only the difference between them.

For example:

  • (2.5 V and 2.0 V) → difference = 0.5 V
  • (4.5 V and 4.0 V) → difference = 0.5 V

With the same gain, both produce the same output.

That’s the power of a differential amplifier:

  • It ignores common voltage levels
  • It amplifies only what’s different

Practical Build

Let’s build a basic differential amplifier using an LM358, where the output voltage is proportional to the difference between two input voltages.

We’ll deliberately keep the resistor values simple and matched so the behaviour is easy to measure and understand.

Build Goal

We will build a unity-gain differential amplifier:

  • All resistors equal (10 kΩ)
  • Two DC voltage inputs derived from a 6 V supply using voltage dividers

Input Voltages:

  • V2 (non-inverting input) = 2.0 V
  • V1 (inverting input) = 1.0 V

Expected Output:
Vout = (V2 − V1) × Gain
Vout = (2.01.0) × 1
Vout = 1.0 V

Circuit Diagram

Differential Amplifier Practical Build Circuit Diagram

Parts Required

  • LM358 operational amplifier
  • 6 × 10 kΩ resistors (critical: all equal)
  • 1 × 50 kΩ resistor (voltage divider)
  • 1 × 20 kΩ resistor (voltage divider)
  • Breadboard
  • 6 V DC power supply
  • Jumper wires
  • Multimeter (oscilloscope optional)

Step-by-Step Wiring

1. Place the LM358

  • Insert the LM358 across the breadboard centre gap
  • Identify pin 1 (dot or notch)

We’ll use Op-Amp A:

Pin

Function

1

Output

2

Inverting (–)

3

Non-inverting (+)

4

Ground

8

+6 V

2. Power the Op-Amp

Power the Op-Amp
  • Connect pin 8 → +6 V
  • Connect pin 4 → Ground

3. Build the Inverting Input Network (V1)

V1 inverting network
  • Connect 10 kΩ resistor (R1) from V1 source → pin 2
  • Connect 10 kΩ resistor (R2) from pin 1 (output) → pin 2

This sets the inverting side gain.

4. Build the Non-Inverting Input Network (V2)

V2 Non-Inverting Network

  • Connect 10 kΩ resistor (R3) from V2 source → pin 3
  • Connect 10 kΩ resistor (R4) from pin 3 → ground

This mirrors the inverting side and ensures proper subtraction.

5. Create the Input Voltages (Voltage Dividers)

V1 = 1 V

V1 Voltage Divider

  • Connect 6 V → 50 kΩ → V1 node
  • Connect 10 kΩ from V1 node → ground

V2 = 2 V

V2 Voltage Divider

  • Connect 6 V → 20 kΩ → V2 node
  • Connect 10 kΩ from V2 node → ground

Step-by-Step Measurement Guide

From the values we selected earlier we should see the following: -
Vout = V2 − V1 = 2.01.0 = 1.0 V
  1. Measure V1 directly, expect ~1.0 V

    V1 measurement

  2. Measure V2 directly, expect ~2.0 V

    V2 measurement

  3. Measure Vout (pin 1 to ground), expect ~1.0 V

    Vout measurement

These measurements are different to what we predicted as for R9 I used a 22kΩ resistor and R11 I used a 47kΩ resistor. This changed the voltage levels. However you can see the that Vout still provides a correct reading of 0.51V difference, as V1 measured 0.9V and V2 measured 1.41V, showing that the circuit works as intended.

What Happens If You Swap Inputs?

If we swap V1 and V2 the output becomes −1.0 V

On a single-supply LM358, the output cannot go negative as we seen in previous posts, so you will see the output clip at ground.

Youtube Video

This is a video showing the construction of the circuit and the measurements.

What’s Next?

Next up, we’ll look at The Integrator Amplifier, where the output slowly builds up based on the input signal, rather than instantly following it.

👉 Op-Amp Series – Part 6: The Integrator Amplifier

Hope you enjoyed this post.
Thanks for reading
Matty

Comments

Popular posts from this blog

6502 - Part 2 Reset and Clock Circuit

BBC Model B + MMFS: Command Guide

Math Behind Logic Gates