Light emitting diodes, commonly called LEDs, are real unsung heroes in the electronics world. They do dozens of different jobs and are found in all kinds of devices. Among other things, they form the numbers on digital clocks, transmit information from remote controls, light up watches and tell you when your appliances are turned on. Collected together, they can form images on a jumbo television screen or illuminate a traffic light.
Basically, LEDs are just tiny light bulbs that fit easily into an electrical circuit. But unlike ordinary incandescent bulbs, they don't have a filament that will burn out, and they don't get especially hot. They are illuminated solely by the movement of electrons in a semiconductor material, and they last just as long as a standard transistor.
What is a Diode?
Diode is the simplest sort of semiconductor device. Broadly speaking, a semiconductor is a material with a varying ability to conduct electrical current. Most semiconductors are made of a poor conductor that has had impurities (atoms of another material) added to it. The process of adding impurities is called doping.
In the case of LEDs, the conductor material is typically aluminum-gallium-arsenide (AlGaAs). In pure aluminum-gallium-arsenide, all of the atoms bond perfectly to their neighbors, leaving no free electrons (negatively-charged particles) to conduct electric current. In doped material, additional atoms change the balance, either adding free electrons or creating holes where electrons can go. Either of these additions make the material more conductive.
A semiconductor with extra electrons is called N-type material, since it has extra negatively-charged particles. In N-type material, free electrons move from a negatively-charged area to a positively charged area.
A semiconductor with extra holes is called P-type material, since it effectively has extra positively-charged particles. Electrons can jump from hole to hole, moving from a negatively-charged area to a positively-charged area. As a result, the holes themselves appear to move from a positively-charged area to a negatively-charged area.
A diode comprises a section of N-type material bonded to a section of P-type material, with electrodes on each end. This arrangement conducts electricity in only one direction. When no voltage is applied to the diode, electrons from the N-type material fill holes from the P-type material along the junction between the layers, forming a depletion zone. In a depletion zone, the semiconductor material is returned to its original insulating state -- all of the holes are filled, so there are no free electrons or empty spaces for electrons, and charge can't flow.
To get rid of the depletion zone, you have to get electrons moving from the N-type area to the P-type area and holes moving in the reverse direction. To do this, you connect the N-type side of the diode to the negative end of a circuit and the P-type side to the positive end. The free electrons in the N-type material are repelled by the negative electrode and drawn to the positive electrode. The holes in the P-type material move the other way. When the voltage difference between the electrodes is high enough, the electrons in the depletion zone are boosted out of their holes and begin moving freely again. The depletion zone disappears, and charge moves across the diode.
If you try to run current the other way, with the P-type side connected to the negative end of the circuit and the N-type side connected to the positive end, current will not flow. The negative electrons in the N-type material are attracted to the positive electrode. The positive holes in the P-type material are attracted to the negative electrode. No current flows across the junction because the holes and the electrons are each moving in the wrong direction. The depletion zone increases.
The interaction between electrons and holes in this setup has an interesting side effect -- it generates light!