---
title: The differential pair
heading: Two matched transistors that amplify a difference and ignore what's common
eyebrow: C6 · Lesson 6 · The differential pair
xp: 40
---

::: hook
Every op amp starts with two matched transistors whose sources (or emitters) are tied together and fed from one current source. A fixed current has to be shared between them, so only the difference between their two inputs decides how it splits; raising both inputs together changes almost nothing. That's the **differential pair**: it amplifies the signal you want, the difference, while rejecting interference and drift that arrive equally on both inputs. It also has a built-in limit, since neither side can carry more than the whole tail current, which makes it a clean, predictable switch for large signals.
:::

::: play
- How the tail current splits between the two sides, against the differential input voltage: a BJT pair (solid) and a MOSFET pair (dashed).
- The BJT pair switches almost all the current to one side within about ±100 mV: its curve is a tanh set by $V_T$. The MOSFET pair's linear range is set by its overdrive.
- Raise the MOSFET's overdrive: its curve widens, giving a larger linear range but less gain per volt.
:::
:::

```sim plot
view: graph
x: v = -0.4..0.4 V
y: f = 0..1
slider: Vov = 0.05..0.3 step 0.01 = 0.2 V
plot: 1/(1 + exp(-v/0.02585)) | label: BJT, fraction in side 1
plot: (0.5 + v/(2*Vov)*sqrt(abs(1 - (v/(2*Vov))^2)))*step(sqrt(2)*Vov - abs(v)) + step(v - sqrt(2)*Vov) | label: MOSFET | dashed | color: ch2
readout: MOSFET fully switched at, V = sqrt(2)*Vov | digits: 3
```

::: predict
## Both inputs of a differential pair rise together by 1 V. What happens to the two drain currents?

- [ ] Both rise a lot
- [x] Almost nothing: the tail current is fixed
- [ ] One rises, the other falls
- [ ] Both fall to zero

::: reveal
Almost nothing. The two currents have to add to the tail current, and with equal inputs they split equally whatever the common level. The common source just rises with the inputs. Only a difference between the inputs moves current from one side to the other.
:::
:::

::: nameit
## Large signals

**BJT pair** with tail current I (α ≈ 1): the collector currents split as

$$i_{C1} = \frac{I}{1 + e^{-v_{id}/V_T}} \qquad i_{C1} - i_{C2} = I\tanh\frac{v_{id}}{2V_T}$$

linear only for $|v_{id}|$ well under $2V_T$, about 50 mV; by ±4 $V_T$ (100 mV) it's 98% switched.

**MOSFET pair** with overdrive $V_{OV}$ at balance:

$$i_{D1} = \frac I2 + \frac{I}{V_{OV}}\frac{v_{id}}{2}\sqrt{1 - \left(\frac{v_{id}/2}{V_{OV}}\right)^2}$$

fully switched at $|v_{id}| = \sqrt2V_{OV}$. More overdrive buys linear range at the cost of transconductance.

## Small signals

Each transistor runs at I/2, so $g_m = \frac{I}{2V_T}$ (BJT) or $\frac{I}{V_{OV}}$ (MOSFET). A small difference $v_{id}$ puts $+v_{id}/2$ on one side and $-v_{id}/2$ on the other, and the common source stays still: it's a **virtual ground** for differential signals.

$$A_d = g_mR_D \text{ (output taken between the drains)} \qquad A_d = \tfrac12g_mR_D \text{ (from one drain)}$$

A BJT pair's differential input resistance is $2r_\pi$.

## Common mode

A common input $v_{icm}$ is fought by the tail's output resistance $R_{SS}$: each side sees $2R_{SS}$ in its source, so from one drain

$$A_{cm} \approx -\frac{R_D}{2R_{SS}} \qquad \text{CMRR} = \left|\frac{A_d}{A_{cm}}\right| \approx g_mR_{SS}$$

usually quoted in dB. Taken between the drains, a perfectly matched pair rejects common mode completely; mismatch lets some through. A better tail (a cascode mirror) means better CMRR.

**Input common-mode range:** the inputs must stay low enough that the transistors remain saturated, $V_{CM} \le V_{DD} - \frac I2R_D + V_t$, and high enough to leave the tail source its headroom.
:::

```sim circuit
VDD vdd 0 5                         @ 8,-2 down 7
RD1 vdd d1 4.7k                     @ 2,-2 down 2
RD2 vdd d2 4.7k                     @ 5,-2 down 2
M1 d1 g1 tail nmos VTO=0.5 KP=20m   @ 1,1
M2 d2 g2 tail nmos VTO=0.5 KP=20m   @ 6,1 left
I1 tail 0 1m                        @ 3,2 down 3
V1 g1 0 sine 10m V 1k Hz 0 ° 2      @ 0,1 down 4
V2 g2 0 2                           @ 7,1 down 4
scope: v(d1), v(d2)
time: 0..3m s
meter: v(d1), v(d2), v(tail)
```

::: example
## The MOSFET pair in the circuit has $K$ = 20 mA/V², a 1 mA tail and 4.7 kΩ loads. Find its overdrive, $g_m$ and single-ended gain.

::: solution
1. **Overdrive.** At 0.5 mA each,
   $$\begin{aligned} V_{OV} &= \sqrt{2 \times 0.5/20} \\ &= 0.224\ \text{V} \end{aligned}$$
2. **Transconductance.**
   $$\begin{aligned} g_m &= \frac{1\ \text{mA}}{0.224\ \text{V}} \\ &= 4.47\ \text{mS} \end{aligned}$$
3. **Single-ended gain.**
   $$\begin{aligned} A_d &= \frac12 \times 4.47 \times 4.7 \\ &= 10.5 \end{aligned}$$
   so the 10 mV input gives about 105 mV at each drain, in opposite phase.

**Answer:** the overdrive is 0.224 V, $g_m$ is 4.47 mS and the single-ended gain is 10.5.
:::
:::

::: example
## A BJT pair has a 2 mA tail with an output resistance of 50 kΩ and 5 kΩ collector loads. Find its single-ended differential gain, common-mode gain and CMRR.

::: solution
1. **Transconductance.** Each side carries 1 mA:
   $$\begin{aligned} g_m &= \frac{2}{2 \times 0.02585}\ \text{mS} \\ &= 38.7\ \text{mS} \end{aligned}$$
2. **Differential gain.**
   $$\begin{aligned} A_d &= \frac12 \times 38.7 \times 5 \\ &= 96.7 \end{aligned}$$
3. **Common-mode gain.**
   $$\begin{aligned} A_{cm} &= -\frac{5}{100} \\ &= -0.05 \end{aligned}$$
4. **CMRR.**
   $$\frac{96.7}{0.05} = 1934$$
   or 65.7 dB.

**Answer:** the single-ended differential gain is 96.7, the common-mode gain −0.05, and the CMRR 1934 (65.7 dB).
:::
:::

::: example
## How large a differential input steers 90% of the tail current to one side of a BJT pair? And what fully switches the MOSFET pair of the first example ($V_{OV}$ = 0.224 V)?

::: solution
1. **What 90% means.** With 90% on one side, $i_{C1} - i_{C2} = 0.8I$, so
   $$\tanh\frac{v_{id}}{2V_T} = 0.8$$
2. **Solve for the input.**
   $$\begin{aligned} v_{id} &= 2V_T\,\text{artanh}\,0.8 \\ &= 2 \times 25.85\ \text{mV} \times 1.099 \\ &= 56.8\ \text{mV} \end{aligned}$$
3. **The MOSFET pair.** It switches completely at
   $$\sqrt2V_{OV} = 0.316\ \text{V}$$
4. **Compare.** A BJT pair is linear only over a few tens of millivolts, a MOSFET pair over a few hundred: the price of the BJT's higher $g_m$ per milliamp.

**Answer:** 56.8 mV steers 90% of the tail to one side of the BJT pair, and 0.316 V fully switches the MOSFET pair.
:::
:::

::: check
given: I = 0.2 | 1 | 4
answer: I/(2*0.02585)
unit: mS
tolerance: 0.5%

## A BJT differential pair has a {I} mA tail. What is each transistor's transconductance?

::: right
Right. Each carries I/2: $g_m = \frac{I}{2V_T}$ = {answer}.
:::

::: misses
- [I/0.02585] Each side carries only half the tail current.
- [any] Not yet. $g_m = I_C/V_T$ with $I_C = I/2$.
:::
:::

::: check
given: I = 0.2 | 1; Vov = 0.1 | 0.3; RD = 5 | 20
answer: I/Vov*RD/2
tolerance: 0.5%

## A MOSFET pair with a {I} mA tail and {Vov} V of overdrive has {RD} kΩ drain resistors. What is its differential gain taken from one drain?

::: right
Right. $\frac12g_mR_D$ with $g_m = I/V_{OV}$: {answer}.
:::

::: misses
- [I/Vov*RD] That's between the two drains; one drain gives half.
- [any] Not yet. $g_m = I/V_{OV}$ for each device.
:::
:::

::: check
given: vid = 30 | 50 | 80
answer: 1/(1 + exp(-vid/25.85))
tolerance: 0.5%

## A BJT pair has {vid} mV of differential input. What fraction of the tail current flows on the positive side?

::: right
Right. $\frac{1}{1 + e^{-v_{id}/V_T}}$ = {answer}.
:::

::: misses
- [0.5 + vid/(4*25.85)] That's the small-signal line; the exact split is the logistic function.
- [any] Not yet. The ratio of the two currents is $e^{v_{id}/V_T}$.
:::
:::

::: check
given: Vov = 0.1 | 0.2 | 0.4
answer: sqrt(2)*Vov*1000
unit: mV
tolerance: 0.5%

## A MOSFET pair has {Vov} V of overdrive at balance. At what differential input is it fully switched?

::: right
Right. $\sqrt2V_{OV}$ = {answer}.
:::

::: misses
- [Vov*1000] It takes $\sqrt2V_{OV}$, not $V_{OV}$.
- [any] Not yet. All of I on one side means $V_{GS} - V_t = \sqrt2V_{OV}$ there.
:::
:::

::: check
given: RD = 5 | 20; RSS = 50 | 500
answer: RD/(2*RSS)
tolerance: 0.5%

## A pair has {RD} kΩ loads and a tail with {RSS} kΩ of output resistance. What is the magnitude of its single-ended common-mode gain?

::: right
Right. $\frac{R_D}{2R_{SS}}$ = {answer}.
:::

::: misses
- [RD/RSS] Each side sees twice the tail's resistance, because both share it.
- [any] Not yet. $A_{cm} = -R_D/(2R_{SS})$.
:::
:::

::: check
given: gm = 1 | 10 | 40; RSS = 20 | 200
answer: 20*log(gm*RSS)
unit: dB
tolerance: 0.5%

## A pair has $g_m$ = {gm} mS per side and a tail resistance of {RSS} kΩ. What is its single-ended CMRR?

::: right
Right. $g_mR_{SS}$ in dB: {answer}.
:::

::: misses
- [gm*RSS] Express it in decibels.
- [any] Not yet. CMRR ≈ $g_mR_{SS}$.
:::
:::

::: check
given: VDD = 3.3 | 5; I = 0.2 | 1; RD = 2 | 5; Vt = 0.4 | 0.7
answer: VDD - I/2*RD + Vt
unit: V
tolerance: 0.5%

## A MOSFET pair on {VDD} V has a {I} mA tail, {RD} kΩ loads and $V_t$ = {Vt} V. What is the highest input common-mode voltage that keeps it saturated?

::: right
Right. $V_{DD} - \frac I2R_D + V_t$ = {answer}.
:::

::: misses
- [VDD - I/2*RD] The gate may sit a threshold above the drain.
- [any] Not yet. Saturation needs $V_D \ge V_G - V_t$.
:::
:::

::: check
kind: parts
given: f = 0.6 | 0.75 | 0.9; ov = 0.15 | 0.3

## A BJT pair and a MOSFET pair ($V_{OV}$ = {ov} V) share their tails.

::: part
answer: 25.85*ln(f/(1 - f))
unit: mV
tolerance: 0.5%

### What differential input steers {f} of the BJT pair's tail to one side?

::: misses
- [0.5*25.85*ln(f/(1 - f))] The tanh's argument is $v_{id}/2V_T$, so $i_{C1} = \frac{I}{1 + e^{-v_{id}/V_T}}$.
- [any] Solve $\frac{1}{1 + e^{-v_{id}/V_T}} = f$: $v_{id} = V_T\ln\frac{f}{1 - f}$.
:::
:::

::: part
answer: sqrt(2)*ov
unit: V
tolerance: 0.5%

### What input fully switches the MOSFET pair?

::: misses
- [ov] Full switching takes $\sqrt2V_{OV}$.
- [any] $\sqrt2V_{OV}$.
:::
:::
:::

::: check
kind: derivation
vars: I = 0.00001..0.01, v = 0.001..0.2, T = 0.02..0.03

## A BJT pair with tail I gets a differential input v at thermal voltage T.

::: step
answer: I*tanh(v/(2*T))

### What's the difference of the collector currents?
:::

::: step
answer: I/(1 + exp(-v/T))

### What's the first collector's current?
:::

::: step
answer: I/(2*T)

### What's the slope of the difference at v = 0, the pair's $g_m$ for the output difference?
:::

::: right
Right. The slope is $\frac{I}{2V_T}$, each transistor's own $g_m$.
:::
:::

::: explain
## Why does a differential pair amplify the difference between its inputs but not their common level?

::: model
The two transistors share a fixed tail current, so their currents always add to the same total. If both inputs rise together, the shared source or emitter rises with them, the gate-source voltages stay equal, and the current still splits evenly: nothing reaches the outputs. Only a difference between the inputs makes one transistor conduct more than the other, and since the total is fixed, every bit one gains the other loses, giving equal and opposite output swings. A real tail source isn't perfectly fixed, which lets a little of the common-mode signal through.
:::
:::

::: practice

::: check
given: beta = 100 | 300; I = 0.1 | 1
answer: 2*beta*2*0.02585/I
unit: kΩ
tolerance: 0.5%

## What is the differential input resistance of a BJT pair (β = {beta}) with a {I} mA tail?

::: misses
- [any] $2r_\pi$, each $r_\pi = \beta/g_m$ at I/2.
:::
:::

::: check
given: CMRR = 60 | 80 | 100
answer: 10^(CMRR/20)
tolerance: 0.5%

## What ratio is a CMRR of {CMRR} dB?

::: misses
- [any] $10^{dB/20}$.
:::
:::

::: check
given: I = 0.5 | 2; K = 2 | 10
answer: sqrt(I/K)
unit: V
tolerance: 0.5%

## What is the overdrive of each device in a MOSFET pair with a {I} mA tail and $K$ = {K} mA/V²?

::: misses
- [any] $\frac K2V_{OV}^2 = I/2$.
:::
:::
:::
