A photoelectric sensor is a device that converts optical signals into electrical signals. Its working principle is based on the photoelectric effect. The photoelectric effect refers to the phenomenon of the corresponding electrical effect occurring when the electrons of the material absorb the energy of photons when light is irradiated on certain substances. According to the difference of photoelectric effect phenomenon, photoelectric effect is divided into three categories: external photoelectric effect, internal photoelectric effect and photovoltaic effect. Photoelectric devices include photocells, photomultipliers, photoresistors, photodiodes, phototransistors, and photocells.