Overview

LDR (Light Dependent Resistor) is a photoresistor that changes its resistance based on light intensity. It's perfect for automatic lighting systems, day/night detection, and light-sensitive applications. The resistance decreases as light intensity increases, making it ideal for creating light-activated switches and brightness control systems.

Technical Specifications

Operating Voltage: 3V - 5V DC
Dark Resistance: 1 MΩ – 10 MΩ
Light Resistance: 1 kΩ – 10 kΩ
Spectral Peak: 540nm (Green Light)
Response Time: 20-30ms (rise), 30ms (fall)
Operating Temperature: −30 °C to +70 °C
Power Dissipation: 100mW
Diameter: 5mm - 20mm

Key Features

  • Variable resistance based on light intensity
  • Wide resistance range (1kO to 10MO)
  • Fast response to light changes
  • Low cost and simple to use
  • No external power supply required
  • Wide operating temperature range
  • Compact size for easy integration
  • Long lifespan and reliability

Wiring Diagram

Basic Connection (Arduino Uno)

LDR Connection Arduino Pin
LDR Pin 1 5V
LDR Pin 2 Analog Pin A0
10kΩ Resistor A0 to GND

Note: Use a 10 kΩ pull-down resistor to create a voltage divider circuit for analog reading.

Common Applications

Automatic Night Lamps

Street lights and garden lights that turn on at dusk

Light Meters

Photography and environmental light measurement

Security Systems

Light-based intrusion detection systems

Display Brightness Control

Automatic screen brightness adjustment

Quick Info

Difficulty: Beginner
Price Range: ₹30-100
Interface: Analog (Resistive)

Sample Code

#define LDR_PIN A0
#define LED_PIN 13
#define THRESHOLD 500

void setup() {
  Serial.begin(9600);
  pinMode(LED_PIN, OUTPUT);
  
  Serial.println("LDR Light Sensor Test");
}

void loop() {
  int lightValue = analogRead(LDR_PIN);
  
  Serial.print("Light Level: ");
  Serial.println(lightValue);
  
  if (lightValue < THRESHOLD) {
    digitalWrite(LED_PIN, HIGH);
    Serial.println("Dark - LED ON");
  } else {
    digitalWrite(LED_PIN, LOW);
    Serial.println("Bright - LED OFF");
  }
  
  delay(500);
}