Optical sensors have the ability to detect light, typically at a specific range of the electromagnetic spectra (ultraviolet, visible, and infrared). The sensor detects either wavelength, frequency, or polarization of light and converts it into electric signal due to photoelectric effect.