The differential pair

Build a differential pair, watch it split a fixed tail current between two transistors, measure how far the input can move before one side takes it all, and read its gain from the half circuit.

Lesson
E5.1
Time
30 min
Runs on
ngspice
Check
5 questions

A sensor front end had to amplify a 2 mV, 1 kHz signal riding on 200 mV of 50 Hz hum, the same on both wires. A single-transistor stage amplified both, and the hum drove its output from rail to rail.

TransientThe same input into one transistor and into a pairTop: one transistor (W/L = 10/1 µm, 50 kΩ load). Bottom: a pair of the same transistors, read as v(d2) − v(d1).
  • v(dcs)
  • vod
00.5 V1.0 V1.5 V2.0 VOne transistor-20 mV-10 mV010 mV20 mVPair, v(d2) − v(d1)05 ms10 ms15 ms20 msTime00.5 V1.0 V1.5 V2.0 VOne transistor-20 mV-10 mV010 mV20 mVPair, v(d2) − v(d1)05 ms10 ms15 ms20 msTime
  1. Time 5.25 msv(dcs) = 59.41 mV · vod = 16.67 mV

    The hum is near its top: the single stage is hard on and its drain sits at the ground rail. The pair shows a clean +16.7 mV peak of the signal.

  2. Time 14.75 msv(dcs) = 1.794 V · vod = -16.12 mV

    Half a hum period later the single stage is cut off, near 1.8 V. The pair ignores the hum, which moved both its gates together.

Read the plot as a table
Timev(dcs)vod
0 s1.333 V-0.8882 fV
5 ms59.84 mV-385.7 nV
5.25 ms59.41 mV16.67 mV
10 ms1.333 V418.6 nV
14.75 ms1.794 V-16.12 mV
15 ms1.794 V433.6 nV
20 ms1.333 V-29.48 nV

Measured on ngspice 42 (1000 of the run's 2008 time points).

The fix was two transistors sharing one current, which answer the difference between two wires and largely ignore what the wires share.

Two transistors share one current

A differential pair with resistor loadsM1 and M2 share the tail; M5 copies IB through the diode MB.
A differential pair with resistor loadsVDD1.8 VRD150 kΩRD250 kΩM110/1M210/1IB20 µAMB8/1M58/1in+in−d11.311 Vd21.311 Vtail0.454 V
  1. The tail sets the total

    MB turns IB into a gate voltage; M5 copies it and pulls 19.56 µA out of the tail, whatever the gates do.

    19.56 µA

  2. Balance

    With both gates at 1.2 V, vd = 0 and each identical half carries 9.78 µA, so both drains sit at 1.311 V.

    9.78 µA · 9.78 µA

  3. Steering

    Raise in+ by 25 mV and lower in− by 25 mV, so vd = +50 mV. M1 carries 13.73 µA, M2 5.83 µA, and the sum barely moves.

    13.73 µA · 5.83 µA

Read the circuit as text
  • RD1 resistor (50 kΩ): pin 1 → VDD, pin 2 → d1
  • RD2 resistor (50 kΩ): pin 1 → VDD, pin 2 → d2
  • M1 NMOS transistor (10/1): gate → n1, drain → d1, source → tail
  • M2 NMOS transistor (10/1): gate → n2, drain → d2, source → tail
  • IB current source (20 µA): + → VDD, − → n3
  • MB NMOS transistor (8/1): gate → n3, drain → n3, source → 0
  • M5 NMOS transistor (8/1): gate → n3, drain → tail, source → 0
  • in+ port: terminal → n1
  • in− port: terminal → n2
  • d1 = 1.311 V
  • d2 = 1.311 V
  • tail = 0.454 V

Operating point of the lab at vd = 0. NMOS bodies at ground. W/L in µm.

Two matched NMOS transistors, M1 and M2, join their sources at the tail. A current source, here the mirror device M5 (E4.1 The simple mirror and its errors), pulls a fixed current ISS out of it.

M5's gate line, nb, comes from an ideal 20 µA source IB into the diode MB, and the whole module keeps that bias. On a chip, nb would come from a bias block like the one in E4.7 Capstone: a bias block to spec.

The differential input vd = vin+ − vin− is the difference of the gate voltages. The common-mode input VCM is their average, 1.2 V here. The lab sweeps vd and keeps VCM fixed.

DC sweepThe tail current splits between M1 and M2Pair A (W/L = 10/1 µm); each current is read by a 0 V source in series with its load.
  • I_D1
  • I_D2
  • I_D1 + I_D2
05 µA10 µA15 µA20 µA25 µADrain current-400 mV-200 mV0200 mV400 mVDifferential input v_dM1 has 10 %M1 has 90 %05 µA10 µA15 µA20 µA25 µADrain current-500 mV0500 mVDifferential input v_dM1 has 10 %M1 has 90 %
  1. Differential input v_d -300 mVI_D1 = 25.78 nA · I_D2 = 19.69 µA · I_D1 + I_D2 = 19.72 µA

    M2's gate is 300 mV above M1's, so M2 carries almost all of the tail current.

  2. Differential input v_d 0 VI_D1 = 9.778 µA · I_D2 = 9.778 µA · I_D1 + I_D2 = 19.56 µA

    Balance: each side carries 9.78 µA, half of the 19.56 µA tail.

  3. Differential input v_d 120.2 mVI_D1 = 17.63 µA · I_D2 = 1.959 µA · I_D1 + I_D2 = 19.59 µA

    At vd = +120.2 mV, M1 carries 90 % of the total and M2 10 %.

  4. Differential input v_d 300 mVI_D1 = 19.69 µA · I_D2 = 25.78 nA · I_D1 + I_D2 = 19.72 µA

    At +300 mV M2 is down to 25.8 nA, because M1 already has all the current there is.

Read the plot as a table
Differential input v_dI_D1I_D2I_D1 + I_D2
-400 mV1.509 nA19.79 µA19.79 µA
-300 mV25.78 nA19.69 µA19.72 µA
-200 mV349.7 nA19.29 µA19.64 µA
0 V9.778 µA9.778 µA19.56 µA
120.2 mV17.63 µA1.959 µA19.59 µA
200 mV19.29 µA349.7 nA19.64 µA
300 mV19.69 µA25.78 nA19.72 µA
400 mV19.79 µA1.509 nA19.79 µA

Measured on ngspice 42 (the lab, 1001 points). The sum rises from 19.56 to 19.72 µA at +300 mV: the tail node moves, and M5 is not ideal.

The two drain currents always add up to the tail current. A small vd moves current from one side to the other, and a large one sends all of it to one side: the pair steers the current.

So the pair never delivers more than ISS. That ceiling sets an op-amp's slew rate (E5.6).

How far the input can move

Between balance and full steering lies the linear range. Mark it where one side carries 90 %. Two laws predict that point from gm/ID, one device's transconductance per unit current at balance (E2.5 Transconductance and gm/ID).

  1. Square law (strong inversion)

    ID = (k/2)Vov2 with overdrive Vov, so gm/ID = 2/Vov. The difference current is ΔI = (ISS/2)·x·√(4 − x2), x = vd/Vov. ΔI = 0.8 ISS at x = 0.894: vd,90 = 1.789/(gm/ID). Full steering at √2·Vov.

  2. Exponential law (weak inversion)

    Below threshold the current is exponential in VGS, and ΔI = ISS·tanh(vd·(gm/ID)/2). So vd,90 = ln 9/(gm/ID) = 2.197/(gm/ID).

The lab holds a second pair, B, of W/L = 1/1 µm on its own tail. The same current through a narrower device needs more overdrive, so its gm/ID is lower.

DC sweepA narrow pair stays linear over a wider inputShare of each pair's current in M1.
  • pair A, 10/1
  • pair B, 1/1
020%40%60%80%100%120%Share of the tail current in M1-400 mV-200 mV0200 mV400 mVDifferential input v_d90 %10 %A: 120.2 mVB: 284.3 mV020%40%60%80%100%120%Share of the tail current in M1-500 mV0500 mVDifferential input v_d90 %10 %A: 120.2 mVB: 284.3 mV
  1. Differential input v_d 120.2 mVpair A, 10/1 = 90% · pair B, 1/1 = 68.94%

    Pair A reaches 90 % at vd = 120.2 mV, while pair B is still far from it.

  2. Differential input v_d 284.3 mVpair A, 10/1 = 99.8% · pair B, 1/1 = 90%

    Pair B needs 284.3 mV: more than twice the range, from the same current.

Read the plot as a table
Differential input v_dpair A, 10/1pair B, 1/1
-400 mV0.007625%2.267%
-200 mV1.78%19.73%
0 V50%50%
120.2 mV90%68.94%
200 mV98.22%80.27%
284.3 mV99.8%90%
400 mV99.99%97.73%

Measured on ngspice 42 (the lab, 1001 points).

Pairgm/ID at balanceSquare law, vd,90Exponential law, vd,90Measured vd,90
A, 10/1 µm17.61 /V101.6 mV124.7 mV120.2 mV
B, 1/1 µm6.69 /V267.5 mV328.6 mV284.3 mV

Both laws use M1's measured gm/ID; the lab prints every number.

Pair A, at 17.6 /V, is in moderate inversion (between weak and strong, E2.5) and lands near the exponential law. Pair B, in strong inversion, lands 6 % wide of the square law. The laws tell you which way to move; the simulator tells you how far.

The trade is the one from E2.5: a wide device gives more gm per µA and a narrower linear range, a narrow one the reverse.

The tail stands still: the half circuit

For a small vd, one side gains what the other loses, so the tail has no reason to move; the figure checks that.

DC sweepDifferential output and tail voltagePair A: differential output above, tail node below.
  • v(d2) − v(d1)
  • v(taila)
-1.5 V-1.0 V-0.5 V00.5 V1.0 V1.5 VDifferential output400 mV450 mV500 mV550 mV600 mV650 mVTail voltage-400 mV-200 mV0200 mV400 mVDifferential input v_dslope 8.238 V/V-2 V-1 V01 V2 VDifferential output400 mV450 mV500 mV550 mV600 mV650 mVTail voltage-500 mV0500 mVDifferential input v_dslope 8.238 V/V
  1. Differential input v_d 0 Vv(d2) − v(d1) = -2.211 pV · v(taila) = 454.2 mV

    At balance the slope is 8.238 V/V, the differential gain. The tail is flat at 0.454 V.

  2. Differential input v_d 300 mVv(d2) − v(d1) = 983.3 mV · v(taila) = 540.4 mV

    All the current runs through M1 and the output stops at ISS·RD. The tail now follows the higher gate.

Read the plot as a table
Differential input v_dv(d2) − v(d1)v(taila)
-400 mV-989.4 mV581.8 mV
-200 mV-947.2 mV499.9 mV
0 V-2.211 pV454.2 mV
200 mV947.2 mV499.9 mV
300 mV983.3 mV540.4 mV
400 mV989.4 mV581.8 mV

Measured on ngspice 42 (the lab, 1001 points).

A node that does not move for the signal is an AC ground. Cut the circuit down the middle and ground the tail, and each half is a common-source stage (E3.2 Common source with a resistor load) driven by ±vd/2.

Each drain moves by ∓gmRD·vd/2, so Ad = gmRD, or gm(RD ∥ ro) with the device's output resistance. M1's operating point gives 8.248; the run's slope is 8.238.

For a common-mode input both sides push the same way, so the tail moves. E5.2 measures what that does.

One transistor

* gate = 0.6455 V + hum + signal
VGC gc0 0 0.6455
VHC gh gc0 SIN(0 0.2 50)
ES gc gh sig 0 1
RDC vdd dcs 50k
XMC dcs gc 0 0 sky130_fd_pr__nfet_01v8 W=10 L=1

cs_min = 5.937513e-02, cs_max = 1.794010e+00: the hum drives the drain from rail to rail.

A pair

* both gates = 1.2 V + hum, signal split between them
VH cm cm0 SIN(0 0.2 50)
EP inp cm sig 0 0.5
EN inn cm sig 0 -0.5
XM1 d1 inp tail 0 sky130_fd_pr__nfet_01v8 W=10 L=1
XM2 d2 inn tail 0 sky130_fd_pr__nfet_01v8 W=10 L=1

od_max = 1.667884e-02: v(d2) − v(d1) carries 8.3 × 2 mV of signal and rejects the hum.

Both from the hook's netlist on ngspice 42.

Asked in interviews
  1. Why use a differential pair instead of one transistor?

    It amplifies the difference between two inputs and rejects what they share: hum, supply noise, a drifting bias. The tail current also caps how far any input can push it.

  2. What sets the input range over which the pair is linear?

    The gm/ID of the pair devices sets it. The square law steers all current at √2 Vov, and in weak inversion 90 % is reached at ln 9/(gm/ID). Narrower devices or more current widen the range and cost gain per µA.

  3. What is the small-signal gain of a resistively loaded pair?

    Differentially it is gm(RD ∥ ro), with gm of one device at ISS/2, because the tail is an AC ground and each half is a common-source stage. Taken from one drain, the gain is half of that.

Try it

Run the netlist. a90 and b90 are the differential inputs at which M1 carries 90 % of each pair's current; sq90_* and ex90_* are the two laws' predictions from the measured gm/ID. ad0 is the slope of v(d2) − v(d1) at balance, and ad_hand is gm(RD ∥ ro) from the operating point.

Predict, then run. Halve the width of pair A (W=5): gm/ID falls, so a90 should grow and ad0 should shrink. Then set IB to 40u and the four 50k loads to 25k (40 µA through 50 kΩ would need 2 V): twice the current through the same devices moves both pairs toward strong inversion, and a90 and b90 grow. Last, change VCM to 0.9 and watch pair B: its tail runs out of headroom (E5.2).

SPICEngspice 42 · simulator service
Edit the netlist, then run it
Expected measurements: id1_0 = 9.777543e-06 isum_0 = 1.955509e-05 a90 = 1.202120e-01 b90 = 2.843037e-01 ad0 = 8.237701e+00 ad_hand = 8.248154e+00

Check yourself

Predict the outputThis is a pair reduced to its model: two G sources of 1 mS (one per side), 10 kΩ loads and a 50 kΩ tail resistance. The inputs carry +0.5 V and −0.5 V of AC. The run prints the real part of v(d2) − v(d1). Type the line meas prints (format: ad = 6.319360e-01).
* a differential pair as a model: g_m = 1 mS per side, R_D = 10 k, a 50 k tail
VP g1 0 dc 0 ac 0.5
VN g2 0 dc 0 ac -0.5
G1 d1 s g1 s 1m
G2 d2 s g2 s 1m
RD1 d1 0 10k
RD2 d2 0 10k
RSS s 0 50k
.control
ac lin 3 1k 3k
let ad=real(v(d2)-v(d1))
meas ac ad FIND ad AT=1k
.endc
.end
ConceptRead the current-split plot of pair A. At what differential input does M2 carry 10 % of the tail current?
ConceptFour half circuits are drawn for a resistor-loaded pair with a tail resistance RSS. Which one is wrong?
ConceptAt the same tail current, which change widens the range of vd over which the pair stays linear?
ConceptPair A (19.56 µA tail) gets a 1 V differential input. What do the drain currents do?

Remember

  • A differential pair is two matched transistors sharing a tail current; the drain currents always add up to ISS, and the differential input decides the split.
  • The pair steers: past a few hundred millivolts one side carries all of ISS, so it can never deliver more than the tail current.
  • The linear range scales with 1/(gm/ID): 90 % steering at 120 mV for gm/ID = 17.6 /V and at 284 mV for 6.7 /V; the square and exponential laws bracket the run.
  • For a differential signal the tail is an AC ground, so each half is a common-source stage and Ad = gm(RD ∥ ro).