
A p–n junction is a boundary or interface between two types of
semiconductor materials,
p-type and
n-type, inside a single
crystal
A crystal or crystalline solid is a solid material whose constituents (such as atoms, molecules, or ions) are arranged in a highly ordered microscopic structure, forming a crystal lattice that extends in all directions. In addition, macr ...
of semiconductor. The "p" (positive) side contains an excess of
holes, while the "n" (negative) side contains an excess of
electron
The electron (, or in nuclear reactions) is a subatomic particle with a negative one elementary electric charge. Electrons belong to the first generation of the lepton particle family,
and are generally thought to be elementary partic ...
s in the outer shells of the electrically neutral
atom
Every atom is composed of a nucleus and one or more electrons bound to the nucleus. The nucleus is made of one or more protons and a number of neutrons. Only the most common variety of hydrogen has no neutrons.
Every solid, liquid, gas ...
s there. This allows electrical current to pass through the junction only in one direction. The p-n junction is created by
doping
Doping may refer to:
* Doping, adding a dopant to something
* Doping (semiconductor), intentionally introducing impurities into an extremely pure semiconductor to change its electrical properties
* Aircraft dope, a lacquer that is applied to fabr ...
, for example by
ion implantation,
diffusion
Diffusion is the net movement of anything (for example, atoms, ions, molecules, energy) generally from a region of higher concentration to a region of lower concentration. Diffusion is driven by a gradient in Gibbs free energy or chemical p ...
of
dopant
A dopant, also called a doping agent, is a trace of impurity element that is introduced into a chemical material to alter its original electrical or optical properties. The amount of dopant necessary to cause changes is typically very low. Wh ...
s, or by
epitaxy (growing a layer of crystal doped with one type of dopant on top of a layer of crystal doped with another type of dopant). If two separate pieces of material were used, this would introduce a
grain boundary between the semiconductors that would severely inhibit its utility by
scattering the electrons and
holes.
p–n junctions are elementary "building blocks" of
semiconductor electronic devices such as
diodes,
transistor
upright=1.4, gate (G), body (B), source (S) and drain (D) terminals. The gate is separated from the body by an insulating layer (pink).
A transistor is a semiconductor device used to Electronic amplifier, amplify or electronic switch, switch ...
s,
solar cell
A solar cell, or photovoltaic cell, is an electronic device that converts the energy of light directly into electricity by the photovoltaic effect, which is a physical and chemical phenomenon.[light-emitting diode
A light-emitting diode (LED) is a semiconductor device that emits light when current flows through it. Electrons in the semiconductor recombine with electron holes, releasing energy in the form of photons. The color of the light ( ...]
s (LEDs), and
integrated circuits; they are the active sites where the electronic action of the device takes place. For example, a common type of
transistor
upright=1.4, gate (G), body (B), source (S) and drain (D) terminals. The gate is separated from the body by an insulating layer (pink).
A transistor is a semiconductor device used to Electronic amplifier, amplify or electronic switch, switch ...
, the
bipolar junction transistor
A bipolar junction transistor (BJT) is a type of transistor that uses both electrons and electron holes as charge carriers. In contrast, a unipolar transistor, such as a field-effect transistor, uses only one kind of charge carrier. A bipola ...
(BJT), consists of two p–n junctions in series, in the form n–p–n or p–n–p; while a diode can be made from a single p-n junction. A
Schottky junction is a special case of a p–n junction, where metal serves the role of the n-type semiconductor.
Properties

The p–n junction possesses a useful property for modern semiconductor electronics. A p-doped semiconductor is relatively
conductive. The same is true of an n-doped semiconductor, but the junction between them can become
depleted of
charge carriers, and hence non-conductive, depending on the relative voltages of the two semiconductor regions. By manipulating this non-conductive layer, p–n junctions are commonly used as
diodes: circuit elements that allow a flow of
electricity
Electricity is the set of physical phenomena associated with the presence and motion of matter that has a property of electric charge. Electricity is related to magnetism, both being part of the phenomenon of electromagnetism, as describ ...
in one direction but not in the other (opposite) direction.
''Bias'' is the application of a voltage relative to a p–n junction region:
* ''
forward bias'' is in the direction of easy current flow
* ''
reverse bias'' is in the direction of little or no current flow.
The forward-bias and the reverse-bias properties of the p–n junction imply that it can be used as a
diode. A p–n junction diode allows electric charges to flow in one direction, but not in the opposite direction; negative charges (electrons) can easily flow through the junction from n to p but not from p to n, and the reverse is true for holes. When the p–n junction is forward-biased, electric charge flows freely due to reduced resistance of the p–n junction. 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''
.
At the junction, some of the free electrons in the n-type wander into the p-type due to random thermal migration. As they diffuse into the p-type they combine with holes, and cancel each other out. In a similar way some of the positive holes in the p-type wander 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 becomes positively charged. 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 through the electric field that these charged regions create. The regions near the p–n interface lose their neutrality and most of their mobile carriers, forming the
space charge region or
depletion layer (see
figure A).

The
electric field created by the space charge region opposes the diffusion process for both electrons and holes. There are two concurrent phenomena: the diffusion process that tends to generate more space charge, and the electric field generated by the space charge that tends to counteract the diffusion. 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
A donor in general is a person, organization or government which donates something voluntarily. The term is usually used to represent a form of pure altruism, but is sometimes used when the payment for a service is recognized by all parties as re ...
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 the positive terminal and the n-type is connected with the negative terminal.

The panels show energy band diagram, electric field, and net charge density. 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 V. Reducing depletion width can be inferred from the shrinking carrier motion 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
A cathode is the electrode from which a conventional current leaves a polarized electrical device. This definition can be recalled by using the mnemonic ''CCD'' for ''Cathode Current Departs''. A conventional current describes the direction i ...
is comparatively higher than at the
anode
An anode is an electrode of a polarized electrical device through which conventional current enters the device. This contrasts with a cathode, an electrode of the device through which conventional current leaves the device. A common mnemoni ...
. 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 conduct, if the voltage gets any higher. This, in 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
be the concentration of negatively-charged acceptor atoms and
be the concentrations of positively-charged donor atoms. Let
and
be the equilibrium concentrations of electrons and holes respectively. Thus, by Poisson's equation: