---
title: The p-n Junction in Depth
module: Semiconductors
moduleNumber: 7
lessonNumber: 4
order: 704
summary: >
  Joining p-type and n-type silicon aligns their Fermi levels and leaves a
  depletion region of fixed charge with a built-in potential. This lesson derives
  the space-charge field and potential from Poisson's equation in the depletion
  approximation, the built-in voltage from Fermi-level alignment, the Shockley
  diode equation from minority-carrier diffusion, junction and diffusion
  capacitance, and the avalanche and Zener breakdown mechanisms.
topics: [Semiconductors]
sources:
  - book: Ashcroft & Mermin
    ref: "Ch. 29 — Inhomogeneous Semiconductors"
  - book: Kittel
    ref: "Ch. 8 — Semiconductor Crystals"
  - book: Hook & Hall
    ref: "Ch. 5 — Semiconductors"
---

The p-n junction is a single crystal doped p-type on one side and n-type on the
other. The [survey lesson](/condensed-matter/semiconductors/semiconductor-bands-and-junctions)
sketched its equilibrium and its rectifying diode curve; this lesson derives them.
The [transport equations](/condensed-matter/semiconductors/carrier-transport-and-recombination)
supply the tools — Poisson's equation for the field, minority-carrier diffusion
for the current — and the result is the Shockley diode equation, the foundation of
every semiconductor device.

## Equilibrium and the built-in potential

When the two regions are joined, electrons pour from the electron-rich n side into
the p side and holes the other way. Each departing electron leaves behind a fixed,
ionized donor $N_d^+$; each departing hole leaves a fixed, ionized acceptor
$N_a^-$. A **space-charge** double layer builds up — negative on the p side,
positive on the n side — and its field opposes further diffusion. Equilibrium is
reached when the **Fermi level is flat** across the whole crystal, the
thermodynamic condition for no net particle flow.

Flattening the Fermi level forces the bands to bend. Far into the n side the
conduction band lies close below $E_F$; far into the p side it lies well above.
The total bend is the **built-in potential** $V_{bi}$. Its value follows from the
[carrier statistics](/condensed-matter/semiconductors/intrinsic-and-extrinsic-semiconductors):
in the neutral n region $n = N_d = n_i\,e^{(E_F - E_i)/k_B T}$, and in the neutral
p region $p = N_a = n_i\,e^{(E_i - E_F)/k_B T}$. The difference in the intrinsic
level between the two sides is $e V_{bi}$, giving

$$
V_{bi} = \frac{k_B T}{e}\ln\frac{N_a N_d}{n_i^2}.
$$

> **Worked example.** A silicon junction with $N_a = N_d = 10^{16}\ \text{cm}^{-3}$
> and $n_i = 10^{10}\ \text{cm}^{-3}$ at $300\ \text{K}$ has
>
> $$
> V_{bi} = (0.0259\ \text{V})\ln\frac{10^{16}\cdot 10^{16}}{(10^{10})^2} = (0.0259\ \text{V})\ln(10^{12}) = 0.72\ \text{V}.
> $$
>
> Doping each side more heavily raises $V_{bi}$ only logarithmically; the built-in
> potential of a silicon junction is always a few tenths of a volt, always below
> the gap $E_g/e = 1.12\ \text{V}$.

## The depletion approximation

To find the field and potential, model the space-charge region with the
**depletion approximation**: the transition region $-x_p < x < x_n$ is swept
entirely clear of mobile carriers, leaving only the fixed dopant charge, while the
neutral regions beyond are perfectly screened. The charge density is then a step,

$$
\rho(x) = \begin{cases} -e N_a, & -x_p < x < 0, \\[2pt] +e N_d, & 0 < x < x_n, \end{cases}
$$

and zero elsewhere. Overall neutrality of the depletion region requires equal
total charge on the two sides,

$$
N_a\,x_p = N_d\,x_n,
$$

so the depletion layer extends further into the more lightly doped side. Poisson's
equation $\d E/\d x = \rho/\varepsilon$ (with $\varepsilon$ the semiconductor
permittivity) integrates the step charge into a **triangular field** that peaks at
the metallurgical junction $x = 0$ and falls linearly to zero at each depletion
edge:

$$
E_{\max} = \frac{e N_d x_n}{\varepsilon} = \frac{e N_a x_p}{\varepsilon}.
$$

Integrating once more, $\d\varphi/\d x = -E$, gives a potential that varies
quadratically through the depletion region, its total drop equal to the area of
the field triangle:

$$
V_{bi} = \tfrac12 E_{\max}(x_p + x_n) = \frac{e}{2\varepsilon}\!\left(N_a x_p^2 + N_d x_n^2\right).
$$

Solving with the neutrality condition for the total **depletion width**
$W = x_p + x_n$,

$$
W = \sqrt{\frac{2\varepsilon\,V_{bi}}{e}\left(\frac{1}{N_a} + \frac{1}{N_d}\right)}.
$$

For the symmetric silicon junction above, $W \approx 0.3\ \mu\text{m}$ — far
narrower than the tens of microns of minority-carrier diffusion length, confirming
that recombination happens in the neutral regions, not the depletion layer.

$$
% caption: The depletion region in three stacked profiles. The fixed charge is a
% step (negative acceptors on the p side, positive donors on the n side); its
% integral is a triangular field peaking at the junction; the field's integral is
% the smooth potential step of height V_bi.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  % --- charge density panel (top) ---
  \begin{scope}[yshift=5.4cm]
    \draw[->, black] (-2.8,0) -- (3.0,0) node[below, font=\scriptsize] {$x$};
    \draw[->, black] (0,-1.0) -- (0,1.1) node[left, font=\scriptsize] {charge};
    \draw[acc, very thick] (-2.4,0) -- (-1.6,0) -- (-1.6,-0.8) -- (0,-0.8) -- (0,0.8) -- (1.4,0.8) -- (1.4,0) -- (2.6,0);
    \node[font=\scriptsize, anchor=north] at (-1.9,-0.35) {p: neg};
    \node[font=\scriptsize, anchor=south] at (0.7,0.35) {n: pos};
  \end{scope}
  % --- field panel (middle) ---
  \begin{scope}[yshift=2.7cm]
    \draw[->, black] (-2.8,0) -- (3.0,0) node[below, font=\scriptsize] {$x$};
    \draw[->, black] (0,-1.3) -- (0,0.4) node[left, font=\scriptsize] {$E$};
    \draw[acc, very thick] (-2.4,0) -- (-1.6,0) -- (0,-1.1) -- (1.4,0) -- (2.6,0);
  \end{scope}
  % --- potential panel (bottom) ---
  \begin{scope}
    \draw[->, black] (-2.8,0) -- (3.0,0) node[below, font=\scriptsize] {$x$};
    \draw[->, black] (0,-0.2) -- (0,1.5) node[left, font=\scriptsize] {potential};
    \draw[acc, very thick] (-2.4,0) -- (-1.6,0)
      .. controls (-0.8,0.05) and (-0.4,1.05) .. (1.4,1.1) -- (2.6,1.1);
    \draw[black, dashed] (-1.6,1.1) -- (1.4,1.1);
    \node[font=\scriptsize, anchor=east] at (-1.65,0.9) {$V_{bi}$};
  \end{scope}
\end{tikzpicture}
$$

## Band bending under bias

An external voltage $V$ drops almost entirely across the high-resistance depletion
region, adding to or subtracting from the built-in step. Every equilibrium formula
carries over with $V_{bi} \to V_{bi} - V$ (taking $V > 0$ for forward bias, p side
positive):

$$
W(V) = \sqrt{\frac{2\varepsilon(V_{bi} - V)}{e}\left(\frac{1}{N_a} + \frac{1}{N_d}\right)}.
$$

**Forward bias** ($V > 0$) lowers the barrier to $V_{bi} - V$, narrows the
depletion layer, and lets carriers diffuse across in large numbers. **Reverse
bias** ($V < 0$) raises the barrier, widens the depletion layer, and chokes off
diffusion. The junction conducts one way — the rectifying action.

$$
% caption: Band bending in three bias conditions. At equilibrium the flat Fermi
% level forces a barrier eV_bi. Forward bias raises the p-side bands, shrinking the
% barrier and flooding the junction; reverse bias lowers them, widening the barrier
% and blocking diffusion.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  % --- equilibrium ---
  \begin{scope}
    \draw[acc, very thick] (0,2.0) -- (0.9,2.0)
      .. controls (1.4,2.0) and (1.5,0.9) .. (2.0,0.9) -- (2.9,0.9);
    \draw[black, dashed] (0,1.2) -- (2.9,1.2);
    \node[anchor=south, font=\scriptsize] at (1.45,2.3) {equilibrium};
    \node[black, anchor=west, font=\scriptsize] at (2.4,1.2) {$E_F$};
  \end{scope}
  % --- forward ---
  \begin{scope}[xshift=3.9cm]
    \draw[acc, very thick] (0,1.6) -- (0.9,1.6)
      .. controls (1.4,1.6) and (1.5,0.9) .. (2.0,0.9) -- (2.9,0.9);
    \node[anchor=south, font=\scriptsize] at (1.45,2.3) {forward};
    \draw[acc, ->, thick] (0.4,1.75) -- (1.1,1.75);
  \end{scope}
  % --- reverse ---
  \begin{scope}[xshift=7.8cm]
    \draw[acc, very thick] (0,2.6) -- (0.9,2.6)
      .. controls (1.4,2.6) and (1.5,0.9) .. (2.0,0.9) -- (2.9,0.9);
    \node[anchor=south, font=\scriptsize] at (1.45,2.9) {reverse};
  \end{scope}
\end{tikzpicture}
$$

## The Shockley diode equation

The current follows from minority-carrier injection. Lowering the barrier by $eV$
raises the minority concentration at each depletion edge by the Boltzmann factor
$e^{eV/k_B T}$ — the **law of the junction**. On the n side the hole concentration
at the edge becomes $p_n(x_n) = p_{n0}\,e^{eV/k_B T}$, an excess

$$
\delta p_n = p_{n0}\!\left(e^{eV/k_B T} - 1\right), \qquad p_{n0} = \frac{n_i^2}{N_d}.
$$

These excess holes diffuse into the neutral n region and recombine over a
diffusion length $L_p$, exactly the injection profile derived from the
[continuity equation](/condensed-matter/semiconductors/carrier-transport-and-recombination).
The diffusion current at the edge is $J_p = e D_p\,\delta p_n / L_p$. Adding the
symmetric electron injection into the p side gives the total current density,

$$
J = e\!\left(\frac{D_p\,p_{n0}}{L_p} + \frac{D_n\,n_{p0}}{L_n}\right)\!\left(e^{eV/k_B T} - 1\right) = J_0\!\left(e^{eV/k_B T} - 1\right).
$$

> **Theorem (Shockley diode equation).** An ideal p-n junction carries current
> $I = I_0\,(e^{eV/k_B T} - 1)$, where the **saturation current**
> $I_0 = eA(D_p p_{n0}/L_p + D_n n_{p0}/L_n)$ is fixed by minority-carrier
> diffusion. Forward bias gives an exponentially rising current; reverse bias
> ($V \ll -k_B T/e$) saturates at the small reverse current $-I_0$, set by the
> minority concentrations $n_i^2/N$ and therefore by the gap through $n_i^2 \propto
> e^{-E_g/k_B T}$.

The saturation current is the diode's Achilles heel and its thermometer: because
$I_0 \propto n_i^2 \propto e^{-E_g/k_B T}$, it roughly doubles every $10\ \text{K}$,
which is why germanium diodes ($E_g = 0.67\ \text{eV}$) leak far more than silicon
($1.12\ \text{eV}$) and why high-temperature electronics turns to wide-gap
materials.

$$
% caption: The ideal-diode characteristic I = I_0(exp(eV/k_BT) - 1). Forward bias
% rises exponentially past the turn-on near V_bi; reverse bias saturates at the
% tiny current I_0, magnified in the inset scale, giving one-way conduction.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[->, black] (-3.4,0) -- (3.0,0) node[below] {$V$};
  \draw[->, black] (0,-1.0) -- (0,3.2) node[left] {$I$};
  \draw[acc, very thick, domain=0:1.55, samples=60, variable=\x]
    plot ({\x*1.5},{0.24*(exp(\x*2.0)-1)});
  \draw[acc, very thick] (0,0) -- (-3.0,-0.24);
  \node[acc, anchor=south, font=\scriptsize] at (1.9,2.5) {forward};
  \node[acc, anchor=north, font=\scriptsize] at (-1.8,-0.28) {reverse};
  \draw[black, dashed] (-3.0,-0.24) -- (0,-0.24);
  \node[anchor=west, font=\scriptsize] at (0.1,-0.5) {saturation $I_0$};
\end{tikzpicture}
$$

## Junction and diffusion capacitance

A junction stores charge two ways, and each is a capacitance. In reverse and small
forward bias the stored charge is the fixed dopant charge in the depletion layer,
$Q = eA N_d x_n$. Differentiating with the depletion width gives the **junction
(depletion) capacitance**

$$
C_j = \frac{\d Q}{\d V} = \frac{\varepsilon A}{W(V)} = A\sqrt{\frac{e\varepsilon}{2(V_{bi} - V)}\frac{N_a N_d}{N_a + N_d}},
$$

the same form as a parallel-plate capacitor of gap $W$, but with $W$ tunable by
the reverse bias. A junction used this way is a voltage-controlled capacitor, the
**varactor** that tunes radio-frequency oscillators; a plot of $C_j^{-2}$ versus
$V$ is a straight line whose slope gives the doping.

Under strong forward bias a second, larger capacitance dominates: the stored
excess minority charge $Q = I\tau$ changes with the current, giving the
**diffusion capacitance** $C_d = \d Q/\d V = (e/k_B T)\,I\tau$, proportional to the
forward current and to the lifetime. Diffusion capacitance is what slows a diode's
switching from conducting to blocking — the stored charge must be removed first.

## Breakdown

Beyond a critical reverse voltage the tiny saturation current turns sharply into a
large reverse current — **breakdown**. Two distinct mechanisms produce it.

- **Avalanche breakdown.** In the strong field of a wide depletion region a carrier
  gains enough kinetic energy between collisions to knock a bound electron across
  the gap by **impact ionization**, creating a new electron-hole pair; the offspring
  are accelerated in turn, and the multiplication runs away. Avalanche dominates in
  lightly doped junctions, has a breakdown voltage that **rises** with temperature
  (hotter lattice scatters carriers before they reach ionizing energy), and sets the
  reverse rating of power and high-voltage diodes.
- **Zener breakdown.** In a heavily doped, narrow junction the depletion layer is so
  thin that valence electrons on the p side **tunnel** directly into empty conduction
  states on the n side once the bands overlap under reverse bias. Zener (tunneling)
  breakdown dominates below about $5\ \text{V}$ in silicon and has a breakdown
  voltage that **falls** with temperature. Zener diodes exploit the sharp, stable
  breakdown edge as a voltage reference.

$$
% caption: The reverse breakdown region. Below the breakdown voltage only the
% saturation current flows; at V_BR the current turns down steeply as avalanche
% multiplication or Zener tunneling sets in, clamping the voltage across the diode.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[->, black] (-5.2,0) -- (1.2,0) node[right] {$V$};
  \draw[->, black] (0,-3.0) -- (0,1.0) node[left] {$I$};
  % small forward hint
  \draw[acc, very thick, domain=0:0.7, samples=30, variable=\x]
    plot ({\x*1.2},{0.5*(exp(\x*1.6)-1)});
  % reverse saturation flat
  \draw[acc, very thick] (0,-0.12) -- (-4.0,-0.28);
  % breakdown knee going down
  \draw[acc, very thick] (-4.0,-0.28) .. controls (-4.35,-0.9) and (-4.4,-1.8) .. (-4.45,-2.8);
  \draw[black, dashed] (-4.0,0) -- (-4.0,-0.28);
  \node[anchor=south, font=\scriptsize] at (-4.0,0.05) {$V_{BR}$};
  \node[acc, anchor=west, font=\scriptsize] at (-3.9,-1.8) {breakdown};
\end{tikzpicture}
$$

The junction physics assembled here — the built-in field, the exponential
injection current, the stored charge, and the breakdown edge — is the vocabulary of
every device. Cascading two junctions makes a transistor, and running a junction as
a light source or a photon collector makes the optoelectronic devices of the
[final lesson](/condensed-matter/semiconductors/transistors-and-optoelectronics).
