How does an LED work? Why do they have a long life?
I am sorry to tell but not the motion of the electrons in the LED produces light and not the added impurities control the wavelength (the color) of the light emitted. The full explanations follows.
A LED or light emitting diode is made up of a pn junction made of two identical semiconductors like Si-Si (homojunction) or two different semiconductors like Si-GaAs (heterojunction). Each side of the diode junctions (p and n respectively) are differently doped with acceptors (for p side) and donors (for n side). For the case of Silicon the acceptor element that is added in about 1 ppm concentration is B (boron) and the donor element is P (phosphorous). When at thermal equilibrium the Fermi level (the energy level which has a probability of filling with electrons of 0.5) is the same in both p and n sides. Because the Fermi level is pinned at the donor impurity level in the n side, and at the acceptor impurity level in the p side, a reverse internal field in the contact zone between p and n sides is built up. See the attached figure.
When an external voltage is applied with positive potential to p side and negative potential to n side, the holes and electrons begin to move toward the contact zone. Because in the contact zone the internal filed is reduced by the external voltage applied electrons and holes will recombine with each other. Thus the radiative recombination between electrons and holes (in fact transition of electrons from higher energy levels to lower energy levels) in the contact zone (in the junction zone) will give rise to photon emission. The color of emitted photon depends on the band gap of the device, thus different colors are obtained only with different combinations of semiconductors in the p and n side. Thus color of the emitted photon does not depend on the impurities added but on the type of semiconductors used to make the p-n junction.
The long life expectancy of the led is due to the type of emission of radiation (i.e. by recombination between electrons and holes). There are no materials to be consumed in this process, only the electricity carriers which recombine (which jumps from outer energy levels in crystal to inner energy levels). Also, because the efficiency of recombination is extremely high the electric power consumed to move these carriers and make them recombine is very small, fact that do not overheat the crystal lattice. The light is produced at low normal temperatures and this fact preserves the structure.
LED is an acronym for light emitting diode. An LED is made of a semiconductor material like silicon. The semiconductor is divided into two parts, and an impurity in the form of small amounts of another element are added. One of the parts is doped with an element like boron or gallium; when these atoms join the silicon lattice the electronic configuration of the elements leads to a formation of holes as they have lesser number of electrons in the outermost shell than silicon. This is p-type doping. The other part is doped with an element like phosphorus or arsenic that have extra electrons which are set free when the atoms join the silicon lattice. This is called n-type doping.
Electricity can only pass in one direction in a diode. Electrons move from the part that has n-type doping to the part with p-type doping. The movement of electrons releases electromagnetic radiation that has a wavelength dependent on the impurities added. It can be controlled by using different elements.
LEDs have a long life due to the way they are created. Unlike an incandescent lamp, there is no filament that burns out after a short duration of time, fluorescent lamps create light by bombarding phosphors with electrons. The electrodes are the part that wears out here. LEDs have a longer life than other sources of light.