What Is a Light / Color Sensor?
A light sensor measures the light intensity in the environment, and a color sensor measures the color of objects; both are sensors. Both are based on the photodiode.
How Does It Work?
Inside them there are light-sensitive photodiode(s). In color sensors, diodes with red/green/blue filters are read separately to determine the components of the color (e.g. the TCS3200).
Difference From an LDR
| Property | LDR | Light sensor IC |
|---|---|---|
| Speed | Slow | Fast |
| Output | Analog resistance | Digital (I2C) |
| Accuracy | Coarse | Calibrated |
Where Is It Used?
Phone/screen auto-brightness, smart lighting, color sorting (recycling, printing) and line-following robots.
Light Unit: Lux
Ambient light intensity is measured in lux. Digital light sensors (e.g. the BH1750) give the light directly in lux; this is a calibrated value close to the brightness the human eye perceives and far more useful than an LDR's raw resistance.
Common Mistakes
- Not isolating ambient light: stray light corrupts the color reading; most color sensors use their own LED.
- Skipping calibration: color measurement should be calibrated with a white/black reference.
- Expecting speed from an LDR: for a fast response an IC sensor is needed.
Frequently Asked Questions
How does a color sensor find color?+
How is phone brightness adjusted?+
Search parts related to "What Is a Light / Color Sensor?"
Find the right part by comparing price, stock and distributors.