Components / Sensors / LDR Photoresistor

LDR Photoresistor

Resistance changes with incident light.

MeasuresLight level (resistance falls as light rises)
RangeAbout 10 to 20 kΩ in room light; 1 MΩ or more in darkness (GL5528)
AccuracyNot calibrated; good for relative light
InterfaceAnalog, in a voltage divider
SensorsReviewedMPN GL5528Used in 74 projects
In short

What is the LDR Photoresistor and what is it used for?

Resistance changes with incident light. Makers use it to make a light-triggered LED.

Classic CdS cells contain cadmium and are restricted under RoHS in some markets.
In the real world

Ambient light detection

How it works

Sensors convert a physical quantity into an electrical signal. Calibrate, verify module supply, interfaces and environmental limits.

Key specifications

Sensor specValue
MeasuresLight level (resistance falls as light rises)
RangeAbout 10 to 20 kΩ in room light; 1 MΩ or more in darkness (GL5528)
AccuracyNot calibrated; good for relative light
InterfaceAnalog, in a voltage divider
Supply voltageAny, through a divider
Operating temperature−30 to 70 °C

Pinout

Either leadNo polarity: one side to VCC, other side to the analog pin with 10 kΩ to GND

How to use it

Make a divider with a 10 kΩ resistor and read the middle with analogRead. Brighter light gives a higher reading in this wiring. Slow to react (tens of ms).

void setup() { Serial.begin(9600); }
void loop() { Serial.println(analogRead(A0)); delay(200); }

Applications

Buy at

Common questions

What is the LDR Photoresistor used for?

In products: ambient light detection. In maker projects: make a light-triggered LED.

How does the LDR Photoresistor work?

Sensors convert a physical quantity into an electrical signal. Calibrate, verify module supply, interfaces and environmental limits.

What voltage does the LDR Photoresistor need?

Any, through a divider.

How do I connect the LDR Photoresistor to an Arduino or ESP32?

Analog, in a voltage divider. Pins: Either lead (No polarity: one side to VCC, other side to the analog pin with 10 kΩ to GND).