Skip to Content
Circuitera

Cadmium-sulfide photoresistor

Build a relative light detector with a photoresistor, estimate a useful fixed divider resistor and understand why raw readings are not calibrated lux.

Cadmium-sulfide photoresistor photograph
GL5528 photoresistors 01.jpg by Retired electrician · CC0. Resized and encoded as WebP without cropping.

How it works

A cadmium-sulfide photocell changes resistance with illumination. The resistance typically decreases under brighter light, so it can be used to distinguish changes such as a room light turning on.

Source: Adafruit

Typical wiring

Put a fixed resistor and photocell in series between a suitable supply and ground, then read their junction with an ADC. Reversing their order reverses the direction the measured voltage moves with brightness.

Source: Adafruit

Interpreting readings

Two photocells can respond differently across both brightness and wavelength. A simple ADC count is useful for a threshold or trend; measuring absolute lux requires calibration and a suitable sensor response.

Source: Adafruit

Specifications

ParameterValue or conditionSource
TerminalsTwo nonpolarized leadsAdafruit
Output in dividerAnalog voltage, affected by fixed-resistor choice and supplyAdafruit

Compatibility and practice

Use an ADC and divider powered within your board’s analog input range.

Sources and datasheets