GL5528 LDR

A 5mm CdS photoresistor whose resistance drops from about 1 MΩ in darkness to roughly 8-20 kΩ under 10 lux of light.

GL5528 LDR: Photoresistor light sensing

What is the GL5528 LDR?

The GL5528 is a cadmium sulfide (CdS) photoconductive cell: a passive, two-terminal light sensor in a 5mm epoxy-coated through-hole package. Its resistance falls as incident light rises, from a dark resistance of about 1 MΩ (minimum, at 0 lux) down to roughly 8-20 kΩ at 10 lux. It is non-polarized, so either lead can face either way in a circuit.

Its spectral response peaks near 540 nm (green light), close to the sensitivity of the human eye, which makes it a good match for sensing ambient visible light. The response is nonlinear, following a log-log resistance-versus-illuminance curve with a gamma of about 0.7 between 100 and 10 lux, and it is relatively slow compared to a photodiode, with a rise time around 20 ms and a decay time around 30 ms.

The cell is rated for up to 100 mW dissipation, a maximum of 150 V, and an operating range of roughly -30 to +70 degrees C. In practice it is wired as one arm of a voltage divider feeding an analog input, giving a cheap and simple way to detect light thresholds rather than perform precise photometry. Note that CdS cells contain cadmium and may be restricted under RoHS in some regions.

Specifications

Dimensions
4.3 × 5.1 × 2.4 mm

Verified from the Tinkered component library · Generic.

Circuit requirements

  • The GL5528 is a passive resistor with no power pins and no polarity. Wire it as one half of a voltage divider with a fixed resistor, taking the midpoint to an ADC (analog) input, not a digital pin.
  • A fixed divider resistor near the geometric mean of the operating resistance range gives the widest usable swing; 10 k�omega is the common general-purpose choice with a 3.3-5 V supply.
  • Read the divider output with analogRead / an ADC channel. There is no digital HIGH/LOW logic level from the cell itself; any threshold must be computed in firmware or set with a comparator.
  • At typical 3.3-5 V logic supplies the divider current stays far below the 100 mW / 150 V ratings, so no external current limiting is required beyond the divider resistor.
  • There is no warm-up sequence, but the cell settles slowly (rise about 20 ms, decay about 30 ms) and shows light-history effects, so allow settling time and avoid expecting instantaneous readings after large light changes.

Board compatibility

The GL5528 LDR connects to any of the microcontrollers supported in Tinkered.

Common GL5528 LDR mistakes

Wiring it to a digital pin

The GL5528 outputs a varying resistance, not a logic level. Connecting it directly to a digital input gives an unreliable reading. Build a voltage divider with a fixed resistor and read the midpoint on an analog (ADC) input.

Forgetting the divider resistor

Placing the LDR alone between VCC and an ADC pin leaves the input floating with no defined voltage. You need the series fixed resistor so that changing LDR resistance produces a measurable change in voltage.

Worrying about polarity

A CdS cell is non-polarized. There is no anode or cathode and no correct orientation, so time spent identifying a positive lead is wasted. Either terminal can connect to supply or to the divider node.

Expecting linear or calibrated lux

Resistance follows a nonlinear log-log curve (gamma about 0.7) and varies significantly part to part and with temperature. Use it for relative light thresholds; absolute lux requires per-unit calibration and a known reference.

Ignoring the slow response

With a decay time near 30 ms and pronounced light-history behavior, the cell lags fast changes. It is unsuitable for high-speed optical signaling or precise timing; sample after it has settled.

GL5528 LDR datasheet

Official GL5528 LDR datasheetGeneric

Popular GL5528 LDR projects

Automatic night light

Read the LDR divider and switch an LED or relay on when ambient light drops below a set threshold, turning it off again at dawn.

Dusk-to-dawn switch

Use the resistance swing between daylight and darkness to control outdoor or garden lighting without a manual switch.

Light-following robot

Compare two GL5528 dividers on left and right and steer a small robot toward the brighter side.

Auto-brightness / display dimmer

Sense room light and adjust an LED or screen backlight, dimming it in the dark and boosting it in bright conditions.

Beam-break tripwire alarm

Point a light source at the cell and trigger an alert when the beam is interrupted and the resistance jumps.

Build with the GL5528 LDR.

Drop the GL5528 LDR into a circuit, write firmware, and simulate it in your browser, then deploy to real hardware. All in one editable Tinkered project.