A photoresistor, formally known as a Light Dependent Resistor (LDR), works via the internal photoelectric effect. When photons with sufficient energy strike the semiconductor material—typically Cadmium Sulfide (CdS)—they excite electrons from the valence band into the conduction band. This generation of electron-hole pairs drastically lowers the material's electrical resistance. In total darkness, a standard 5mm CdS LDR like the GL5528 exhibits a resistance of 1 MΩ to 2 MΩ. Under bright room light (roughly 100 lux), that resistance drops to 5 kΩ, and under direct sunlight (10,000+ lux), it can fall below 1 kΩ. Unlike photodiodes or phototransistors, photoresistors are purely passive, bidirectional components with no PN junction, meaning they can be placed in a circuit without worrying about polarity or forward voltage drops.

The Physics and Spec Sheet: How Photoresistors Actually Work

The conductivity of an LDR is inversely proportional to the logarithm of the incident light intensity. This relationship is defined by the component's gamma ($\gamma$) value, which dictates the slope of the resistance-to-illuminance curve. A higher gamma means a steeper drop in resistance as light increases, providing better contrast for threshold switching but a narrower useful measurement range. Because the semiconductor track is physically printed in a zig-zag pattern on a ceramic substrate to maximize surface area and length, the physical size of the LDR directly dictates its power dissipation capability and baseline dark resistance.

RoHS and Cadmium Warning: Standard CdS photoresistors contain cadmium, a toxic heavy metal restricted under RoHS directives in commercial electronics. For new commercial designs, consider substituting CdS LDRs with ambient light sensor (ALS) ICs like the Vishay VEML7700 or photodiodes. For hobbyist, educational, or legacy repair work, CdS LDRs remain widely available and safe to handle provided the epoxy casing remains intact.

When selecting an LDR, you must look beyond a single 'light resistance' figure. The table below provides real-world datasheet values for the most common through-hole LDRs used in DIY and prototyping environments.

Table 1: Spec Sheet Data for Common CdS Photoresistors
Part Number Diameter Dark Resistance (MΩ) 10-Lux Resistance (kΩ) Peak Wavelength (nm) Rise/Decay Time (ms)
GL5516 5 mm 0.5 - 1.2 5 - 10 540 20 / 30
GL5528 5 mm 1.0 - 2.0 10 - 20 540 20 / 30
GL5537-1 5 mm 3.0 - 9.0 20 - 30 540 30 / 40
VT90N1 9 mm > 20.0 60 - 150 520 5 / 10
PDV-P9203 12 mm > 50.0 1.5 - 3.0 515 5 / 8

Material and Type Comparison: Which LDR for Which Job?

While Cadmium Sulfide (CdS) dominates the hobbyist market due to its alignment with the human eye's spectral sensitivity, other semiconductor materials are required for specialized industrial and scientific applications. Choosing the wrong material means your sensor will be entirely blind to the light source you are trying to measure.

Table 2: Photoresistor Material and Type Comparison
Material Spectral Range Construction Tolerance Tempco Typical Use
CdS (Cadmium Sulfide) 400 - 700 nm (Visible) Epoxy dome, ceramic sub ±20% to ±50% -0.5%/°C Streetlights, camera exposure, nightlights
PbS (Lead Sulfide) 1000 - 3500 nm (Near-IR) Hermetic TO-can, glass window ±10% Highly temp-dependent Flame detection, IR spectroscopy
InSb (Indium Antimonide) 3000 - 5000 nm (Mid-IR) Cryogenic housing required ±5% Requires cooling Missile guidance, thermal imaging
GaP (Gallium Phosphide) 300 - 500 nm (UV/Blue) Surface mount, quartz window ±15% -0.2%/°C UV index monitoring, flame UV detection

Selection Criteria: Choose CdS when your application involves human-visible light and cost is a primary driver (e.g., automatic porch lights). Choose PbS when you need to detect heat signatures or invisible IR emissions from flames, but be prepared to implement temperature compensation in your microcontroller code, as PbS dark resistance shifts wildly with ambient temperature. Avoid raw LDRs for high-speed data transmission; their millisecond-scale latency makes them useless for fiber optics, where PIN photodiodes are mandatory.

Decoding Markings and Safe Substitution Rules

Unlike standard carbon film resistors, photoresistors do not use EIA color band codes. Reading the marking on the physical part relies on two visual cues: the alphanumeric print on the underside or leads, and the colored epoxy dot on the top face.

  • Alphanumeric Codes: Most generic Asian-manufactured CdS cells simply have the series number printed on the ceramic substrate side, such as '5528' or '5516'. Higher-end parts like the Advanced Photonix (now Excelitas) VT series will have the full part number printed on the leads or packaging.
  • Color Dot System: Manufacturers often paint a small colored dot on the top epoxy dome to indicate the resistance bin. A green dot typically designates the GL5528 series (10-20kΩ at 10 lux), while a red dot designates the GL5516 (5-10kΩ at 10 lux). A blue dot often indicates the higher-resistance GL5537 series.

How to Substitute Safely When the Exact Part is Missing

If your circuit calls for a GL5528 and you only have a GL5516, you cannot simply swap them without circuit modification. The 5516 has roughly half the resistance under illumination compared to the 5528. To substitute safely:

  1. Match the Dark-to-Light Ratio: The most critical parameter is the ratio between dark resistance and illuminated resistance. If the substitute has a lower ratio, your circuit's 'off' state might leak enough current to trigger a relay or logic gate.
  2. Recalculate the Voltage Divider: LDRs are almost always used in a voltage divider. If you substitute an LDR with a lower base resistance, you must proportionally decrease the fixed series resistor to maintain the same voltage trip-point at your microcontroller's ADC pin.
  3. Check the Power Rating: Standard 5mm LDRs are rated for roughly 100mW continuous dissipation. If substituting a smaller physical part into a circuit with a low-value series resistor, verify that $I^2R$ across the LDR does not exceed 100mW when fully illuminated, or the semiconductor track will burn out.

Failure Modes and Visual Symptoms

Photoresistors are remarkably robust, but they do fail in predictable ways when pushed outside their environmental or electrical limits. Recognizing these visual symptoms saves hours of debugging on the bench.

1. Moisture Ingress (Low Dark Resistance)
Symptom: The LDR reads 50kΩ in pitch blackness instead of the expected 1MΩ+. The epoxy dome may show micro-cracks or a cloudy, yellowed appearance.
Cause: Humidity penetrates the epoxy seal, creating a parasitic conductive path across the ceramic substrate. This is common in outdoor deployments lacking conformal coating.
2. Thermal Track Burnout (Open Circuit)
Symptom: The multimeter reads 'OL' (infinite resistance) regardless of light levels. Looking closely at the zig-zag track through the epoxy, you will see a darkened, burnt spot or a physical break in the cadmium sulfide line.
Cause: Exceeding the 100mW power rating. This happens when the LDR is exposed to bright light (dropping its resistance) while connected to a low-value series resistor across a high voltage supply.
3. The Memory Effect (Hysteresis)
Symptom: No visual damage, but the resistance reads differently when transitioning from dark-to-light versus light-to-dark. The sensor takes minutes to 'settle' into its true resistance.
Cause: Cadmium sulfide exhibits severe hysteresis. If the LDR was kept in total darkness for days, its initial resistance drop upon illumination will overshoot before settling. Always expose LDRs to ambient room light for 10 minutes before taking precise calibration readings.

Practical Circuit Design: The Geometric Mean Rule

To get the maximum voltage swing out of an LDR voltage divider feeding an Arduino or ESP32 ADC, you must choose the correct fixed series resistor ($R_s$). Many beginners simply pick a 10kΩ resistor because it is common. This is a mistake that severely limits your measurement resolution.

For maximum sensitivity across the LDR's entire operating range, the fixed resistor should be the geometric mean of the LDR's dark and light resistances:

$R_s = \sqrt{R_{dark} \times R_{light}}$

Worked Example: Using a GL5528, $R_{dark}$ is 1,000,000 Ω (1 MΩ) and $R_{light}$ (at 100 lux) is 10,000 Ω (10 kΩ).
$R_s = \sqrt{1,000,000 \times 10,000} = \sqrt{10,000,000,000} \approx 100,000 \Omega$ (100 kΩ).

By using a 100 kΩ series resistor instead of the arbitrary 10 kΩ, the output voltage of the divider will swing much closer to the supply rails at both extremes of light, giving your 10-bit or 12-bit ADC a much wider, more usable data range. For deeper integration with microcontrollers, including debouncing and hysteresis code to handle the LDR's slow decay times, refer to the SparkFun Light Sensor Hookup Guide and the foundational physics outlined by Electronics Tutorials.