GL5528 LDR Photoresistor – 5mm Light Dependent Resistor Sensor for Arduino & ESP32
The GL5528 Light Dependent Resistor (LDR) is a compact, light-sensitive electronic component whose electrical resistance changes according to the intensity of surrounding light.
Also known as a photoresistor or photocell, the GL5528 uses a photoconductive sensing element that exhibits high resistance in darkness and lower resistance when exposed to light.
Featuring a compact 5mm sensing head and two through-hole leads, the GL5528 is easy to integrate into electronic circuits, Arduino projects, ESP32 applications, automatic lighting systems, and light detection experiments.
The GL5528 is suitable for ambient light sensing, day/night detection, automatic lighting, robotics, educational electronics, and DIY automation projects.
Key Features
-
Model: GL5528 / 5528
-
Component Type: Light Dependent Resistor (LDR)
-
Sensor Technology: Photoconductive Photoresistor
-
Sensing Head Diameter: Approximately 5mm
-
Light Resistance: Typically 10–20kΩ at 10 lux
-
Dark Resistance: Typically 1MΩ or Higher
-
Peak Spectral Sensitivity: Approximately 540nm
-
Maximum Rated Voltage: 150V DC
-
Maximum Power Dissipation: 100mW
-
Response Time: Approximately 20ms Rise / 30ms Fall, Under Specified Test Conditions
- Two-Terminal Passive Component
- No Polarity Requirements
- Through-Hole Mounting
- Compatible with Arduino, ESP32, and Other Microcontrollers Through Suitable Interface Circuits
Technical Specifications
| Parameter |
Specification |
| Model |
GL5528 |
| Product Type |
Light Dependent Resistor |
| Common Name |
LDR / Photoresistor / Photocell |
| Sensor Technology |
Photoconductive |
| Sensing Head Diameter |
Approximately 5mm |
| Maximum Rated Voltage |
150V DC |
| Maximum Power Dissipation |
100mW |
| Light Resistance at 10 lux |
10–20kΩ |
| Dark Resistance |
Typically ≥1MΩ |
| Peak Spectral Sensitivity |
Approximately 540nm |
| Rise Time |
Approximately 20ms |
| Fall Time |
Approximately 30ms |
| Reference Ambient Temperature |
25°C |
| Number of Terminals |
2 |
| Polarity |
Non-Polarized |
| Mounting Type |
Through-Hole |
| Output Characteristic |
Resistance Changes with Light |
| Digital Interface |
None |
| Analog Interface |
Via External Voltage Divider |
| Operating Temperature Range |
Manufacturer Datasheet Required |
Note: Values are typical GL5528-family specifications and may vary by manufacturer, illumination conditions, and production tolerance. The 150V rating is a component maximum, not a recommended microcontroller operating voltage.
How It Works
The GL5528 operates using the photoconductive effect.
When light reaches the sensing surface, the resistance of the photoresistor decreases.
When the surrounding environment becomes darker, the resistance increases.
Light and Resistance Relationship
| Lighting Condition |
Sensor Resistance |
| Darkness |
Very High |
| Low Light |
High |
| Moderate Light |
Lower |
| Bright Light |
Low |
The relationship between light intensity and resistance is nonlinear.
For accurate light measurement, calibration is required.
Pin Configuration
The GL5528 features two electrical leads.
| Terminal |
Function |
| Lead 1 |
Photoresistor Connection |
| Lead 2 |
Photoresistor Connection |
The component is non-polarized, meaning either lead can be connected to the supply side or ground side of a suitable sensing circuit.
Arduino Connection Example
The GL5528 can be connected to an Arduino using a simple voltage divider circuit.
Required Components
- 1 × GL5528 Photoresistor
- 1 × 10kΩ Resistor
- 1 × Arduino Uno
- Jumper Wires
- Breadboard
Wiring
| Component |
Arduino Connection |
| LDR Lead 1 |
5V |
| LDR Lead 2 |
A0 |
| 10kΩ Resistor Lead 1 |
A0 |
| 10kΩ Resistor Lead 2 |
GND |
With this arrangement, the analog voltage increases as the light intensity increases.
Arduino Example Code
const int ldrPin = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
int lightValue = analogRead(ldrPin);
Serial.print("Light Sensor Value: ");
Serial.println(lightValue);
delay(200);
}
Expected Behavior
-
In darkness, the analog reading is relatively low.
-
Under brighter illumination, the analog reading increases.
-
The values can be used to control LEDs, alarms, or other electronic functions.
The readings represent relative light levels, not calibrated lux measurements.
ESP32 Compatibility
The GL5528 can be used with ESP32 development boards through a voltage divider.
For ESP32 applications:
- Use a suitable 3.3V supply.
- Connect the voltage divider midpoint to an ADC-capable GPIO.
- Ensure the ADC input voltage remains within the ESP32's permitted range.
- Adjust the resistor value if necessary for the expected lighting conditions.
A common starting point is a 10kΩ resistor, although other values may provide better sensitivity over particular light ranges.
Raspberry Pi Compatibility
The GL5528 can also be used in Raspberry Pi projects.
Because Raspberry Pi boards do not have built-in general-purpose analog inputs, an external ADC is required for analog light measurement.
Suitable ADC options include:
Alternatively, a comparator circuit can be used for simple digital light/dark detection.
Applications
- Automatic Street Lighting Projects
- Day/Night Detection
- Arduino Light Sensors
- ESP32 Smart Lighting
- Solar Tracking Experiments
- Robotics and Automation
- Light-Activated Alarms
- Electronic Toys
- Smart Home Projects
- Ambient Light Monitoring
- Educational STEM Experiments
- Electronic Prototyping
- Light-Controlled Switching Circuits
Important Notes
-
The GL5528 is a passive photoresistor, not a complete sensor module.
- It does not provide a digital output directly.
- A voltage divider or other signal-conditioning circuit is required to obtain a measurable voltage signal.
- The component does not require a dedicated power supply on its own.
- Its resistance decreases as illumination increases.
- The response is nonlinear and depends on the light spectrum and environmental conditions.
- The GL5528 is not a calibrated lux meter.
- For accurate light intensity measurements, consider a digital ambient light sensor such as the BH1750.
- The 150V maximum rating does not mean the component should be connected directly to mains voltage.
- Observe the maximum power dissipation rating.
- Avoid excessive heat during soldering.
- The component is intended for general light-sensing applications rather than precision optical measurement.
Package Includes
1 × GL5528 LDR Photoresistor – 5mm