Adafruit
Photo cell (CdS photoresistor)
CdS cells are little light sensors. As the squiggly face is exposed to more light, the resistance goes down. When its light, the resistance is about 5-10K...
Get notified when back in stock
CdS cells are little light sensors. As the squiggly face is exposed to more light, the resistance goes down. When its light, the resistance is about 5-10KΩ, when dark it goes up to 200KΩ.
To use, connect one side of the photo cell (either one, its symmetric) to power (for example 5V) and the other side to your microcontroller's analog input pin. Then connect a 10K pull-down resistor from that analog pin to ground. The voltage on the pin will be 2.5V or higher when its light out and near ground when its dark.
CdS photocells are not RoHS compliant, so if you need something equivalent but RoHS compiant, check out the photo transistor.
For a full tutorial with wiring diagrams, code examples and project ideas, please read the photocell tutorial page!
Jargon buster
Plain-language definitions for the technical terms used above.
- microcontroller
- A microcontroller is a small computer on a single chip that runs a stored program and controls connected inputs and outputs such as buttons, sensors, displays and communication interfaces. In a device built around one, it is the part that executes the code and coordinates the device's behaviour.
- photocell
- A light-sensitive component whose electrical resistance changes with the amount of light falling on it. It matters when choosing or using light sensors, automatic lights, or brightness-detecting circuits because its response speed, resistance range, and sensitivity affect how reliably it detects light levels.
Find this product in
Brands
Sensors & Input
Related Tutorials
Free guides on learn.littlebird.com.au