p-n junction diodes are made up of two adjacent pieces of p-type and n-type semiconducting materials. p-type and n-type materials are simply semiconductors, such as silicon (Si) or germanium (Ge), with atomic impurities; the type of impurity present determines the type of the semiconductor. The process of purposefully adding impurities to materials is called doping; semiconductors with impurities are referred to as "doped semiconductors".
In a pure (intrinsic) Si or Ge semiconductor, each nucleus uses its four valence electrons to form four covalent bonds with its neighbors (see figure below). Each ionic core, consisting of the nucleus and non-valent electrons, has a net charge of +4, and is surrounded by 4 valence electrons. Since there are no excess electrons or holes In this case, the number of electrons and holes present at any given time will always be equal.
An intrinsic semiconductor. Note each +4 ion is surrounded by four electrons.
Now, if one of the atoms in the semiconductor lattice is replaced by an element with three valence electrons, such as a Group 3 element like Boron (B) or Gallium (Ga), the electron-hole balance will be changed. This impurity will only be able to contribute three valence electrons to the lattice, therefore leaving one excess hole (see figure below). Since holes will "accept" free electrons, a Group 3 impurity is also called an acceptor.
A semiconductor doped with an acceptor. An excess hole is now present.
Because an acceptor donates excess holes, which are considered to be positively charged, a semiconductor that has been doped with an acceptor is called a p-type semiconductor; "p" stands for positive. Notice that the material as a whole remains electrically neutral. In a p-type semiconductor, current is largely carried by the holes, which outnumber the free electrons. In this case, the holes are the majority carriers, while the electrons are the minority carriers.
In addition to replacing one of the lattice atoms with a Group 3 atom, we can also replace it by an atom with five valence electrons, such as the Group 5 atoms arsenic (As) or phosphorus (P). In this case, the impurity adds five valence electrons to the lattice where it can only hold four. This means that there is now one excess electron in the lattice (see figure below). Because it donates an electron, a Group 5 impurity is called a donor. Note that the material remains electrically neutral.
A semiconductor doped with a donor. A free electron is now present.
Donor impurities donate negatively charged electrons to the lattice, so a semiconductor that has been doped with a donor is called an n-type semiconductor; "n" stands for negative. Free electrons outnumber holes in an n-type material, so the electrons are the majority carriers and holes are the minority carriers.