PN Junction Electrostatics: Built-in Potential, Depletion & Fields

What happens when P meets N. Learn junction formation by carrier diffusion, the depletion (space-charge) region of fixed ionised donors and acceptors, the built-in electric field and potential, equilibrium as a balance of drift and diffusion, the equilibrium band diagram, charge, field and potential distributions of the abrupt junction, depletion width and its split between sides, one-sided (p⁺n) junctions, the effect of reverse bias, and linearly graded junctions — with Python computing V_bi, W, x_n, x_p and E_max for several dopings and biases.

Joining p-type and n-type silicon creates the single most important structure in electronics. Electrons diffuse into the p side and holes into the n side, leaving behind uncovered ionised dopants. Their charge creates an electric field that pushes carriers back until drift balances diffusion.

The resulting depletion region, built-in voltage and field explain rectification, capacitance, breakdown, photodetection, solar cells and the operation of every bipolar and field-effect transistor.

An analogy

A PN junction is like a border between two towns: people (carriers) wander across at first, but those left behind (fixed ions) form a charged 'border fence' whose field turns later travellers back. An equilibrium is reached where the push to cross equals the push back.

Formation and equilibrium

At the moment of contact, large concentration differences drive diffusion. Each electron leaving the n side exposes a positive donor ion; each hole leaving the p side exposes a negative acceptor ion. The growing field drives a drift current opposing diffusion; equilibrium is reached when the two cancel for both electrons and holes — no net current, and a single flat Fermi level.

Charge, field and potential

Under the depletion approximation:

Asymmetric and reverse-biased junctions

Because N_A x_p = N_D x_n, depletion extends mainly into the lighter side: in p⁺n diodes, W and breakdown depend almost only on N_D. Reverse bias adds to V_bi, widening W as √(V_bi + V_R) and increasing E_max; forward bias narrows W. Depletion width sets capacitance and, with the field, breakdown voltage and punch-through.

Beyond the abrupt model

Diffused junctions are closer to linearly graded (W ∝ V^(1/3)); real profiles need numerical Poisson solutions. Depletion edges are not perfectly sharp (Debye length ~ a few tens of nm at 10¹⁶). Heterojunctions add band offsets. Junction curvature at mask edges concentrates the field, lowering breakdown — guard rings and field plates counter this.

Formulas

Worked example: Built-in voltage

Given: N_A 10¹⁷, N_D 10¹⁵, n_i 9.65e9

Find: V_bi.

Answer: ≈ 0.716 V

Worked example: One-sided width

Given: p⁺n, N_D 10¹⁵, V_bi 0.78 V, V_R 10 V

Find: W.

Answer: ≈ 3.73 µm

Worked example: Depletion split

Given: N_A 10¹⁸, N_D 10¹⁶, W 0.33 µm

Find: x_p.

Answer: ≈ 3.3 nm

Depletion region

   P-region            Depletion           N-region
  ──────────┐     ┌───────────────┐     ┌──────────
    holes   │     │ − − −  │ + + +│     │ electrons
   + + + +  │     │ fixed  │ fixed│     │ − − − −
  ──────────┴─────┴── A⁻ ──┼─ D⁺ ─┴─────┴──────────
               −x_p        0     x_n
                  E-field ← (points from + ions to − ions: n → p)
  Band diagram: E_F flat; bands bend down from p to n by qV_bi

Diffusing carriers leave fixed negative acceptor ions on the p side and positive donor ions on the n side. The field points from the n side to the p side, opposing further diffusion of majority carriers. The charges on each side are equal, so the lightly doped side hosts most of the depletion width.

Built-in voltage, depletion width and field

import math
# Abrupt PN junction electrostatics: built-in voltage, depletion widths, peak field vs reverse bias
q, eps, VT, ni = 1.602e-19, 11.7 * 8.854e-14, 0.02585, 9.65e9
def junction(Na, Nd, Vr=0.0):
    Vbi = VT * math.log(Na * Nd / ni**2)
    W = math.sqrt(2 * eps * (Vbi + Vr) / q * (1 / Na + 1 / Nd))
    xn, xp = W * Na / (Na + Nd), W * Nd / (Na + Nd)
    Emax = q * Nd * xn / eps
    return Vbi, W, xn, xp, Emax
for Na, Nd in ((1e16, 1e16), (1e18, 1e15), (1e17, 1e17)):
    Vbi, W, xn, xp, Emax = junction(Na, Nd)
    print(f"Na={Na:.0e} Nd={Nd:.0e}: Vbi = {Vbi:.3f} V, W = {W*1e4:.3f} um (xn {xn*1e4:.3f}, xp {xp*1e4:.4f}), Emax = {Emax:.2e} V/cm")
for Vr in (0, 5, 20):
    Vbi, W, xn, xp, Emax = junction(1e18, 1e15, Vr)
    print(f"one-sided p+n at Vr = {Vr:2d} V: W = {W*1e4:.2f} um, Emax = {Emax:.2e} V/cm")
# Na=1e+16 Nd=1e+16: Vbi = 0.716 V, W = 0.430 um (xn 0.215, xp 0.2152), Emax = 3.33e+04 V/cm
# Na=1e+18 Nd=1e+15: Vbi = 0.776 V, W = 1.002 um (xn 1.001, xp 0.0010), Emax = 1.55e+04 V/cm
# Na=1e+17 Nd=1e+17: Vbi = 0.835 V, W = 0.147 um (xn 0.073, xp 0.0735), Emax = 1.14e+05 V/cm
# one-sided p+n at Vr =  0 V: W = 1.00 um, Emax = 1.55e+04 V/cm
# one-sided p+n at Vr =  5 V: W = 2.73 um, Emax = 4.22e+04 V/cm
# one-sided p+n at Vr = 20 V: W = 5.19 um, Emax = 8.01e+04 V/cm

Built-in voltage depends only logarithmically on doping (0.72–0.84 V here). The one-sided p⁺n junction depletes almost entirely into the lightly doped n side (1.0 µm vs 1 nm). Reverse bias widens the depletion region as √(V_bi + V_R) and raises the peak field — the path to breakdown.

Common mistakes

Applications

Key takeaways

Going further