A photoresistor—formally known as a Light Dependent Resistor (LDR) or photocell—works via internal photoconductivity. When photons strike the semiconductor material (usually Cadmium Sulfide, CdS), they excite electrons across the material's bandgap into the conduction band, drastically lowering its electrical resistance. In total darkness, a typical LDR exhibits a resistance greater than 1MΩ. Under bright room light (100 lux), that resistance plummets to 1kΩ–5kΩ. For 90% of hobbyist, Arduino, and DIY ambient light-sensing tasks, the GL5528 (10-20kΩ at 10 lux) is the default, most reliable pick.
The Physics: Bandgaps and Response Hysteresis
To understand how photoresistors work at the silicon level, you have to look at the bandgap. CdS has a bandgap energy of roughly 2.4 eV, which perfectly aligns with the energy of visible light photons (specifically the green/yellow spectrum, peaking around 540nm). When a photon with sufficient energy hits the CdS lattice, it frees an electron, creating an electron-hole pair that facilitates current flow.
However, this physical process is inherently slow. When the light source is removed, the electrons must recombine with the holes to restore the high-resistance state. This recombination takes time, resulting in a response time of 20ms to 50ms. Worse, LDRs suffer from 'memory effect' or hysteresis. If an LDR sits in total darkness for hours and is suddenly exposed to light, it can take several seconds for the resistance to stabilize at its true illuminated value. According to All About Circuits, this makes LDRs excellent for slow-changing ambient light detection (like streetlamp triggers) but useless for high-speed optical data transmission or tachometers.
Decoding LDR Markings and Physical Specs
Unlike standard resistors, LDRs do not use color bands. Instead, manufacturers stamp a 4-digit (or sometimes 5-digit) alphanumeric code on the epoxy backing, or rely on the physical diameter to denote the series. Here is how to read the physical part in your hand:
- First two digits (Size): Represents the diameter of the active zig-zag pattern in millimeters. '55' means roughly 5mm. '125' means 12mm.
- Last two digits (Resistance Curve): Indicates the specific resistance profile at a standard test illuminance (usually 10 lux).
| Marking Code | Diameter | Resistance @ 10 Lux | Dark Resistance (Min) | Best Application |
|---|---|---|---|---|
| GL5516 | 5mm | 5 - 10 kΩ | > 0.5 MΩ | High-sensitivity indoor triggers |
| GL5528 | 5mm | 10 - 20 kΩ | > 1.0 MΩ | General purpose ambient sensing |
| GL5537-1 | 5mm | 20 - 30 kΩ | > 2.0 MΩ | Outdoor daylight tracking |
| GL5539 | 5mm | 50 - 100 kΩ | > 5.0 MΩ | Low-light / dusk detection circuits |
Material Comparison: Which Sensor for Which Job?
While CdS is the undisputed king of cheap ambient light sensing, it is not the only photoconductive material available. As of 2026, environmental regulations (RoHS) have restricted cadmium in commercial consumer electronics, pushing industrial designs toward silicon photodiodes, though CdS remains widely available for DIY and prototyping.
| Sensor Type | Material / Construction | Tolerance / Linearity | Tempco / Temp Range | Typical Use Case |
|---|---|---|---|---|
| CdS Photoresistor | Cadmium Sulfide ceramic on substrate | ±30% part-to-part variance; Non-linear | Negative tempco; -30°C to +70°C | Streetlights, nightlights, solar garden lamps |
| PbS Photoresistor | Lead Sulfide thin film | ±20% variance; Moderate linearity | Highly temp-dependent; requires cooling | Infrared spectroscopy, flame detection |
| Silicon Photodiode | P-N junction in reverse bias | ±2% variance; Highly linear to irradiance | Stable; -40°C to +100°C | Precision lux meters, fiber optic receivers |
| Phototransistor | NPN/PNP with light-exposed base | ±15% variance; Moderate linearity | Stable; -40°C to +85°C | Optocouplers, IR remote receivers, encoders |
Failure Modes and Visual Symptoms
Photoresistors are passive, but they are not indestructible. When an LDR fails on the bench, it usually fails 'short' (dark resistance drops permanently) rather than 'open'. Here is what to look for when troubleshooting a dead light-sensing circuit:
1. Thermal Runaway (Overcurrent)
Visual Symptom: The orange/red epoxy coating is blistered, cracked, or blackened in the center. The leads may show heat discoloration.
Cause: Exceeding the power dissipation limit. A standard 5mm LDR is rated for roughly 100mW. If you connect it directly across a 5V rail without a series resistor, the low illuminated resistance (e.g., 1kΩ) will dissipate $P = V^2 / R = 25mW$, which is safe. But if a short circuit occurs elsewhere, or if used in a 12V/24V system without proper current limiting, the junction overheats and melts the binder.
2. Moisture Ingress and Silver Migration
Visual Symptom: A white, green, or grey crust forms on the leads or creeps under the epoxy edge.
Cause: LDRs are constructed with interdigitated silver electrodes. In high-humidity environments with a constant DC bias, silver ions migrate across the substrate. This creates a permanent, low-resistance parallel path, destroying the sensor's ability to block current in the dark.
3. UV Fatigue (Cadmium Degradation)
Visual Symptom: The part looks physically perfect, but the dark resistance has degraded from >1MΩ to ~100kΩ over several months.
Cause: Prolonged exposure to direct, unfiltered sunlight (high UV) permanently alters the crystalline structure of the CdS layer. Adafruit's Photocell Guide notes that for outdoor solar-tracking applications, LDRs should be shielded with a UV-blocking acrylic diffuser to extend their lifespan.
Substitution Rules and Circuit Design
Because LDRs are highly non-linear and have massive part-to-part tolerances (often ±30%), you cannot simply swap a 5516 for a 5539 without adjusting your surrounding circuitry. The standard way to interface an LDR with a microcontroller (like an Arduino or ESP32 ADC) is via a voltage divider.
The formula for the output voltage is:
V_out = V_cc × [ R_pull / (R_LDR + R_pull) ]
How to substitute safely:
If your schematic calls for a GL5528 (10-20kΩ at 10 lux) paired with a 10kΩ pull-down resistor, the voltage at the ADC pin will sit comfortably around 1.65V (half of 3.3V) under typical room lighting.
If you are out of 5528s and must substitute a GL5539 (50-100kΩ at 10 lux), the LDR's resistance is now roughly 4x higher. If you keep the 10kΩ pull-down, your $V_{out}$ will drop to roughly 0.5V, compressing your ADC resolution and making the circuit overly sensitive to darkness while saturating in bright light. The fix: Swap the 10kΩ pull-down resistor for a 47kΩ resistor. This re-centers your voltage divider midpoint, restoring the full 0-3.3V sweep across the ADC.
Decision Tree: Which Light Sensor Should You Buy?
Stop guessing based on whatever is in your junk bin. Use this decision matrix to select the exact part number for your next project.
| Your Project Requirement | Why Standard LDRs Fail Here | Concrete Part Pick |
|---|---|---|
| Measuring fast light pulses (e.g., tachometer, RPM counter, fiber optic data) | CdS response time (20ms+) will blur pulses; max frequency is ~20Hz. | BPW34 Silicon PIN Photodiode (Response time: nanoseconds. Pair with a transimpedance op-amp like the LM358). |
| Detecting IR remote controls or breaking an invisible beam for security | CdS is blind to 940nm infrared light; it only reacts to visible spectrums. | VS1838B 38kHz IR Receiver (for remotes) or BPW85B IR Phototransistor (for beam breaks). |
| Precision Lux Metering for photography or plant grow-tents | LDRs have a ±30% tolerance and severe temperature drift; they cannot be calibrated to absolute lux. | OPT3001 Digital Ambient Light Sensor (I2C breakout, 23-bit resolution, matches human eye response curve). |
| Triggering a relay at dusk / Solar garden lamp / Nightlight (Slow, cheap, simple) | N/A. This is exactly what LDRs were engineered to do. | GL5528 CdS Photoresistor (Use with a 10kΩ pull-down and an LM393 comparator or Arduino ADC). |
The Default Recommendation: If your project simply needs to know 'is it light or dark in the room?' and does not require microsecond timing or absolute lux calibration, buy a bulk pack of GL5528 photoresistors. At roughly $0.05 per unit, they offer the simplest, most forgiving analog interface for microcontrollers, requiring nothing more than a single pull-down resistor to get you up and running.






