A p-n junction is formed when p-type and n-type semiconductor materials are joined together. At the interface of the p-n junction, holes from the p-side and electrons from the n-side begin to diffuse into the opposite sides due to the concentration gradient. This diffusion of carriers leads to a region around the junction where there are no free charge carriers, known as the depletion region. The charge density within the depletion region for the n-side and p-side can be described by the equations:
Where q is the elementary charge, ND and NA are the donor and acceptor doping concentrations, respectively.
The fixed charges in the depletion region create an electric field (E), pointing from the n-side to the p-side, opposing further diffusion of carriers. This electric field gives rise to a potential difference across the junction, known as the built-in voltage (V0), which can be calculated by:
Where, VT is the thermal voltage, and ni is the intrinsic carrier concentration.
There are two types of currents that exist in a p-n junction: diffusion current due to carrier diffusion and drift current due to the electric field. At equilibrium, the magnitude of the diffusion current equals the magnitude of the drift current, leading to no net current flow across the junction. Under open-circuit conditions, there is no external current, and the depletion layer's built-in voltage balances the contact potential at the metal-semiconductor junctions, resulting in zero net voltage across the terminals.
The built-in barrier voltage and the width of the depletion region play critical roles in the junction's behavior. The width of the depletion region determines the junction's capacitance and affects how the junction will respond to external voltages.