Solution (source code)

= Solution

A <p-n junction> brings p-type and n-type regions into contact. Majority-carrier diffusion initially leaves exposed ionized acceptors and donors, producing a <depletion region> and a <built-in potential>. At <thermal equilibrium> the electrochemical potential is constant: drift and diffusion currents cancel. The internal barrier is not a freely extractable battery voltage.

For a nondegenerate abrupt homojunction,
$$
V_{\rm bi}=\frac{k_BT}{q}\ln\frac{N_AN_D}{n_i^2},\qquad
W=\sqrt{\frac{2\epsilon_s}{q}(V_{\rm bi}-V)
\left(\frac1{N_A}+\frac1{N_D}\right)}.
$$
Here $V>0$ denotes <forward bias> and the <depletion approximation> is assumed. <forward bias> lowers the barrier and injects <minority carriers>; <reverse bias> widens the depleted region and suppresses ordinary majority injection. In the ideal diffusion regime,
$$
\boxed{I=I_s[\exp(qV/(k_BT))-1].}
$$
Recombination can change the ideality factor; series resistance, high-level injection, leakage and breakdown limit this simple <Shockley diode equation>. The original junction theory explicitly treats both <electron> and hole currents, which is essential to <carrier injection> and transistor action.<The Theory of p-n Junctions in Semiconductors and p-n Junction Transistors by William Shockley>[1949, pp.435–436, introduction: rectification, photosensitivity and injection of minority carriers]{ref}

As a rectifying <diode>, the junction conducts strongly in one bias direction and weakly in the other before breakdown. This permits power rectification, signal detection and electronic switching. Stored minority charge affects turn-off time, so a static exponential current-voltage relation alone does not specify switching speed. A <junction capacitance> $C_j\simeq\epsilon_sA/W$ varies with <reverse bias> and can be used in a voltage-controlled capacitor; heavily doped or high-field junctions can instead exploit controlled tunnelling or avalanche breakdown.

In a <photodiode>, absorbed photons generate <electron-hole pairs> and the depleted-region field assists collection. <reverse bias> widens the collecting region and can improve speed, but adds dark-current noise and breakdown constraints. In a <solar cell>, the same carrier generation supplies current against an external voltage. An ideal illuminated characteristic is $I=I_s(e^{qV/(k_BT)}-1)-I_{\rm ph}$: at open circuit the forward <diode> current balances photocurrent, while useful power is taken at an intermediate operating point. Neither short circuit nor open circuit delivers power to a load.

A forward-biased <light-emitting diode> injects <electrons> and holes that can recombine radiatively. Efficient emission favors suitable direct-gap materials and carrier confinement; the characteristic <photon energy> is near the <semiconductor> <band gap>. <nonradiative recombination>, escape losses, series resistance and heating limit efficiency. Two coupled junctions also form a <bipolar junction transistor>: an emitter injects <minority carriers> through a thin base, and a reverse-biased collector collects them. Useful current gain depends on efficient injection and limited base recombination, not simply on joining any three arbitrary regions.

These functions are experimentally distinguished by measuring dark and illuminated current-voltage curves, bias-dependent capacitance, transient switching or optical emission, with controlled <temperature> and current limits. \b[The common mechanism is bias-controlled <carrier injection> or collection at a depletion barrier; the device geometry and operating mode determine which function is useful.]