---
title: Drift and diffusion
heading: Carriers are pushed by fields and spread out by randomness
eyebrow: B9 · Lesson 18 · Drift and diffusion
xp: 40
---

::: hook
In a wire, current comes from one thing: the field pushing electrons along. In a semiconductor there's a second way. Carriers wander randomly, and wherever they're crowded more of them wander out than in, so they spread, carrying current with no field at all. This diffusion current is what makes a diode work, and in a transistor it's the main event.

::: play
- A pulse of carriers is created at $x = 0$ and left to move. The curve is their density at time $t$. Press Play.
- With no field ($E = 0$), what happens to the pulse over time? Turn on a field.
- Raise the temperature (larger D). How does the spreading change? Does the drift change?
:::
:::

```sim plot
view: graph
x: x = -20..60 µm
y: n = 0..1.1
time: tt
slider: D = 5..50 step 5 = 35 cm²/s
slider: E = 0..50 step 5 = 20 V/cm
plot: 1/sqrt(1 + 4*D*(tt*1e-8)*1e8/25)*exp(-(x - 1400*E*(tt*1e-8)*1e4)^2/(25 + 4*D*(tt*1e-8)*1e8)) | samples: 800 | label: carrier density
readout: time in ns = tt*10
readout: drift distance in µm = 1400*E*tt*1e-8*1e4
readout: spread (√(2Dt)) in µm = sqrt(2*D*tt*1e-8)*1e4
```

::: predict
## A cloud of carriers diffuses for 4 µs and spreads to 10 µm wide. How wide is it after 16 µs?

- [ ] 40 µm
- [x] 20 µm
- [ ] 10 µm
- [ ] 160 µm

::: reveal
20 µm. Diffusion spreads as the square root of time, $\sqrt{2Dt}$, because it's a random walk: each step is as likely to go back as forward, so the net distance grows only as $\sqrt{\text{steps}}$ (the same $\sqrt n$ as averaging noise in A11). Four times longer, twice as wide. Drift, by contrast, moves the cloud steadily, in proportion to time.
:::
:::

::: nameit
## Two kinds of current

**Drift.** A field pushes carriers at speed $v = \mu E$ (holes along the field, electrons against it), giving a current density

$$J_\text{drift} = e(n\mu_n + p\mu_p)E$$

This is Ohm's law, as in a metal.

**Diffusion.** Carriers also move randomly with thermal energy. Where their density changes with position, more wander from the crowded side than from the sparse side, so there's a net flow down the gradient:

$$J_\text{diff} = eD_n\frac{dn}{dx} - eD_p\frac{dp}{dx}$$

with **diffusion coefficients** $D_n$, $D_p$ in cm²/s. (The sign differs because electrons and holes carry opposite charge.) A cloud spreads to a width of about $\sqrt{2Dt}$.

**The Einstein relation.** Drift and diffusion come from the same random collisions, so they're tied together:

$$D = \mu\frac{kT}{e}$$

At room temperature $kT/e \approx 25.9$ mV, so silicon's electrons ($\mu_n \approx 1400$ cm²/V·s) have $D_n \approx 36$ cm²/s.

**Balance at a junction.** Where a p region meets an n region, carriers diffuse across, leaving charged ions behind that build up a field. That field drives a drift current back the other way. In equilibrium the two cancel exactly, with no net current, and the voltage left across the junction, the **built-in potential** (about 0.7 V in silicon), is what a diode must overcome before it conducts (course C5).

**In a transistor**, carriers injected into the base of a bipolar transistor cross it mostly by diffusion, which is why its speed is set by how thin the base is.
:::

::: example
## n-type silicon with $10^{16}$ electrons per cm³ ($\mu_n$ = 1400 cm²/(V·s)) sits in a 10 V/cm field. What drift current density flows?

::: solution
1. **Drift current density.**
   $$\begin{aligned} J &= en\mu_nE \\ &= 1.602 \times 10^{-19} \times 10^{16} \\ &\quad \times 1400 \times 10 \\ &= 22\ \text{A/cm}^2 \end{aligned}$$

**Answer:** 22 A/cm².
:::
:::

::: example
## In the same silicon, the electron density instead falls from $10^{16}$ cm⁻³ to zero over 1 µm, with no field. What diffusion current density flows?

::: solution
1. **Diffusion coefficient.**
   $$\begin{aligned} D_n &= \mu_n\frac{kT}{e} \\ &= 1400 \times 0.02585 \\ &= 36\ \text{cm}^2\text{/s} \end{aligned}$$
2. **Gradient.**
   $$\frac{10^{16}}{10^{-4}} = 10^{20}\ \text{cm}^{-4}$$
3. **Diffusion current density.**
   $$\begin{aligned} J &= eD_n\frac{dn}{dx} \\ &= 1.602 \times 10^{-19} \times 36 \times 10^{20} \\ &= 580\ \text{A/cm}^2 \end{aligned}$$
4. **Compare with drift.** A steep gradient drives far more current than a modest field.

**Answer:** about 580 A/cm².
:::
:::

::: example
## Electrons in silicon have a mobility of 1350 cm²/(V·s). What is their diffusion coefficient at 300 K, and how far does a pulse of them spread in 1 µs?

::: solution
1. **Einstein relation.**
   $$\begin{aligned} D &= \mu\frac{kT}{q} \\ &= 1350 \times 0.02585 \\ &= 34.9\ \text{cm}^2\text{/s} \end{aligned}$$
2. **Spread in 1 µs.** A pulse spreads to a standard deviation of
   $$\begin{aligned} \sqrt{2Dt} &= \sqrt{2 \times 34.9 \times 10^{-6}}\ \text{cm} \\ &= 83.5\ \mu\text{m} \end{aligned}$$
3. **One cause for both.** The same random collisions set both drift and diffusion, which is why one number determines the other.
4. **Measuring both.** Haynes and Shockley measured both at once by watching a pulse drift and spread along a bar.

**Answer:** $D$ = 34.9 cm²/s, and in 1 µs the pulse spreads to a standard deviation of 83.5 µm.
:::
:::

::: check
given: mu = 450 | 1400; T = 300 | 400
answer: mu*8.617e-5*T
unit: cm^2/s
tolerance: 1%

## A carrier has mobility {mu} cm²/V·s at {T} K. What is its diffusion coefficient?

::: right
Right. Einstein: $D = \mu kT/e$ = {answer}.
:::

::: misses
- [mu*1.381e-23*T] Use $kT/e$ in volts: $8.617 \times 10^{-5}T$.
- [mu/(8.617e-5*T)] Multiply by $kT/e$.
- [any] Not yet. $D = \mu kT/e$.
:::
:::

::: check
given: D = 10 | 35; t = 1 | 4 | 10
answer: sqrt(2*D*t*1e-6)*1e4
unit: µm
tolerance: 1%

## Carriers with D = {D} cm²/s diffuse for {t} µs. Roughly how far have they spread ($\sqrt{2Dt}$)?

::: right
Right. $\sqrt{2Dt}$ = {answer}.
:::

::: misses
- [2*D*t*1e-6*1e4] Take the square root.
- [sqrt(2*D*t)*1e4] Convert microseconds to seconds.
- [any] Not yet. $\sqrt{2Dt}$, then convert cm to µm.
:::
:::

::: check
given: mu = 450 | 1400; E = 10 | 100; t = 1 | 10
answer: mu*E*t*1e-6*1e4
unit: µm
tolerance: 0.5%

## A carrier with mobility {mu} cm²/V·s drifts in {E} V/cm for {t} µs. How far does it move?

::: right
Right. $\mu Et$ = {answer}.
:::

::: misses
- [mu*E*t] Convert units: µs to s, then cm to µm.
- [any] Not yet. Distance = $\mu Et$.
:::
:::

::: check
given: k = 4 | 9 | 16
answer: sqrt(k)
tolerance: 0.5%

## A diffusing cloud is left {k} times longer. By what factor does its width grow?

::: right
Right. $\sqrt t$ scaling: {answer} times.
:::

::: misses
- [k] Diffusion spreads as $\sqrt t$, not $t$.
- [any] Not yet. Width $\propto \sqrt t$.
:::
:::

::: check
kind: choice

## Carriers are crowded on the left of a semiconductor bar, with no field. What happens?

- [ ] Nothing: no field, no current
- [x] They diffuse to the right, making a current
- [ ] They drift to the left
- [ ] They recombine instantly

::: right
Right. A density gradient alone drives a diffusion current.
:::

::: misses
- [1] Diffusion needs no field.
- [3] Without a field there's no drift.
- [4] Recombination takes time; they spread first.
:::
:::

::: check
kind: parts
given: mu = 450 | 1350; t = 0.1 | 1 | 10

## Carriers in silicon have a mobility of {mu} cm²/(V·s), at 300 K.

::: part
answer: mu*0.02585
unit: cm²/s
tolerance: 0.5%

### What is their diffusion coefficient?

::: misses
- [mu/0.02585] $D = \mu\frac{kT}{q}$: multiply by 25.85 mV.
- [any] The Einstein relation.
:::
:::

::: part
answer: sqrt(2*mu*0.02585*t*1e-6)*1e4
unit: µm
tolerance: 0.5%

### How far does a pulse spread, as a standard deviation, in {t} µs?

::: misses
- [sqrt(mu*0.02585*t*1e-6)*1e4] Spreading in one dimension gives $\sqrt{2Dt}$.
- [any] $\sqrt{2Dt}$.
:::
:::
:::

::: check
kind: derivation
vars: m = 0.01..0.15, T = 200..500, t = 0.0000000001..0.00001

## Carriers of mobility μ (write m, in m²/V·s) at temperature T.

::: step
answer: m*1.381e-23*T/1.602e-19

### What is their diffusion coefficient?
:::

::: step
answer: sqrt(2*m*1.381e-23*T/1.602e-19*t)

### How far does a pulse spread in time t?
:::

::: right
Right. Spreading grows only as $\sqrt t$: four times as long, twice as wide.
:::
:::

::: explain
## Why does diffusion move carriers from crowded regions to sparse ones, even though each carrier moves randomly?

::: model
Each carrier is equally likely to step left or right. Where carriers are crowded, many step out in every direction; where they're sparse, few do. Across any boundary, more carriers cross from the crowded side than from the sparse side simply because there are more of them to make the attempt. The result is a net flow from high to low density, with no force pushing any particular carrier.
:::
:::

::: practice

::: check
given: T = 77 | 250 | 300 | 350 | 400 | 450
answer: 8.617e-5*T*1000
unit: mV
tolerance: 1%

## What is the thermal voltage $kT/e$ at {T} K, in mV?

::: misses
- [any] $8.617 \times 10^{-5} \times T$ V.
:::
:::

::: check
given: D = 12 | 36; mu = 450 | 1400
answer: D/mu
unit: V
tolerance: 1%

## A carrier has D = {D} cm²/s and μ = {mu} cm²/V·s. What is D/μ?

::: misses
- [any] Divide.
:::
:::

::: check
kind: choice

## In equilibrium at a p-n junction, what happens to the diffusion current?

- [ ] It flows unopposed
- [x] It's exactly balanced by a drift current in the opposite direction
- [ ] It stops completely
- [ ] It reverses

::: right
Right. The field set up by uncovered ions drives a drift current that cancels the diffusion.
:::

::: misses
- [1] Unopposed current would charge things up without limit.
- [3] Carriers still diffuse; the drift cancels it.
- [4] The net current is zero, not reversed.
:::
:::
:::
