Optical sensors are devices which convert light into an electrical signal. They are usually used to detect the presence or absence of an object. They work by using a light source, such as a LED, to send a beam of light across the area being monitored, and a light detector, such as a photodiode, to detect the light when it is interrupted by the presence of an object. Optical sensors have many different applications in industry, including presence detection, distance measurement, color recognition, and even medical imaging.