5.3. Light and Colour#
Light and colour sensors are used to detect and measure properties of electromagnetic radiation in the visible spectrum and beyond. These devices provide critical input for systems that need to respond to brightness, contrast, colour, or light intensity.
5.3.1. Photoresistors#
Photoresistors, also known as LDRs (Light Dependent Resistors), are among the simplest light sensors. Their electrical resistance decreases when exposed to higher light intensity. By measuring this change in resistance, circuits can infer the ambient light level. Photoresistors are inexpensive, easy to use, and often found in devices like nightlights, automatic garden lamps, and simple light-following robots.
While they are low-cost and reliable for general illumination detection, photoresistors have limitations: they are relatively slow to respond to rapid changes in light and are not suitable for precise or high-speed optical measurements.
5.3.2. Photodiodes#
Photodiodes are semiconductor devices designed to generate an electrical current when exposed to light. They operate by converting photons into electron–hole pairs, producing a current that is directly proportional to the intensity of the incoming light.
Because photodiodes respond extremely quickly, on the order of nanoseconds to microseconds, they are widely used in high-speed and precision applications such as optical communication, barcode scanners, safety light curtains, and pulse detection in scientific instruments. Their linear response makes them well suited for quantitative measurements where accuracy matters more than raw sensitivity. However, photodiodes typically produce small currents (in the microampere range), which means they often need to be paired with an amplifier circuit to produce usable signals.
5.3.3. Phototransistors#
Phototransistors are semiconductor devices that act like standard transistors but with light as the input instead of electrical current at the base. When photons strike the sensor, they generate electron–hole pairs that allow current to flow, effectively amplifying the light signal.
Compared to photoresistors, phototransistors offer faster response times and higher sensitivity, making them useful for applications such as optical encoders, IR communication, line-following robots, and light barriers in automation systems. Because they actively amplify the light signal, phototransistors can detect lower light levels and respond more accurately to quick changes.