---
title: The MOSFET as a switch and as an amplifier
heading: Two jobs for one device
eyebrow: C5 · Lesson 18 · MOSFET switch and amplifier
xp: 50
---

::: hook
The same MOSFET does two very different jobs depending on how it's driven. Drive its gate hard on or hard off and it's a switch: nearly a short or nearly an open, controlling amps with a few volts and no steady gate current. Bias its gate partway on and wiggle it slightly, and the drain current wiggles in proportion; through a resistor that becomes a larger voltage wiggle. The first job runs every motor driver and power supply, the second every amplifier.

::: play
- A common-source amplifier: the gate sits at 2 V with a 100 mV signal on top; the drain connects to 10 V through $R_D$.
- Compare the input and output on the scope. How much larger is the output, and which way does it go?
- Raise $R_D$. The gain rises, until something goes wrong. What, and why?
:::
:::

```sim circuit
VG g 0 sine 100m V 1k Hz 0 ° 2      @ 0,2 down 2
M1 d g 0 nmos VTO=1 KP=2m           @ 2,2
RD vdd d 5k                         @ 3,-1 down 2
VDD vdd 0 10                        @ 6,-1 down 5
slider: RD 1k..20k log
scope: v(g), v(d)
time: 0..3m s
meter: v(d), i(M1)
```

::: predict
## In the amplifier above ($V_{GS}$ = 2 V, $V_t$ = 1 V, K = 2 mA/V², $R_D$ = 5 kΩ), what is the voltage gain?

- [ ] +10
- [x] −10
- [ ] −1
- [ ] −20

::: reveal
−10. The bias current is $\frac K2(V_{GS} - V_t)^2 = 1$ mA, so $g_m = K(V_{GS} - V_t) = 2$ mS. A 100 mV rise at the gate adds 0.2 mA, which drops an extra 1 V across $R_D$, pulling the drain down: a gain of $-g_mR_D = -10$. Raise $R_D$ too far and the drain falls so low that the MOSFET leaves saturation, and the output clips.
:::
:::

::: nameit
## Regions of operation (NMOS)

With $V_{OV} = V_{GS} - V_t$, the **overdrive**:

| Region | When | Drain current |
|---|---|---|
| cutoff | $V_{GS} < V_t$ | 0 |
| triode (linear) | $V_{DS} < V_{OV}$ | $K\left(V_{OV}V_{DS} - \tfrac12V_{DS}^2\right)$ |
| saturation | $V_{DS} \geq V_{OV}$ | $\tfrac K2V_{OV}^2$ |

In saturation the channel is "pinched off" near the drain, so more drain voltage barely adds current: the device is a current source set by the gate. (Real devices rise slightly with $V_{DS}$: channel-length modulation, λ.)

**As a switch:** drive the gate well above $V_t$ for on (deep triode, a small resistance $R_{on} \approx 1/(KV_{OV})$) and to 0 V for off. The power wasted while on is $I^2R_{on}$. Power MOSFETs reach milliohms. Switching between states takes time and charge: the gate's capacitance must be charged.

**As an amplifier:** bias in saturation, add a small signal at the gate. The drain current changes by $g_m\,v_{gs}$ with

$$g_m = KV_{OV} = \frac{2I_D}{V_{OV}}$$

and through $R_D$ the output changes by $-g_mR_Dv_{gs}$: the **common-source** amplifier, gain $-g_mR_D$ (lesson 42). It stays linear only while the MOSFET stays in saturation: $V_{DS} > V_{OV}$ throughout the swing.
:::

```sim circuit
VG g 0 square 0 10 1k Hz            @ 0,2 down 2
M1 d g 0 nmos VTO=2 KP=0.5          @ 2,2
RL vdd d 12                         @ 3,-1 down 2
VDD vdd 0 12                        @ 6,-1 down 5
scope: v(g), v(d)
time: 0..3m s
meter: v(d)
```

The same device as a switch: a power MOSFET (K = 0.5 A/V²) turning a 12 Ω, 1 A load on and off. When on, the drain sits only about 0.25 V above ground.


::: example
## A power MOSFET with $K$ = 20 A/V² is driven with 8 V of overdrive and carries 10 A. What does it dissipate?

::: solution
1. **On-resistance.**
   $$\begin{aligned} R_{on} &= \frac{1}{20 \times 8} \\ &= 6.25\ \text{m}\Omega \end{aligned}$$
2. **Dissipation.**
   $$\begin{aligned} I^2R_{on} &= 100 \times 0.00625 \\ &= 0.63\ \text{W} \end{aligned}$$

**Answer:** it dissipates 0.63 W.
:::
:::

::: example
## A common-source stage runs at 1 mA with 0.5 V of overdrive and $R_D$ = 5 kΩ from 10 V. Find its gain, and how far its drain can swing down.

::: solution
1. **Transconductance.**
   $$\begin{aligned} g_m &= \frac{2 \times 1}{0.5} \\ &= 4\ \text{mS} \end{aligned}$$
2. **Gain.**
   $$-4 \times 5 = -20$$
3. **Swing.** The drain sits at 5 V; with the source grounded it stays saturated down to $v_{OV}$ = 0.5 V, so it can swing about 4.5 V down.

**Answer:** the gain is −20, and the drain can swing about 4.5 V down.
:::
:::

::: example
## A load switch uses a MOSFET with $V_t$ = 1.5 V and K = 10 A/V² to carry 2 A. Compare its on-resistance and dissipation when 3.3 V logic drives its gate and when 5 V does.

::: solution
1. **On-resistance in deep triode.**
   $$R_{on} = \frac{1}{Kv_{OV}}$$
2. **From 3.3 V.** $v_{OV}$ = 1.8 V, so $R_{on}$ = 55.6 mΩ and it dissipates
   $$2^2 \times 0.0556 = 0.22\ \text{W}$$
3. **From 5 V.** $v_{OV}$ = 3.5 V, so $R_{on}$ = 28.6 mΩ and it dissipates
   $$2^2 \times 0.0286 = 0.11\ \text{W}$$
4. **What this means.** Doubling the overdrive halves the loss. That's why datasheets give $R_{on}$ at a stated gate voltage, and why parts meant for logic drive are specified at 4.5 V or 2.5 V rather than 10 V.

**Answer:** from 3.3 V it has 55.6 mΩ and dissipates 0.22 W; from 5 V, 28.6 mΩ and 0.11 W.
:::
:::

::: check
given: K = 1 | 2 | 4; Vov = 0.5 | 1.5 | 2
answer: K/2*Vov^2
unit: mA
tolerance: 0.5%

## An NMOS with K = {K} mA/V² is in saturation with an overdrive of {Vov} V. What is its drain current?

::: right
Right. $\frac K2V_{OV}^2$ = {answer}.
:::

::: misses
- [K*Vov^2] There's a factor of ½.
- [K/2*Vov] The current goes as the square of the overdrive.
- [any] Not yet. $I_D = \frac K2V_{OV}^2$.
:::
:::

::: check
given: K = 0.2 | 0.5 | 2; Vov = 3 | 5 | 8
answer: 1/(K*Vov)
unit: Ω
tolerance: 0.5%

## A power MOSFET with K = {K} A/V² is driven {Vov} V above threshold as a switch. What is its on-resistance?

::: right
Right. $R_{on} = 1/(KV_{OV})$ = {answer}.
:::

::: misses
- [2/(K*Vov^2)] That's $V_{OV}/I_\text{sat}$; deep in triode the resistance is $1/(KV_{OV})$.
- [any] Not yet. $R_{on} = 1/(KV_{OV})$.
:::
:::

::: check
given: K = 1 | 2 | 4; Vov = 0.5 | 1; RD = 2 | 5 | 10
answer: -K*Vov*RD
tolerance: 0.5%

## A common-source amplifier has K = {K} mA/V², overdrive {Vov} V and $R_D$ = {RD} kΩ. What is its voltage gain?

::: right
Right. $-g_mR_D = -KV_{OV}R_D$ = {answer}.
:::

::: misses
- [K*Vov*RD] The output falls as the input rises: negative.
- [-K/2*Vov^2*RD] That's the bias current times $R_D$, a DC voltage. Gain uses $g_m$.
- [any] Not yet. $A_v = -g_mR_D$.
:::
:::

::: check
given: I = 2 | 5 | 20; Ron = 10 | 50 | 200
answer: I^2*Ron/1000
unit: W
tolerance: 0.5%

## A MOSFET switch with {Ron} mΩ on-resistance carries {I} A. How much power does it waste?

::: right
Right. $I^2R_{on}$ = {answer}.
:::

::: misses
- [I^2*Ron] Convert mΩ to Ω.
- [I*Ron/1000] That's the voltage drop. Power is $I^2R$.
- [any] Not yet. $P = I^2R_{on}$.
:::
:::

::: check
given: VDD = 10 | 12; K = 2; Vov = 1; RD = 2 | 4 | 6 | 8
answer: step(VDD - K/2*Vov^2*RD - Vov)
tolerance: 0.01

## An NMOS with K = 2 mA/V² and an overdrive of 1 V has $R_D$ = {RD} kΩ to a {VDD} V supply. Is it in saturation at its bias point? Enter 1 for yes, 0 for no.

::: right
Right. $V_{DS} = V_{DD} - I_DR_D$ must be at least $V_{OV}$ = 1 V.
:::

::: misses
- [1 - step(VDD - K/2*Vov^2*RD - Vov)] Compute $V_{DS} = V_{DD} - \frac K2V_{OV}^2R_D$ and compare with $V_{OV}$.
- [any] Not yet. Saturation needs $V_{DS} \geq V_{OV}$.
:::
:::

::: check
kind: parts
given: VG = 3.3 | 5 | 10; Vt = 1 | 2; K = 5 | 20; I = 1 | 4

## A MOSFET switch ($V_t$ = {Vt} V, K = {K} A/V²) is driven to {VG} V and carries {I} A.

::: part
answer: 1/(K*(VG - Vt))*1000
unit: mΩ
tolerance: 0.5%

### What's its on-resistance?

::: misses
- [1/(K*VG)*1000] Use the overdrive, $V_{GS} - V_t$.
- [any] $R_{on} = \frac{1}{Kv_{OV}}$.
:::
:::

::: part
answer: I^2/(K*(VG - Vt))
unit: W
tolerance: 0.5%

### What does it dissipate?

::: misses
- [any] $I^2R_{on}$.
:::
:::
:::

::: check
kind: derivation
vars: I = 0.0001..0.01, v = 0.1..1, R = 1000..50000, D = 5..20

## A common-source stage runs at drain current I and overdrive v, with drain resistor R from a supply D and its source grounded.

::: step
answer: 2*I/v

### What's its transconductance?
:::

::: step
answer: -2*I*R/v

### What's its voltage gain, ignoring $r_o$?
:::

::: step
answer: D - I*R - v

### How far can the drain swing down before the transistor leaves saturation?
:::

::: right
Right. A bigger drop across R raises the gain but leaves less room to swing.
:::
:::

::: explain
## Why must a MOSFET amplifier's bias keep the device in saturation?

::: model
In saturation, the drain current depends on the gate voltage but hardly at all on the drain voltage, so the device acts like a current source controlled by the gate. Changes at the gate then become proportional changes in current, and through the drain resistor, proportional and larger changes in voltage. If the drain voltage falls below the overdrive, the device enters triode, where it acts more like a resistor whose current depends strongly on the drain voltage itself; the gain collapses and the output distorts, clipping the signal.
:::
:::

::: practice

::: check
given: K = 2 | 4; Vov = 1 | 2
answer: K*Vov
unit: mS
tolerance: 0.5%

## K = {K} mA/V², overdrive {Vov} V. Transconductance?

::: misses
- [K/2*Vov] $g_m = KV_{OV}$.
- [any] $KV_{OV}$.
:::
:::

::: check
given: VGS = 1.5 | 2 | 2.5 | 3 | 4 | 5; Vt = 1
answer: VGS - Vt
unit: V
tolerance: 0.5%

## $V_{GS}$ = {VGS} V, $V_t$ = 1 V. Minimum $V_{DS}$ for saturation?

::: misses
- [VGS] It's the overdrive, $V_{GS} - V_t$.
- [any] $V_{OV}$.
:::
:::

::: check
given: gm = 2 | 5; RD = 4 | 10
answer: -gm*RD
tolerance: 0.5%

## $g_m$ = {gm} mS, $R_D$ = {RD} kΩ. Gain?

::: misses
- [gm*RD] It inverts.
- [any] $-g_mR_D$.
:::
:::
:::
