# P–n junction

A p–n junction is a combination of two types of semiconductor materials, p-type and n-type, in a single crystal. The "n" (negative) side contains freely-moving electrons, while the "p" (positive) side contains freely-moving electron holes. Connecting the two materials causes creation of a depletion region near the boundary, as the free electrons fill the available holes, which in turn allows electric current to pass through the junction only in one direction.
p–n junctions represent the simplest case of a semiconductor electronic device; a p-n junction by itself, when connected on both sides to a circuit, is a diode. More complex circuit components can be created by further combinations of p-type and n-type semiconductors; for example, the bipolar junction transistor (BJT) is a semiconductor in the form n–p–n or p–n–p. Combinations of such semiconductor devices on a single chip allow for the creation of integrated circuits.
Solar cells and light-emitting diodes (LEDs) are essentially p-n junctions where the semiconductor materials are chosen, and the component's geometry designed, to maximise the desired effect (light absorption or emission). A Schottky junction is a similar case to a p–n junction, where instead of an n-type semiconductor, a metal directly serves the role of the "negative" charge provider.

## History

The invention of the p–n junction is usually attributed to American physicist Russell Ohl of Bell Laboratories in 1939. Two years later (1941), Vadim Lashkaryov reported discovery of p–n junctions in Cu$_2$O and silver sulphide photocells and selenium rectifiers. The modern theory of p-n junctions was elucidated by William Shockley in his classic work Electrons and Holes in Semiconductors (1950).

## Properties

A p-doped semiconductor (that is, one where impurities such as Boron are introduced into its crystal lattice) is relatively conductive. The same is true of an n-doped semiconductor, but the junction between them - the boundary where the p-doped and n-doped semiconductor materials meet - can become depleted of charge carriers such as electrons, depending on the relative voltages of the two semiconductor regions.
By manipulating the flow of charge carriers across this depleted layer, p–n junctions can be used as diodes: circuit elements that allow a flow of electricity in one direction but not in the opposite direction. This property makes the p–n junction extremely useful in modern semiconductor electronics.
Bias is the application of a voltage relative to a p–n junction region:
* Forward bias is in the direction in which current readily flows
* Reverse bias is in the direction of little or no current flow
Negative charge carriers (electrons) can easily flow through the junction from n to p but not from p to n, and the reverse is true for positive charge carriers (Electron hole). When the p–n junction is forward-biased, charge carriers flow freely due to the reduction in energy barriers seen by electrons and holes. When the p–n junction is reverse-biased, however, the junction barrier (and therefore resistance) becomes greater and charge flow is minimal.

### Equilibrium (zero bias)

In a p–n junction, without an external applied voltage, an equilibrium condition is reached in which a potential difference forms across the junction. This potential difference is called built-in potential $V_{\rm {bi}}$.
At the junction, some of the free electrons in the n-type wander into the p-type due to random thermal migration ("diffusion"). As they diffuse into the p-type they combine with electron holes, and cancel each other out. In a similar way, some of the positive holes in the p-type diffuse into the n-type and combine with free electrons and cancel each other out. The positively charged ("donor") dopant atoms in the n-type are part of the crystal, and cannot move. Thus, in the n-type, a region near the junction has a fixed amount of positive charge. The negatively charged ("acceptor") dopant atoms in the p-type are part of the crystal, and cannot move. Thus, in the p-type, a region near the junction becomes negatively charged. The result is a region near the junction that acts to repel the mobile charges away from the junction because of the electric field that these charged regions create. The region near the p–n interface loses electrical neutrality and most of its mobile carriers, forming the depletion layer (see figure A). The electric field created in the space charge then tends to counteract further diffusion, resulting in equilibrium.
The carrier concentration profile at equilibrium is shown in figure A with blue and red lines. Also shown are the two counterbalancing phenomena that establish equilibrium.
The space charge region is a zone with a net charge provided by the fixed ions (donors or acceptors) that have been left uncovered by majority carrier diffusion. When equilibrium is reached, the charge density is approximated by the displayed step function. In fact, since the y-axis of figure A is log-scale, the region is almost completely depleted of majority carriers (leaving a charge density equal to the net doping level), and the edge between the space charge region and the neutral region is quite sharp (see figure B, Q(x) graph). The space charge region has the same magnitude of charge on both sides of the p–n interfaces, thus it extends farther on the less doped side in this example (the n side in figures A and B).

### Forward bias

In forward bias, the p-type is connected with a positive electrical terminal and the n-type is connected with a negative terminal. The panels show energy band diagram, electric field, and net charge density. The built-in potential of the semiconductor varies, depending on the concentration of doping atoms. In this example, both p and n junctions are doped at a 1e15 cm$^{−3}$ (160 μC/cm$^3$) doping level, leading to built-in potential of ~0.59 volts. Reducing depletion width can be inferred from the shrinking movement of carriers across the p–n junction, which as a consequence reduces electrical resistance. Electrons that cross the p–n junction into the p-type material (or holes that cross into the n-type material) diffuse into the nearby neutral region. The amount of minority diffusion in the near-neutral zones determines the amount of current that can flow through the diode.
Only majority carriers (electrons in n-type material or holes in p-type) can flow through a semiconductor for a macroscopic length. With this in mind, consider the flow of electrons across the junction. The forward bias causes a force on the electrons pushing them from the N side toward the P side. With forward bias, the depletion region is narrow enough that electrons can cross the junction and inject into the p-type material. However, they do not continue to flow through the p-type material indefinitely, because it is energetically favorable for them to recombine with holes. The average length an electron travels through the p-type material before recombining is called the diffusion length, and it is typically on the order of micrometers.
Although the electrons penetrate only a short distance into the p-type material, the electric current continues uninterrupted, because holes (the majority carriers) begin to flow in the opposite direction. The total current (the sum of the electron and hole currents) is constant in space, because any variation would cause charge buildup over time (this is Kirchhoff's current law). The flow of holes from the p-type region into the n-type region is exactly analogous to the flow of electrons from N to P (electrons and holes swap roles and the signs of all currents and voltages are reversed).
Therefore, the macroscopic picture of the current flow through the diode involves electrons flowing through the n-type region toward the junction, holes flowing through the p-type region in the opposite direction toward the junction, and the two species of carriers constantly recombining in the vicinity of the junction. The electrons and holes travel in opposite directions, but they also have opposite charges, so the overall current is in the same direction on both sides of the diode, as required.
The Shockley diode equation models the forward-bias operational characteristics of a p–n junction outside the avalanche (reverse-biased conducting) region.

### Reverse bias

Connecting the p-type region to the negative terminal of the voltage supply and the n-type region to the positive terminal corresponds to reverse bias. If a diode is reverse-biased, the voltage at the cathode is comparatively higher than at the anode. Therefore, very little current flows until the diode breaks down. The connections are illustrated in the adjacent diagram.
Because the p-type material is now connected to the negative terminal of the power supply, the 'holes' in the p-type material are pulled away from the junction, leaving behind charged ions and causing the width of the depletion region to increase. Likewise, because the n-type region is connected to the positive terminal, the electrons are pulled away from the junction, with similar effect. This increases the voltage barrier causing a high resistance to the flow of charge carriers, thus allowing minimal electric current to cross the p–n junction. The increase in resistance of the p–n junction results in the junction behaving as an insulator.
The strength of the depletion zone electric field increases as the reverse-bias voltage increases. Once the electric field intensity increases beyond a critical level, the p–n junction depletion zone breaks down and current begins to flow, usually by either the Zener or the avalanche breakdown processes. Both of these breakdown processes are non-destructive and are reversible, as long as the amount of current flowing does not reach levels that cause the semiconductor material to overheat and cause thermal damage.
This effect is used to advantage in Zener diode regulator circuits. Zener diodes have a low breakdown voltage. A standard value for breakdown voltage is for instance 5.6 V. This means that the voltage at the cathode cannot be more than about 5.6 V higher than the voltage at the anode (though there is a slight rise with current), because the diode breaks down, and therefore conducts, if the voltage gets any higher. This effect limits the voltage over the diode.
Another application of reverse biasing is Varactor diodes, where the width of the depletion zone (controlled with the reverse bias voltage) changes the capacitance of the diode.

## Governing equations
### Size of depletion region

For a p–n junction, let $C_{A}(x)$ be the concentration of negatively-charged acceptor atoms and $C_{D}(x)$ be the concentrations of positively-charged donor atoms. Let $N_{0}(x)$ and $P_{0}(x)$ be the equilibrium concentrations of electrons and holes respectively. Thus, by Poisson's equation:
$-{\frac {\mathrm {d} ^{2}V}{\mathrm {d} x^{2}}}={\frac {\rho }{\varepsilon }}={\frac {q}{\varepsilon }}\left[(P_{0}-N_{0})+(C_{D}-C_{A})\right]$
where $V$ is the electric potential, $\rho$ is the charge density, $\varepsilon$ is permittivity and $q$ is the magnitude of the electron charge.
For a general case, the dopants have a concentration profile that varies with depth x, but for a simple case of an abrupt junction, $C_{A}$ can be assumed to be constant on the p side of the junction and zero on the n side, and $C_{D}$ can be assumed to be constant on the n side of the junction and zero on the p side. Let $d_{p}$ be the width of the depletion region on the p-side and $d_{n}$ the width of the depletion region on the n-side. Then, since $P_{0}=N_{0}=0$ within the depletion region, it must be that
$d_{p}C_{A}=d_{n}C_{D}$
because the total charge on the p and the n side of the depletion region sums to zero. Therefore, letting $D$ and $\Delta V$ represent the entire depletion region and the potential difference across it, $\Delta V=\int _{D}\int {\frac {q}{\varepsilon }}\left[(P_{0}-N_{0})+(C_{D}-C_{A})\right]\,\mathrm {d} x\,\mathrm {d} x={\frac {C_{A}C_{D}}{C_{A}+C_{D}}}{\frac {q}{2\varepsilon }}(d_{p}+d_{n})^{2}$
And thus, letting $d$ be the total width of the depletion region, we get $d={\sqrt {{\frac {2\varepsilon }{q}}{\frac {C_{A}+C_{D}}{C_{A}C_{D}}}\Delta V}}$
$\Delta V$ can be written as $\Delta V_{0}+\Delta V_{\text{ext}}$, where we have broken up the voltage difference into the equilibrium plus external components. The equilibrium potential results from diffusion forces, and thus we can calculate $\Delta V_{0}$ by implementing the Einstein relation and assuming the semiconductor is nondegenerate (i.e., the product ${P}_{0}{N}_{0}={n}_{i}^{2}$ is independent of the Fermi energy): $\Delta V_{0}={\frac {kT}{q}}\ln \left({\frac {C_{A}C_{D}}{P_{0}N_{0}}}\right)={\frac {kT}{q}}\ln \left({\frac {C_{A}C_{D}}{n_{i}^{2}}}\right)$ where T is the temperature of the semiconductor and k is Boltzmann constant.

### Current across depletion region

The Shockley ideal diode equation characterizes the current across a p–n junction as a function of external voltage and ambient conditions (temperature, choice of semiconductor, etc.). To see how it can be derived, we must examine the various reasons for current. The convention is that the forward (+) direction be pointed against the diode's built-in potential gradient at equilibrium.
* Forward current ($\mathbf {J} _{F}$)
** Diffusion current: current due to local imbalances in carrier concentration $n$, via the equation $\mathbf {J} _{D}\propto -q\nabla n$
* Reverse current ($\mathbf {J} _{R}$)
** Field current
** Generation current