PN Junction Under Bias & the Diode Equation
Deriving the diode equation from physics. Learn how forward bias lowers the barrier and injects minority carriers, the law of the junction (p_n = p_n0·e^(V/V_T)), minority-carrier diffusion into long and short diodes, the Shockley equation I = I_S(e^(V/nV_T) − 1) with I_S expressed through n_i, doping, diffusion lengths and area, reverse leakage (diffusion and depletion-region generation), recombination current and the ideality factor, high-level injection and series resistance, temperature dependence of I_S and of V at constant current (~−2 mV/K), and the family of diode models (ideal, constant-drop, piecewise-linear, exponential, small-signal) — with Python computing I_S from physical parameters, the I–V curve, injected carrier levels and dV/dT.
Forward bias reduces the junction barrier, and the number of carriers able to cross grows exponentially (Boltzmann). Those injected minority carriers diffuse away and recombine, and the diffusion current they carry is the diode current.
The same physics explains why silicon diodes 'turn on' near 0.6–0.7 V, why current rises 10× every 60 mV, why leakage doubles every ~10 °C, and why the forward voltage falls 2 mV per degree.
An analogy
Forward bias lowers a dam (barrier). Water (carriers) spills over in an amount that grows exponentially as the dam drops, then spreads out downstream (diffusion) and soaks into the ground (recombination). Reverse bias raises the dam: only a trickle of minority carriers that happen to reach the edge gets swept across.
Forward bias
The barrier falls from qV_bi to q(V_bi − V). Majority carriers able to surmount it increase as e^(V/V_T), becoming injected minority carriers on the other side, where they diffuse and recombine. Current in the neutral regions is carried by majority carriers (drift) supplying the recombination; total current is continuous through the device.
Reverse bias and leakage
Components of reverse current:
- Diffusion of minority carriers to the depletion edge: −I_S (ideal)
- Thermal generation inside the depletion region: qAn_iW/2τ — dominant in Si at room temperature, grows with √V_R
- Surface leakage along the junction perimeter
- Tunnelling (heavily doped) and avalanche multiplication near breakdown
- Leakage roughly doubles every 8–10 °C
Ideality factor and non-idealities
At low forward bias, recombination in the depletion region gives current ∝ e^(V/2V_T) (n = 2); at moderate bias diffusion dominates (n = 1); at high injection n → 2 again, and finally ohmic series resistance flattens the curve (V = nV_T ln(I/I_S) + IR_s). Plotting log I vs V reveals these regions and allows extraction of I_S, n and R_s.
Diode models
Ideal switch (V = 0 on); constant drop (0.7 V Si, 0.3 V Schottky, 1.8–3.3 V LEDs); piecewise-linear (V_on + r_on·I); exponential (Shockley with n and R_s — SPICE); small-signal (r_d = nV_T/I plus junction and diffusion capacitance). Choose the simplest model that captures the effect you need.
Formulas
- Law of the junction:
p_n(x_n) = p_n0·e^(V/V_T); n_p(−x_p) = n_p0·e^(V/V_T) - Saturation current (long diode):
I_S = qAn_i²(D_p/(L_pN_D) + D_n/(L_nN_A)) - Shockley equation:
I = I_S(e^(V/nV_T) − 1) - Generation leakage:
I_gen = qAn_iW/(2τ) - Temperature:
I_S ∝ T^(3+γ/2)e^(−E_g/kT); dV/dT ≈ (V − E_g/q − 3V_T)/T ≈ −2 mV/K - Small-signal:
r_d = nV_T/I_D
Worked example: Current ratio
Given: ΔV = 120 mV, n = 1
Find: I₂/I₁.
- e^(0.12/0.02585)
Answer: ≈ 104
Worked example: Dynamic resistance
Given: I 2 mA, n 1
Find: r_d.
- 25.85 mV/2 mA
Answer: 12.9 Ω
Worked example: Temperature
Given: V_F 0.65 V at 25 °C, −2 mV/°C
Find: V_F at 85 °C.
- 0.65 − 0.12
Answer: 0.53 V
Injected minority carriers under forward bias
p⁺ side depletion n side
n_p(x) ↗ injected electrons │ │ injected holes p_n(x) = p_n0·e^(V/V_T) at x_n
│ │ ╲ decays as e^(−(x−x_n)/L_p) (long diode)
──────────────────────────────┴───────┴────────────────────── x
Hole diffusion current at x_n: J_p = qD_p·p_n0(e^(V/V_T) − 1)/L_p → I = I_S(e^(V/V_T) − 1)The applied voltage sets the minority concentration at each depletion edge through the Boltzmann factor. The slope of the resulting diffusion profile gives the current. The more lightly doped side receives more injected carriers (p_n0 = n_i²/N_D is larger), so in a p⁺n diode hole injection into the n side dominates.
Saturation current from physics and the I–V
import math
# Ideal (Shockley) diode from physics: saturation current, I-V, injected carriers, temperature coefficient
q, VT, ni = 1.602e-19, 0.02585, 9.65e9
A = 1e-4 # 100 um x 100 um junction (cm^2)
Na, Nd = 1e18, 1e16 # p+ n diode
Dn, Dp, tau_n, tau_p = 5.0, 10.0, 1e-7, 1e-6
Ln, Lp = math.sqrt(Dn * tau_n), math.sqrt(Dp * tau_p)
Is = q * A * ni**2 * (Dp / (Lp * Nd) + Dn / (Ln * Na))
print(f"Lp = {Lp*1e4:.1f} um, Ln = {Ln*1e4:.2f} um -> Is = {Is:.2e} A (hole injection into n side dominates: {Dp/(Lp*Nd)/(Dp/(Lp*Nd)+Dn/(Ln*Na))*100:.1f}%)")
for V in (0.4, 0.5, 0.6, 0.7):
I = Is * (math.exp(V / VT) - 1)
print(f"V = {V:.1f} V: I = {I:.3e} A, injected holes at the n-edge p = {ni**2/Nd*math.exp(V/VT):.2e} cm^-3")
print(f"reverse: I = -Is = {-Is:.2e} A (ideal); SRH generation in 0.3 um depletion (tau 1 us): {q*ni*0.3e-4*A/(2*1e-6):.2e} A (dominates in Si!)")
# Temperature coefficient of V at constant current, Eg = 1.12 V
V, T = 0.6, 300.0
dVdT = (V - 1.12 - 3 * VT) / T
print(f"dV/dT at constant current ~ (V - Eg - 3VT)/T = {dVdT*1e3:.2f} mV/K")
# Lp = 31.6 um, Ln = 7.07 um -> Is = 4.82e-16 A (hole injection into n side dominates: 97.8%)
# V = 0.4 V: I = 2.532e-09 A, injected holes at the n-edge p = 4.89e+10 cm^-3
# V = 0.5 V: I = 1.212e-07 A, injected holes at the n-edge p = 2.34e+12 cm^-3
# V = 0.6 V: I = 5.803e-06 A, injected holes at the n-edge p = 1.12e+14 cm^-3
# V = 0.7 V: I = 2.778e-04 A, injected holes at the n-edge p = 5.36e+15 cm^-3
# reverse: I = -Is = -4.82e-16 A (ideal); SRH generation in 0.3 um depletion (tau 1 us): 2.32e-12 A (dominates in Si!)
# dV/dT at constant current ~ (V - Eg - 3VT)/T = -1.99 mV/KFor a 100 × 100 µm p⁺n diode, physics gives I_S ≈ 5 × 10⁻¹⁶ A; 98% of the current is hole injection into the lighter n side. Current rises ~48× per 100 mV (10× per 59.5 mV). At 0.7 V the injected hole density (5 × 10¹⁵) approaches the doping (10¹⁶) — high-level injection begins. In reverse, depletion-region generation (2 pA) swamps the ideal diffusion leakage (0.5 fA) in silicon. At constant current V falls ~2 mV/K.
Common mistakes
- Wrong: Using I_S as the real reverse leakage of a silicon diode. — Right: Generation and surface leakage dominate.
- Wrong: Ignoring series resistance at high current. — Right: V = nV_T ln(I/I_S) + IR_s.
- Wrong: Assuming n = 1 at all currents. — Right: n ≈ 2 at low and very high injection.
Applications
- Rectification: Power supplies and detectors.
- Temperature sensing: −2 mV/K and ΔV_BE PTAT sensors.
- Log amplifiers: Exponential I–V.
- Mixers & detectors: Nonlinearity at RF.
Key takeaways
- Forward bias injects minority carriers ∝ e^(V/V_T).
- I = I_S(e^(V/nV_T) − 1), I_S from n_i², doping, L.
- Reverse leakage in Si: generation dominated.
- V_F falls ~2 mV/K; r_d = nV_T/I.
Going further
- Short-diode theory: Replace L by W in I_S.
- High-level injection: Conductivity modulation.
- Charge-control model: Q = τI for switching.