Basically, an LED works like a valve that allows an electron flow when a voltage is applied in the forward direction (+ at anode & - at cathode). The electrons move in reverse, from cathode to anode. During this electron flow, electrons recombine with holes, releasing photons (light).
Basically, an LED functions like a valve that allows an electron flow when a voltage is applied in the forward direction (+ on the anode & - on the cathode). The electrons move in reverse, from the cathode to the anode. During this electron flow, electrons recombine with holes, releasing photons (light).
Between the cathode and the anode, there is a so-called bandgap. This bandgap can be thought of as a neutral zone and is of different sizes depending on the doping of the semiconductor. Depending on the bandgap between the anode and cathode, an energy gap is present. The energy required to overcome the energy gap (E-E) is equal to the emitted photon energy and thus also equal to the wavelength of the emitted light.
In short, different semiconductor compositions (doping) lead to different distances between the conduction bands and thus different wavelengths when electrons recombine with holes.