The core part of the light-emitting diode is a wafer composed of a P-type semiconductor and an N-type semiconductor. There is a transition layer between the P-type semiconductor and the N-type semiconductor, called a PN junction. In the PN junction of some semiconductor materials, the injected minority carriers and majority carriers will release excess energy in the form of light, thereby directly converting electrical energy into light energy. The reverse voltage is added to the PN junction, and minority carriers are difficult to inject, so they do not emit light. When it is in the forward working state ( that is, the forward voltage is applied to both ends ), when the current flows from the anode to the cathode of the LED, the semiconductor crystal emits light of different colors from ultraviolet to infrared. The intensity of the light is related to the current.