We are now ready to make an actual useful device! Let's take a piece of n-type material, and a piece of p-type material, and stick them together, this way we will be making a p-n junction, or diode, which will be our first real electric device other than a simple resistor.  The band diagram might be like in Figure \(\PageIndex{1}\).

wrong pn junction band diagram .jpg
Figure \(\PageIndex{1}\): Possible Band diagram for a pn junction

But this shows the conduction and valence bands at the same energy for both p-type and n-type, and different Fermi levels.  It should be drawn with a constant Fermi level. The Fermi energy will always be the same for everything in a device at thermal equilibrium (no changes in temperature, no applied light, voltage, current, magnetic field, etc.)  So Figure  \(\PageIndex{1}\) is drawn wrong--the Fermi level should be the same everywhere through the device!

If we draw the device's band diagram again Figure  \(\PageIndex{2}\) with a constant Fermi level, the conduction bands and valence bands must be at different energies as we move through the device.  There is no problem with this, since the conduction and valence bands are drawn relative to the Fermi level. 

a better pn junction band diagram.png
Figure \(\PageIndex{2}\): Possible band diagram with a constant Fermi level for a pn junction

There are still problems with this band diagram, now we have a big bunch of holes on the right and a big bunch of electrons on the left.  We would expect, that in the absence of some force to keep them this way, they will start to spread out until their distribution is more or less equal everywhere (a diffusion process). Finally, we remember that a hole is just an absence of an electron, and since an electron in the conduction band can lower the system energy by falling down into one of the empty hole states, it seems likely that this will happen. This process is called recombination. The place where this is most likely to occur, of course, would be right at the junction between the n and p regions. This is shown in Figure \(\PageIndex{3}\).

recombination with pn junction band diagram.jpg
Figure \(\PageIndex{3}\): Possible band diagram with recombination at a pn junction

 

Now is might seem that this recombination effect might just go on and on, until there are no carriers left in the sample. This is not the case, however. In order to see what brings everything to a halt, we need yet another diagram. Figure \(\PageIndex{4}\) is more physical than what we have been looking at so far. It is a picture of the actual p-n junction, showing both the holes and the electrons. We also need to put in the donors and acceptors, however, if we want to see what goes on. The fixed (meaning they can't move around) charges of the donor and acceptor atoms are represented by simple "+" and "-" signs. They are arranged in a nice lattice-like arrangement to remind us that they are stuck in the silicon crystal lattice. (In reality however, even though they are stuck in the crystal lattice, there are so few of them compared to the silicon atoms that their distribution would be quite random.) For the mobile holes and electrons, we will stay with the little circles with charge signs in them. These are randomly distributed, to remind us that they are free to move about the crystal.

A rectangle is divided down its center by a vertical dotted line. A grid of minus signs fills the left half, and a grid of plus signs fills the right half. Plus signs enclosed in circles are scattered over the left half of the rectangle, and minus signs enclosed in circles are scattered over the right half.
Figure \(\PageIndex{4}\): Spatial schematic of a p-n junction

We will now have to allow some of the holes and electrons (again near the junction) to recombine. Remember, when an electron and a hole recombine, they both are annihilated and disappear. Note that this process conserves charge and (if we could calculate it) momentum as well. There is obviously some energy lost, but this will simply show up as vibrations, or heat, within the crystal lattice — or, in the case of an LED, as light emitted from the device. See, already we know enough about semiconductors to understand (somewhat) how an actual device works. Light coming from an LED is simply the energy which is released when an electron and hole recombine. We will take a look at this in more detail later. Let's allow some recombination to occur, as shown in Figure \(\PageIndex{5}\).

The junction from Figure 4 after some recombination has occurred, so that an equal number of the circle-enclosed plus and minus signs have disappeared.
Figure \(\PageIndex{5}\): The junction after some recombination has occurred