---
title: "The pn junction: depletion region and built-in field"
heading: Where p meets n, a field builds itself
eyebrow: C5 · Lesson 1 · The pn junction
xp: 50
---

::: hook
Put p-type silicon, full of holes, against n-type, full of electrons. Electrons diffuse across into the p side and holes into the n side, and they meet and recombine. What they leave behind is a thin layer stripped of free carriers, holding the fixed charges of the dopant ions: negative on the p side, positive on the n side. Those charges create a strong electric field that pushes back against further diffusion, and the voltage across that layer is the barrier every diode, LED, solar cell and transistor is built around.

::: play
- A cross-section through the junction: p on the left, n on the right. The curves show the fixed charge, the electric field (as a fraction of its peak) and the voltage across the layer (as a fraction of its total).
- The sliders Na and Nd set the doping on each side, in units of $10^{16}$ cm⁻³. Make them unequal. Which side does the depletion region extend into more?
- Apply a reverse voltage (negative $V_a$). What happens to the width and the field? Then go slightly forward.
:::
:::

```sim plot
view: graph
x: x = -2..2 µm
y: y = -1.2..1.2
slider: Na = 0.1..100 = 1 log
slider: Nd = 0.1..100 = 1 log
slider: Va = -5..0.5 step 0.05 = 0 V
plot: (-Na*step(x + sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Nd/(Na + Nd))*(1 - step(x)) + Nd*step(x)*step(sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Na/(Na + Nd) - x))/((Na + Nd + abs(Na - Nd))/2) | samples: 1200 | label: fixed charge (÷ largest)
plot: step(x + sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Nd/(Na + Nd))*(1 - step(x))*(x + sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Nd/(Na + Nd))/(sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Nd/(Na + Nd)) + step(x)*step(sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Na/(Na + Nd) - x)*(sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Na/(Na + Nd) - x)/(sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Na/(Na + Nd)) | samples: 1200 | color: ch2 | label: field strength (÷ peak), pointing n to p
plot: step(x + sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Nd/(Na + Nd))*(1 - step(x))*(x + sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Nd/(Na + Nd))^2/(sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Nd/(Na + Nd)*sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))) + step(x)*(1 - step(sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Na/(Na + Nd) - x)*(sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Na/(Na + Nd) - x)^2/(sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Na/(Na + Nd)*sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd)))) | samples: 1200 | dashed | color: ch3 | label: voltage (÷ total)
readout: acceptors = Na*1e16 cm⁻³ | format: sci
readout: donors = Nd*1e16 cm⁻³ | format: sci
readout: built-in voltage = 0.02585*ln(Na*Nd*1e12) V
readout: width in µm = sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))
readout: peak field in kV/cm = 154.65*Nd*sqrt(0.12933*(0.02585*ln(Na*Nd*1e12) - Va)*(Na + Nd)/(Na*Nd))*Na/(Na + Nd)
```

::: predict
## A junction has $N_a = 10^{18}$ cm⁻³ on the p side and $N_d = 10^{15}$ cm⁻³ on the n side. Where does the depletion region lie?

- [ ] Evenly on both sides
- [ ] Almost all on the p side
- [x] Almost all on the n side
- [ ] Nowhere: the doping is too different

::: reveal
Almost all on the n side. The charge uncovered on each side must balance, $N_ax_p = N_dx_n$, so the lightly doped side has to give up a thousand times more width to expose the same charge. That's why a "one-sided" $p^+n$ junction is analyzed as if only the light side mattered, and why the lightly doped side sets a diode's breakdown voltage and capacitance.
:::
:::

::: nameit
## The abrupt pn junction

**Built-in voltage.** Diffusion stops when the field's drift exactly balances it (B9.18). The voltage that takes:

$$V_{bi} = \frac{kT}{q}\ln\frac{N_aN_d}{n_i^2}$$

about 0.7 V for silicon at moderate doping ($n_i = 10^{10}$ cm⁻³, $kT/q = 25.9$ mV). It can't be measured with a voltmeter: the contacts' own junction voltages cancel it.

**Charge balance.** The depletion region extends $x_p$ into the p side and $x_n$ into the n side, with

$$N_ax_p = N_dx_n$$

**Width.** Solving Poisson's equation (B3) across the two slabs of charge, with an applied voltage $V_a$ (positive is forward):

$$W = x_n + x_p = \sqrt{\frac{2\varepsilon(V_{bi} - V_a)}{q}\cdot\frac{N_a + N_d}{N_aN_d}}$$

with $\varepsilon = 11.7\varepsilon_0$ for silicon. Typical widths are a fraction of a micrometer.

**The field** is triangular: zero at the edges, peaking at the junction with

$$E_\text{max} = \frac{qN_dx_n}{\varepsilon} = \frac{qN_ax_p}{\varepsilon}$$

typically tens of kilovolts per centimeter. The voltage across the layer is its integral: two parabolic pieces.

**Bias changes everything.**

- **Reverse** ($V_a < 0$): the barrier grows, the region widens, and almost no current flows. The region acts as a capacitor whose plate spacing grows with reverse voltage: a **varactor**.
- **Forward** ($V_a > 0$): the barrier shrinks, carriers diffuse across in huge numbers, and current flows (lesson 2).
:::


::: example
## A silicon junction has $N_a = 10^{17}$ and $N_d = 10^{16}$ cm⁻³. Find its built-in voltage, depletion width at zero bias and peak field.

::: solution
1. **Built-in voltage.**
   $$\begin{aligned} V_{bi} &= 0.02585\ln\frac{10^{33}}{10^{20}} \\ &= 0.774\ \text{V} \end{aligned}$$
2. **Depletion width at zero bias.**
   $$\begin{aligned} W &= \sqrt{\frac{2\varepsilon V_{bi}}{q}\cdot\frac{N_a + N_d}{N_aN_d}} \\ &= 0.332\ \mu\text{m} \end{aligned}$$
3. **The part on the n side.** Most of the width lies on the lightly doped n side:
   $$\begin{aligned} x_n &= W\frac{N_a}{N_a + N_d} \\ &= 0.302\ \mu\text{m} \end{aligned}$$
4. **Peak field.**
   $$\begin{aligned} E_\text{max} &= \frac{qN_dx_n}{\varepsilon} \\ &= 46.6\ \text{kV/cm} \end{aligned}$$

**Answer:** the built-in voltage is 0.774 V, the depletion region is 0.332 µm wide (0.302 µm of it on the n side), and the peak field is 46.6 kV/cm.
:::
:::

::: example
## The same junction is reverse biased by 5 V. How much wider does the depletion region get?

::: solution
1. **How the width scales.** $W \propto \sqrt{V_{bi} + V_R}$, so it grows by
   $$\sqrt{\frac{5.774}{0.774}} = 2.73$$
2. **New width.**
   $$0.332\ \mu\text{m} \times 2.73 = 0.91\ \mu\text{m}$$
3. **Capacitance.** Its capacitance per area, $\varepsilon/W$, falls by the same factor.

**Answer:** the depletion region gets 2.73 times wider, to 0.91 µm, and its capacitance per area falls by the same factor.
:::
:::

::: example
## A p⁺n junction has $N_a = 10^{19}$ and $N_d = 10^{15}$ cm⁻³. Find its built-in voltage, depletion width and peak field, and say where the depletion region lies.

::: solution
1. **Built-in voltage.**
   $$\begin{aligned} V_{bi} &= 0.02585\ln\frac{10^{34}}{10^{20}} \\ &= 0.833\ \text{V} \end{aligned}$$
2. **Depletion width.** With $N_a \gg N_d$ the factor $\frac{N_a + N_d}{N_aN_d}$ is just $\frac{1}{N_d}$, so
   $$\begin{aligned} W &= \sqrt{\frac{2\varepsilon V_{bi}}{qN_d}} \\ &= 1.04\ \mu\text{m} \end{aligned}$$
3. **Where it lies.** Only a sliver is on the p⁺ side:
   $$\begin{aligned} x_p &= W\frac{N_d}{N_a + N_d} \\ &= 0.1\ \text{nm} \end{aligned}$$
   so the whole region sits in the lightly doped n side.
4. **Peak field.** The field is a triangle with area $V_{bi}$, so
   $$\begin{aligned} E_\text{max} &= \frac{2V_{bi}}{W} \\ &= 1.6 \times 10^4\ \text{V/cm} \end{aligned}$$
5. **What the capacitance measures.** Because the light side sets W, the capacitance of a one-sided junction measures that side's doping alone.

**Answer:** the built-in voltage is 0.833 V, the depletion region is 1.04 µm wide and lies almost entirely in the lightly doped n side, and the peak field is $1.6 \times 10^4$ V/cm.
:::
:::

::: check
given: Na = 1e15 | 1e16 | 1e17; Nd = 1e15 | 1e16 | 1e18
answer: 0.02585*ln(Na*Nd/1e20)
unit: V
tolerance: 0.5%

## A silicon junction has $N_a$ = {Na} cm⁻³ and $N_d$ = {Nd} cm⁻³. What is its built-in voltage? ($n_i = 10^{10}$ cm⁻³, $kT/q$ = 25.85 mV.)

::: right
Right. $\frac{kT}{q}\ln\frac{N_aN_d}{n_i^2}$ = {answer}.
:::

::: misses
- [0.02585*ln(Na*Nd/1e10)] Divide by $n_i^2 = 10^{20}$.
- [0.02585*log10(Na*Nd/1e20)] It's the natural log.
- [any] Not yet. $V_{bi} = V_T\ln(N_aN_d/n_i^2)$.
:::
:::

::: check
given: Na = 3e16 | 1e17 | 1e18; Nd = 1e15 | 1e16; W = 0.5 | 1
answer: W*Na/(Na + Nd)
unit: µm
tolerance: 0.5%

## A junction with $N_a$ = {Na} cm⁻³ and $N_d$ = {Nd} cm⁻³ has a depletion width of {W} µm. How far does it extend into the n side?

::: right
Right. $x_n = W\frac{N_a}{N_a + N_d}$ = {answer}: the lighter side takes more.
:::

::: misses
- [W*Nd/(Na + Nd)] That's $x_p$. The n side's share is set by the p side's doping.
- [W/2] Only for equal doping.
- [any] Not yet. $N_ax_p = N_dx_n$.
:::
:::

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

## The total voltage across a junction, $V_{bi} - V_a$, is made {k} times larger by reverse bias. By what factor does the depletion width grow?

::: right
Right. $W \propto \sqrt{V_{bi} - V_a}$: {answer}.
:::

::: misses
- [k] The width grows as the square root.
- [any] Not yet. $W \propto \sqrt{V_{bi} - V_a}$.
:::
:::

::: check
given: Nd = 1e15 | 1e16 | 1e17; xn = 0.1 | 0.3
answer: 1.602e-19*Nd*1e6*xn*1e-6/(11.7*8.854e-12)/1e5
unit: kV/cm
tolerance: 1%

## The n side has $N_d$ = {Nd} cm⁻³ and the depletion region reaches {xn} µm into it. What is the peak field?

::: right
Right. $E_\text{max} = qN_dx_n/\varepsilon$ = {answer}.
:::

::: misses
- [1.602e-19*Nd*1e6*xn*1e-6/8.854e-12/1e5] Use silicon's permittivity, $11.7\varepsilon_0$.
- [any] Not yet. $E = qN_dx_n/\varepsilon$, in SI units.
:::
:::

::: check
kind: choice

## Why doesn't a voltmeter across an unbiased diode read the 0.7 V built-in voltage?

- [ ] The voltage is too small to measure
- [x] The metal contacts form their own junctions whose voltages cancel it exactly, as they must: otherwise the diode would supply power with no energy source
- [ ] The depletion region is too thin
- [ ] It only appears under forward bias

::: right
Right. In equilibrium no net voltage can appear around the loop, or energy would come from nowhere.
:::

::: misses
- [1] 0.7 V is easily measured; this is about where it cancels.
- [3] Thinness doesn't hide a voltage.
- [4] It exists at zero bias; forward bias reduces it.
:::
:::

::: check
kind: parts
given: Na = 1e17 | 1e18 | 1e19; Nd = 1e14 | 1e15 | 1e16

## A one-sided junction has $N_a$ = {Na} and $N_d$ = {Nd} cm⁻³.

::: part
answer: 0.02585*ln(Na*Nd/1e20)
unit: V
tolerance: 1%

### What's its built-in voltage?

::: misses
- [any] $V_T\ln\frac{N_aN_d}{n_i^2}$ with $n_i = 10^{10}$ cm⁻³.
:::
:::

::: part
answer: sqrt(2*11.7*8.854e-14*0.02585*ln(Na*Nd/1e20)/1.602e-19*(Na + Nd)/(Na*Nd))*1e4
unit: µm
tolerance: 1%

### How wide is its depletion region at zero bias?

::: misses
- [sqrt(2*8.854e-14*0.02585*ln(Na*Nd/1e20)/1.602e-19*(Na + Nd)/(Na*Nd))*1e4] Use silicon's permittivity, $11.7\varepsilon_0$.
- [any] $W = \sqrt{\frac{2\varepsilon V_{bi}}{q}\cdot\frac{N_a + N_d}{N_aN_d}}$.
:::
:::
:::

::: check
kind: derivation
vars: a = 1e14..1e20, d = 1e14..1e20, s = 1e-13..1e-11, q = 1e-19..2e-19, V = 0.1..10

## An abrupt junction has acceptor density a, donor density d, permittivity s and electron charge q, with a voltage V across its depletion region.

::: step
answer: sqrt(2*s*V/q*(a + d)/(a*d))

### How wide is the depletion region?
:::

::: step
answer: sqrt(2*s*V/q*(a + d)/(a*d))*a/(a + d)

### How much of it lies on the n side?
:::

::: step
answer: 2*V/sqrt(2*s*V/q*(a + d)/(a*d))

### What's the peak field, from the triangle's area?
:::

::: right
Right. The more lightly doped side holds most of the width.
:::
:::

::: explain
## Why does a depletion region form where p-type and n-type silicon meet, and why does it stop growing?

::: model
Electrons are plentiful on the n side and holes on the p side, so each diffuses across the junction toward where it's scarce, and they recombine. Each electron leaving the n side uncovers a fixed positive donor ion, and each hole leaving the p side uncovers a negative acceptor ion. Those uncovered charges create an electric field pointing from the n side to the p side, which pushes electrons back toward n and holes back toward p. The region grows until that field's drift exactly balances the diffusion, leaving a steady barrier voltage and a layer empty of free carriers.
:::
:::

::: practice

::: check
given: Na = 1e16 | 1e18; Nd = 1e16 | 1e17
answer: 0.02585*ln(Na*Nd/1e20)
unit: V
tolerance: 0.5%

## $V_{bi}$ for {Na} and {Nd} cm⁻³?

::: misses
- [any] $V_T\ln(N_aN_d/n_i^2)$.
:::
:::

::: check
given: Na = 1e17 | 1e18; Nd = 1e15 | 1e16; xn = 1 | 2
answer: xn*Nd/Na
unit: µm
tolerance: 0.5%

## $x_n$ = {xn} µm, $N_d$ = {Nd}, $N_a$ = {Na} cm⁻³. What is $x_p$?

::: misses
- [xn*Na/Nd] The heavily doped side is narrower.
- [any] $x_p = x_nN_d/N_a$.
:::
:::

::: check
kind: choice

## Forward bias makes the depletion region...

- [x] narrower
- [ ] wider
- [ ] disappear completely
- [ ] move to one side

::: right
Right. It reduces $V_{bi} - V_a$, and with it W.
:::

::: misses
- [2] That's reverse bias.
- [3] It shrinks but remains.
- [4] Its position is set by the doping.
:::
:::
:::
