Photoresistor (LDR)
A light-dependent resistor (LDR). Resistance decreases with increasing light intensity. Use for light-sensing projects like automatic lights.
Overview
A photoresistor changes its resistance based on the amount of light hitting its surface. In darkness, resistance is very high (around 1 megaohm); in bright light, it drops to around 10 kilohms. By using a voltage divider circuit, you can read the light level as an analog value (0-1023) on the Arduino.
Specifications
| Parameter | Value |
|---|---|
| Dark Resistance | ~1M ohm |
| Light Resistance | ~10k ohm |
| Max Voltage | 5V |
Wiring Guide
| Connection | Arduino Pin |
|---|---|
| One leg | 5V |
| Other leg | Analog pin (A0-A5) AND to GND through 10k-ohm resistor |
This forms a voltage divider. Read the analog pin with analogRead() to get a 0-1023 value proportional to light intensity.
Usage in ArduinoStudio
Drag the Photoresistor component onto the canvas, assign an analog pin, and use sensor-data events in your sequence to react to light levels. Combine with an LED to build an automatic night light.