The following is the transcript for a video that I will be making to explain how a P-N junction works.
A p-n junction, as the name suggests, is the boundary between two types of semiconductors: P-type and N-type.
For an intrinsic or pure semiconductor such as silicon which has 4 valence electrons, each atom is bond to 4 other neighbouring atoms.
The p-type semiconductor is one with excess holes due to the addition of dopants to intrinsic semiconductors. Elements such as boron or phosphorus from Group III of the periodic table all contain three valence electrons, causing them to function as acceptors when used to dope silicon. When an acceptor atom replaces a silicon atom in the crystal, a vacant state ( an electron “hole”) is created, which can move around the lattice and functions as a charge carrier.
The n-type semiconductor is one doped with Group V elements which have five valence electrons, allowing them to act as a donor; substitution of these atoms for silicon creates an extra free electron. Therefore, a silicon crystal doped with boron creates a p-type semiconductor whereas one doped with phosphorus results in an n-type material.
When the two types of semiconductors are put together, electrons diffuse across the boundary to combine with holes, creating a depletion region where there are no charge carriers. An electric field is also set up in the depletion region because the group III atoms are now negatively charged, having gained one more electron and the group V atoms are now positively charged, having each lost an electron. This electric field prevents further charges from diffusing across the boundary.
That is, until a potential difference is applied. The p-n junction serves now as a diode. We shall illustrate this with a single cell attached to the device. In the reverse-biased mode, the positive terminal is connected to the n-type semiconductor while the negative terminal is connected to the p-type end. This causes more electrons to move away from the depletion region in the n-type semiconductor and for more holes to be filled in the p-type semiconductor. The result is a widened depletion region and a larger opposing electric field.
In the forward-biased mode, the positive terminal of the cell is connected to the p-type semiconductor while the negative terminal is connected to the n-type end. The potential difference provided offers the electrons in the n-type semiconductor a push to overcome the small electric field formed across the depletion region and flow across to the p-type semiconductor which it then passes from hole to hole into the positive terminal.