# P–n diode

A p–n diode is a type of semiconductor diode based upon the p–n junction. The diode conducts current in only one direction, and it is made by joining a p-type semiconducting layer to an n-type semiconducting layer. Semiconductor diodes have multiple uses including rectification of alternating current to direct current, in the detection of radio signals, and emitting and detecting light.

## Structure

The figure shows two of the many possible structures used for p–n semiconductor diodes, both adapted to increase the voltage the devices can withstand in reverse bias. The top structure uses a mesa to avoid a sharp curvature of the p$^+$-region next to the adjoining n-layer. The bottom structure uses a lightly doped p-guard-ring at the edge of the sharp corner of the p$^+$-layer to spread the voltage out over a larger distance and reduce the electric field. (Superscripts like n$^+$ or n$^−$ refer to heavier or lighter impurity doping levels.)

## Electrical behavior

The ideal diode has zero resistance for the forward bias polarity, and infinite resistance (conducts zero current) for the reverse voltage polarity; if connected in an alternating current circuit, the semiconductor diode acts as an electrical rectifier.
The semiconductor diode is not ideal. As shown in the figure, the diode does not conduct appreciably until a nonzero knee voltage (or turn-on, cut-in, or threshold voltage) is reached, whose value depends on the semiconductor (listed in Diode § Forward threshold voltage for various semiconductors). Above this voltage the slope of the current-voltage curve is not infinite (on-resistance is not zero). In the reverse direction the diode conducts a nonzero leakage current (exaggerated by a smaller scale in the figure) and at a sufficiently large reverse voltage below the breakdown voltage the current increases very rapidly with more negative reverse voltages.
As shown in the figure, the on or off resistances are the reciprocal slopes of the current-voltage characteristic at a selected bias point:
    $r_{\text{D}}=\left.{\frac {\Delta v_{\text{D}}}{\Delta i_{\text{D}}}}\right|_{v_{\text{D}}=V_{\text{bias}}}\ ,$
where $r_{\text{D}}$ is the resistance and $i_{\text{D}}$ is the current change corresponding to the diode voltage change $\Delta v_{\text{D}}$ at the bias $V_{\text{bias}}\,.$

## Operation

Here, the operation of the abrupt p–n diode is considered. By "abrupt", it is meant that the p- and n-type doping exhibit a step function discontinuity at the plane where they encounter each other. The objective is to explain the various bias regimes in the figure displaying current-voltage characteristics. Operation is described using band-bending diagrams that show how the lowest conduction band energy and the highest valence band energy vary with position inside the diode under various bias conditions. For additional discussion, see the articles Semiconductor and Band diagram.

### Zero bias

The figure shows a band bending diagram for a p–n diode; that is, the band edges for the conduction band (upper line) and the valence band (lower line) are shown as a function of position on both sides of the junction between the p-type material (left side) and the n-type material (right side). When a p-type and an n-type region of the same semiconductor are brought together and the two diode contacts are short-circuited, the Fermi half-occupancy level (dashed horizontal straight line) is situated at a constant level. This level ensures that in the field-free bulk on both sides of the junction the hole and electron occupancies are correct. (So, for example, it is not necessary for an electron to leave the n-side and travel to the p-side through the short circuit to adjust the occupancies.)
However, a flat Fermi level requires the bands on the p-type side to move higher than the corresponding bands on the n-type side, forming a step (or barrier) in the band edges, labeled by φ$_B$. This step forces the electron density on the p-side to be a Boltzmann factor $e^{-\varphi _{\text{B}}/V_{\text{T}}}$smaller than on the n-side, corresponding to the lower electron density in p-region. The symbol $V_{\text{T}}$ denotes the thermal voltage, defined as $V_{\text{T}}={\tfrac {k_{\text{B}}T}{q}}.$ At T = 290 kelvins (room temperature), the thermal voltage is approximately 25 mV. Similarly, hole density on the n-side is a Boltzmann factor smaller than on the p-side. This reciprocal reduction in minority carrier density across the junction forces the pn-product of carrier densities to be
    $p\,n=p_{\text{B}}\,n_{\text{B}}\,e^{-\varphi _{\text{B}}/V_{\text{T}}}$
at any position within the diode at equilibrium. Where $p_{\text{B}}$ and $n_{\text{B}}$ are the bulk majority carrier densities on the p-side and the n-side, respectively.
As a result of this step in band edges, a depletion region near the junction becomes depleted of both holes and electrons, forming an insulating region with almost no mobile charges. There are, however, fixed, immobile charges due to dopant ions. The near absence of mobile charge in the depletion layer means that the mobile charges present are insufficient to balance the immobile charge contributed by the dopant ions: a negative charge on the p-type side due to acceptor dopant and as a positive charge on the n-type side due to donor dopant. Because of this charge there is an electric field in this region, as determined by Poisson's equation. The width of the depletion region adjusts so the negative acceptor charge on the p-side exactly balances the positive donor charge on the n-side, so there is no electric field outside the depletion region on either side.
In this band configuration no voltage is applied and no current flows through the diode. To force current through the diode a forward bias must be applied, as described next.

### Forward bias

In forward bias, the positive terminal of the battery is connected to the p-type material and the negative terminal is connected to the n-type material so that holes are injected into the p-type material and electrons into the n-type material. The electrons in the n-type material are called majority carriers on that side, but electrons that make it to the p-type side are called minority carriers. The same descriptors apply to holes: they are majority carriers on the p-type side, and minority carriers on the n-type side.
A forward bias separates the two bulk half-occupancy levels by the amount of the applied voltage, which lowers the separation of the p-type bulk band edges to be closer in energy to those of the n-type. As shown in the diagram, the step in band edges is reduced by the applied voltage to $\varphi _{\text{B}}-v_{\text{D}}.$ (The band bending diagram is made in units of volts, so no electron charge appears to convert $v_{\text{D}}$ to energy.)
Under forward bias, a diffusion current flows (that is a current driven by a concentration gradient) of holes from the p-side into the n-side, and of electrons in the opposite direction from the n-side to the p-side. The gradient driving this transfer is set up as follows: in the bulk distant from the interface, minority carriers have a very low concentration compared to majority carriers, for example, electron density on the p-side (where they are minority carriers) is a factor $e^{-\varphi _{\text{B}}/V_{\text{T}}}$ lower than on the n-side (where they are majority carriers). On the other hand, near the interface, application of voltage $v_{\text{D}}$ reduces the step in band edges and increases minority carrier densities by a Boltzmann factor $e^{v_{\text{D}}/V_{\text{T}}}$ above the bulk values. Within the junction, the pn-product is increased above the equilibrium value to:
    $p\,n=\left(p_{\text{B}}\,n_{\text{B}}\,e^{-\varphi _{\text{B}}/V_{\text{T}}}\right)e^{v_{\text{D}}/V_{\text{T}}}\ .$
The gradient driving the diffusion is then the difference between the large excess minority carrier densities at the barrier and the low densities in the bulk, and that gradient drives diffusion of minority carriers from the interface into the bulk. The injected minority carriers are reduced in number as they travel into the bulk by recombination mechanisms that drive the excess concentrations toward the bulk values.
Recombination can occur by direct encounter with a majority carrier, annihilating both carriers, or through a recombination-generation center, a defect that alternately traps holes and electrons, assisting recombination. The minority carriers have a limited lifetime, and this lifetime in turn limits how far they can diffuse from the majority carrier side into the minority carrier side, the so-called diffusion length. In the light-emitting diode, recombination of electrons and holes is accompanied by emission of light of a wavelength related to the energy gap between valence and conduction bands, so the diode converts a portion of the forward current into light.
Under forward bias, the half-occupancy lines for holes and electrons cannot remain flat throughout the device as they are when in equilibrium, but become quasi-Fermi levels that vary with position. As shown in the figure, the electron quasi-Fermi level shifts with position, from the half-occupancy equilibrium Fermi level in the n-bulk, to the half-occupancy equilibrium level for holes deep in the p-bulk. The hole quasi-Fermi level does the reverse. The two quasi-Fermi levels do not coincide except deep in the bulk materials.
The figure shows the majority carrier densities drop from the majority carrier density levels $(n_{\text{B}},p_{\text{B}})$ in their respective bulk materials, to a level a factor $e^{-(\varphi _{\text{B}}-v_{\text{D}})/V_{\text{T}}}$ smaller at the top of the barrier, which is reduced from the equilibrium value $\varphi _{\text{B}}$ by the amount of the forward diode bias $v_{\text{D}}.$ Because this barrier is located in the oppositely doped material, the injected carriers at the barrier position are now minority carriers. As recombination takes hold, the minority carrier densities drop with depth to their equilibrium values for bulk minority carriers, a factor $e^{-\varphi _{\text{B}}/V_{\text{T}}}$ smaller than their bulk densities $(n_{\text{B}},p_{\text{B}})$ as majority carriers before injection. At this point the quasi-Fermi levels rejoin the bulk Fermi level positions.
The reduced step in band edges also means that under forward bias the depletion region narrows as holes are pushed into it from the p-side and electrons from the n-side.
In the simple p–n diode the forward current increases exponentially with forward bias voltage due to the exponential increase in carrier densities, so there is always some current at even very small values of applied voltage. However, if one is interested in some particular current level, it will require a "knee" voltage before that current level is reached (~0.7 V for silicon diodes, others listed at Diode § Forward threshold voltage for various semiconductors). Above the knee, the current continues to increase exponentially. Some special diodes, such as some varactors, are designed deliberately to maintain a low current level up to some knee voltage in the forward direction.

### Reverse bias

In reverse bias the occupancy level for holes again tends to stay at the level of the bulk p-type semiconductor while the occupancy level for electrons follows that for the bulk n-type. In this case, the p-type bulk band edges are raised relative to the n-type bulk by the reverse bias $v_{\text{R}},$ so the two bulk occupancy levels are separated again by an energy determined by the applied voltage. As shown in the diagram, this behavior means the step in band edges is increased to $\varphi _{\text{B}}+v_{\text{R}},$ and the depletion region widens as holes are pulled away from it on the p-side and electrons on the n-side.
When the reverse bias is applied, the electric field in the depletion region is increased, pulling the electrons and holes further apart than in the zero bias case. Thus, any current that flows is due to the very weak process of carrier generation inside the depletion region due to generation-recombination defects in this region. That very small current is the source of the leakage current under reverse bias. In the photodiode, reverse current is introduced using creation of holes and electrons in the depletion region by incident light, thus converting a portion of the incident light into an electric current.
When the reverse bias becomes very large, reaching the breakdown voltage, the generation process in the depletion region accelerates leading to an avalanche condition which can cause runaway and destroy the diode.

### Diode law

The DC current-voltage behavior of the ideal p–n diode is governed by the Shockley diode equation:
    $I_{\text{D}}=I_{\text{R}}\left(e^{\frac {V_{\text{D}}}{nV_{\text{T}}}}-1\right),$
where
    $V_{\text{D}}$ is the DC voltage across the diode.
    $I_{\text{R}}$ is the reverse saturation current, the current that flows when the diode is reverse biased (that is, $V_{\text{D}}$ is large and negative).
    $n$ is an ideality factor introduced to model a slower rate of increase than predicted by the ideal diode law.
    $V_{\text{T}}$ is the thermal voltage of ${\tfrac {k_{\text{B}}T}{q}},$ approximately equal to 25 mV at T = 290 kelvins.
This equation does not model the non-ideal behavior such as excess reverse leakage or breakdown phenomena.
Using this equation, the diode on resistance is
    $r_{\text{D}}={\frac {1}{di_{\text{D}}/dv_{\text{D}}}}\approx {\frac {nV_{\text{T}}}{i_{\text{D}}}},$
exhibiting a lower resistance the higher the current. Note: to refer to differential or time-varying diode current and voltage, lowercase $i_{\text{D}}$ and $v_{\text{D}}$ are used.

### Capacitance

The depletion layer between the n and p sides of a p–n diode serves as an insulating region that separates the two diode contacts. Thus, the diode in reverse bias exhibits a depletion-layer capacitance, sometimes more vaguely called a junction capacitance, analogous to a parallel plate capacitor with a dielectric spacer between the contacts. In reverse bias the width of the depletion layer is widened with increasing reverse bias $v_{\text{R}}$ and the capacitance is accordingly decreased. Thus, the junction serves as a voltage-controllable capacitor. In a simplified one-dimensional model, the junction capacitance is:
    $C_{\text{J}}=\kappa \varepsilon _{0}{\frac {A}{w(v_{\text{R}})}}\ ,$
with $A$ the device area, $\kappa$ the relative semiconductor dielectric permittivity, $\varepsilon _{0}$ the electric constant, and $w$ the depletion width (thickness of the region where mobile carrier density is negligible).
In forward bias, besides the above depletion-layer capacitance, minority carrier charge injection and diffusion occurs. A diffusion capacitance exists expressing the change in minority carrier charge that occurs with a change in forward bias. In terms of the stored minority carrier charge, the diode current is:
    $i_{\text{D}}={\frac {Q_{\text{D}}}{\tau }}\ ,$
where $Q_{\text{D}}$ is the charge associated with diffusion of minority carriers, and $\tau$ is the transit time, the time taken for the minority charge to transit the injection region, typically 0.1–100 ns. On this basis, the diffusion capacitance is calculated to be:
    $C_{\text{D}}={\frac {dQ_{\text{D}}}{dv_{\text{D}}}}=\tau {\frac {di_{\text{D}}}{dv_{\text{D}}}}={\frac {i_{\text{D}}\tau }{V_{\text{T}}}}\ .$
Generally speaking, for usual current levels in forward bias, this capacitance far exceeds the depletion-layer capacitance.

### Transient response

The diode is a highly non-linear device, but for small-signal variations its response can be analyzed using a small-signal circuit based upon a selected quiescent DC bias point (or Q-point) about which the signal is imagined to vary. The equivalent circuit for a diode driven by a Norton source with current $I_{\text{S}}$ and resistance $R_{\text{S}}$ is shown. Using Kirchhoff's current law at the output node:
    $I_{\text{S}}=\left(j\omega (C_{\text{J}}+C_{\text{D}})+{\frac {1}{r_{\text{D}}}}+{\frac {1}{R_{\text{S}}}}\right)V_{\text{O}}\ ,$
with $C_{\text{D}}$ the diode diffusion capacitance, $C_{\text{J}}$ the diode junction capacitance (the depletion layer capacitance) and $r_{\text{D}}$ the diode on or off resistance, all at that Q-point. The output voltage provided by this circuit is then:
    ${\frac {V_{\text{O}}}{I_{\text{S}}}}={\frac {(R_{\text{S}}{\mathit {\parallel }}r_{\text{D}})}{1+j\omega (C_{\text{D}}+C_{\text{J}})(R_{\text{S}}{\mathit {\parallel }}r_{\text{D}})}}\ ,$
where || indicates parallel resistance. This transresistance amplifier exhibits a corner frequency or cutoff frequency denoted $f_{\text{c}}$:
    $f_{\text{c}}={\frac {1}{2\pi (C_{\text{D}}+C_{\text{J}})(R_{\text{S}}{\mathit {\parallel }}r_{\text{D}})}}\ ,$
and for frequencies $f\gg f_{\text{c}}$ the gain rolls off with frequency as the capacitors short-circuit the resistor $r_{\text{D}}.$ Assuming, as is the case when the diode is turned on, that $C_{\text{D}}\gg C_{\text{J}}$ and $R_{\text{S}}\gg r_{\text{D}},$ the expressions found above for the diode resistance and capacitance provide:
    $f_{\text{c}}={\frac {1}{2\pi n\tau }}\ ,$
which relates the corner frequency to the diode transit time.
For diodes operated in reverse bias, $C_{\text{D}}$ is zero and the term corner frequency often is replaced by cutoff frequency. In any event, in reverse bias the diode resistance becomes quite large, although not infinite as the ideal diode law suggests, and the assumption that it is less than the Norton resistance of the driver may not be accurate. The junction capacitance is small and depends upon the reverse bias $v_{\text{R}}.$ The cutoff frequency is then:
    $f_{\text{c}}={\frac {1}{2\pi \,C_{\text{J}}(R_{\text{S}}{\mathit {\parallel }}r_{\text{D}})}}\ ,$
and varies with reverse bias because the width $w(v_{\text{R}})$ of the insulating region depleted of mobile carriers increases with increasing diode reverse bias, reducing the capacitance.