A photoresistor (also known as a Light Dependent Resistor or LDR) is a passive, two-terminal semiconductor component whose electrical resistance decreases as incident light intensity increases. If you just need the quick answer for a standard visible-light sensing project (like an automatic night-light or Arduino sun-tracker): buy a 5mm Cadmium Sulfide (CdS) GL5528. It offers a reliable 10-20kΩ resistance at 10 lux (twilight) and drops to 1-2kΩ at 100 lux (overcast day), pairing perfectly with a standard 10kΩ pull-down resistor in a 5V voltage divider.
But moving beyond the textbook photoresistor definition requires understanding material physics, thermal limitations, and how to read the unstandardized markings on these components. Here is the bench-level deep dive you need to select, test, and substitute LDRs in real-world circuits.
The Practical Photoresistor Definition: Physics and Bench Behavior
At the silicon level, an LDR relies on the internal photoelectric effect. The component consists of a high-resistance semiconductor track (usually laid out in a zig-zag pattern to maximize length while minimizing footprint) deposited on a ceramic substrate. When photons with sufficient energy strike the semiconductor lattice, they excite bound electrons into the conduction band. This creates electron-hole pairs, drastically increasing conductivity and dropping the measured resistance.
Worked Numeric Example:
Imagine a CdS cell in a voltage divider with a 5V source ($V_{in}$) and a 10kΩ fixed resistor ($R_{fixed}$) to ground. We measure $V_{out}$ across the fixed resistor.
Formula: $V_{out} = V_{in} \times \frac{R_{fixed}}{R_{LDR} + R_{fixed}}$
- Total Darkness (0 lux): $R_{LDR}$ = 1MΩ. $V_{out} = 5 \times \frac{10,000}{1,000,000 + 10,000} \approx 0.05V$. (Reads as logic LOW).
- Bright Sunlight (10,000 lux): $R_{LDR}$ = 500Ω. $V_{out} = 5 \times \frac{10,000}{500 + 10,000} \approx 4.76V$. (Reads as logic HIGH).
Unlike photodiodes or phototransistors, photoresistors are notoriously slow. The "latency" (response time) of a standard CdS cell is between 20ms and 50ms for resistance decay, and can take several seconds to fully recover to dark resistance. They are strictly for ambient light tracking, not high-speed optical data transmission.
Material and Type Comparison: Which LDR for Which Job?
Not all photoresistors react to the same light spectrum. The semiconductor material dictates the spectral response, temperature stability, and regulatory compliance. Here is how the three main types stack up on the bench.
| Material | Construction / Package | Tolerance & Tempco | Spectral Peak | Typical Use Case |
|---|---|---|---|---|
| Cadmium Sulfide (CdS) | Zig-zag track on alumina ceramic, epoxy or glass-sealed dome. | ±30% at 10 lux. Negative Tempco (resistance drops as heat rises). | ~540 nm (Visible Green/Yellow) | Streetlights, camera exposure meters, night-lights, Arduino hobby projects. |
| Lead Sulfide (PbS) | Thin film on glass, often housed in TO-18 metal cans with IR-pass filters. | ±20%. Highly temperature-sensitive; often requires thermoelectric cooling for precision. | ~2.0 µm (Short-wave IR) | Flame detection, IR spectroscopy, missile warning receivers. |
| Indium Gallium Arsenide (InGaAs) | Epitaxial layer on InP substrate, hermetically sealed TO-can. | ±10%. Moderate negative tempco, but vastly superior thermal stability to PbS. | ~1.7 µm (Near-IR) | Fiber optic power monitoring, high-speed IR sensing (when reverse-biased as a photoconductor). |
Cadmium is a restricted heavy metal under the EU RoHS directive. If you are designing a consumer product for the European market, you cannot use standard CdS photoresistors. You must substitute them with RoHS-compliant ambient light sensor ICs (like the Vishay VEML7700) or amorphous silicon phototransistors. For hobbyist, educational, or internal prototyping, CdS remains legal and widely available.
Decoding the Markings: How to Read Physical LDR Codes
Unlike standard resistors, LDRs do not use EIA color bands. Because their resistance spans several orders of magnitude, printing a static value on the case is useless. Instead, manufacturers use a combination of physical diameter and alphanumeric series codes.
The Physical Diameter Rule:
The physical width of the sensor directly correlates to its maximum voltage and power dissipation. More surface area means better heat dissipation.
- 4mm / 5mm: Max 150V DC/AC, 100mW dissipation. (Standard for 3.3V/5V logic and 12V circuits).
- 7mm / 12mm: Max 250V DC/AC, 250mW dissipation. (Used for direct 120V/240V mains switching via TRIACs).
- 20mm+: Max 500V, 500mW+. (Industrial and high-power lighting control).
The GL55 Series Nomenclature:
The most common hobbyist parts follow the "GL55XX" naming convention (originally popularized by Asian manufacturers and now an industry standard). Here is how to read the suffix:
- GL5516: Low light resistance. ~5-10kΩ at 10 lux. Best for bright environments.
- GL5528: The goldilocks standard. ~10-20kΩ at 10 lux. Best for general indoor/outdoor transitions.
- GL5537-1 / 5537-2: High dark resistance, higher voltage handling. Used in mains-voltage dusk-to-dawn controllers.
Failure Modes and Visual Symptoms
Photoresistors are rugged, but they are not invincible. When they fail, they rarely fail short; they usually fail open or drift out of spec. Here is what to look for when debugging a dead light-sensing circuit.
- Thermal Runaway (Overcurrent): Visual Symptom: The epoxy dome is melted, bubbled, or charred black. The ceramic substrate may have a visible hairline fracture. Cause: Exceeding the 100mW power rating. Because CdS has a negative temperature coefficient, as the part heats up, its resistance drops, causing it to draw more current, heat up further, and eventually burn out. Always use a series current-limiting resistor if connecting to low-impedance voltage sources.
- UV Degradation (The "Memory Effect"): Visual Symptom: The clear epoxy has turned opaque yellow or brown. Cause: Prolonged exposure to direct, unfiltered ultraviolet sunlight degrades the chemical structure of the CdS lattice. The sensor develops hysteresis; it will drop resistance in light, but will take hours (or never fully) return to its mega-ohm dark baseline. Fix: Use sensors with built-in UV-blocking glass or epoxy for permanent outdoor installations.
- Moisture Ingress and Contact Corrosion: Visual Symptom: White or green crusty oxidation visible on the silver interdigitated fingers under the epoxy, or rust on the tinned copper pigtails. Cause: Operating in high-humidity environments without conformal coating. Moisture creates parallel leakage paths across the ceramic, causing erratic, jumping resistance readings that mimic electrical noise.
The Substitution Matrix: Swapping Parts Safely
What do you do when the exact LDR specified in a schematic is out of stock? Because LDRs have massive manufacturing tolerances (±30% or more), exact 1:1 substitutions are rarely necessary. Follow these rules to substitute safely:
1. Match the Light Resistance, Ignore the Dark Resistance
In a standard voltage divider, the microcontroller's ADC triggers at a specific voltage threshold. This threshold is almost always crossed during the illuminated state, not the dark state (where the voltage is already pinned near 0V). If your schematic calls for a 10kΩ (at 10 lux) sensor, but you only have 5kΩ sensors, simply put two 5kΩ LDRs in series. Do not put them in parallel; mismatched thermal coefficients will cause one to hog the current and fail.
2. Adjust the Fixed Resistor (The Better Method)
Instead of mangling LDRs, change the fixed pull-down/pull-up resistor. If you substitute a GL5516 (lower resistance) for a GL5528, drop your fixed resistor from 10kΩ to 4.7kΩ. This shifts the voltage divider curve back to the center of your ADC range.
3. Swapping to a Phototransistor for Speed or RoHS
If you need faster response times (under 1ms) or must pass RoHS, substitute the LDR with an NPN phototransistor like the BPW85B. Wire the collector to VCC, the emitter to a 100kΩ pull-down resistor to ground, and tap your signal from the emitter. The light-to-current transfer function is linear, unlike the logarithmic curve of an LDR, so you will need to adjust your microcontroller's threshold logic accordingly.
Decision Tree: Pick Your Exact Part Number
Stop guessing. Use this decision matrix to select the exact component for your BOM based on your environmental and electrical constraints.
| If your application requires... | And your circuit operates at... | Then buy this exact part number |
|---|---|---|
| General indoor/outdoor visible light sensing (dusk-to-dawn, nightlights) | 3.3V or 5V DC (Microcontroller / Arduino) | GL5528 (5mm diameter, 10-20kΩ @ 10 lux) |
| High-sensitivity visible light (needs to trigger in deep shade or dim rooms) | 3.3V or 5V DC | GL5539 (7mm diameter, 30-90kΩ @ 10 lux) |
| Direct mains voltage switching (driving a TRIAC or relay coil directly) | 120V AC or 240V AC | GL5537-2 (12mm diameter, 250V max, 18-50kΩ @ 10 lux) |
| Infrared flame detection (sensing 1µm - 3µm emissions) | 5V to 12V DC (Analog amplifier circuit) | P963 PbS Cell (TO-18 package, peak sensitivity at 2.0µm) |
| EU Commercial Product (Must pass RoHS, fast response needed) | 3.3V DC (I2C or Analog) | VEML7700 (Ambient Light Sensor IC) or BPW85B (Phototransistor) |
The Final Verdict: For 90% of hobbyist, student, and prototype visible-light applications, buy a bulk pack of GL5528 sensors. Pair them with a 10kΩ 1/4W carbon film fixed resistor, feed the divider into your microcontroller's ADC, and add a 0.1µF ceramic capacitor in parallel with the fixed resistor to filter out high-frequency optical noise from fluorescent and LED room lighting. For deeper integration into modern, high-speed, or commercially compliant optical systems, abandon the passive LDR entirely and move to active silicon phototransistors or dedicated I2C ambient light ICs.
References and further reading: Adafruit Industries: Photocells Tutorial, Vishay Semiconductors: Ambient Light Sensors and LDR Specifications.






