Everything You Need to Know About Light Dependent Resistors

A light dependent resistor (LDR), also called a photoresistor or light detecting resistor, is a component that changes its resistance based on the amount of light falling on it. These components are widely used in electronic circuits where automatic light detection is needed.

In this guide, we walk you through what an LDR is, how it works, and how you can use one in your own electronics projects.


Table of Contents


What Is a Light Dependent Resistor?

A light dependent resistor is a type of resistor whose resistance decreases when exposed to light and increases in darkness. This behavior makes it ideal for light-sensing applications.

Key Characteristics of LDRs

  • Made from semiconducting materials like cadmium sulfide (CdS)
  • Passive component with no polarity
  • Highly sensitive to visible light
A light dependent resistor
A Small Light Dependent Resistor used in Electronics

How Does a Photoresistor Work?

When light photons hit the surface of the LDR, they provide energy to electrons in the semiconducting material. This energy excites the electrons, allowing them to jump into the conduction band, which reduces the overall resistance of the component.

Behavior of Resistance vs. Light

  • In darkness: High resistance (can be in the megaohms range)
  • In light: Low resistance (a few hundred ohms or less)

This property allows LDRs to act as light sensors in various applications.


Light Dependent Resistor Circuit Symbol and Appearance

  • The circuit symbol for an LDR resembles a resistor with arrows pointing toward it, indicating incoming light.
  • Physically, LDRs are often round and flat with a zigzag conductive track on their surface.

The following image shows the symbol used in circuit diagrams to represent a light dependent resistor. On the left of the image is the American symbol for a LDR. Below right is the European symbol for a LDR.

Light dependent resistor circuit symbol

Applications of Light Dependent Resistors

LDRs are widely used in circuits that need to respond to changing light levels.

Common Uses

  • Street lighting systems: Automatically turn lights on at dusk and off at dawn.
  • Solar garden lights: Turn on only when it’s dark.
  • Light meters: Used in cameras and photography equipment.
  • Alarm systems: Detect changes in ambient light caused by movement.

Light dependent resistors are great for hobby circuits. The image below shows a small packet of LDRs bought for hobby use.

A packet of light dependent resistors for hobby use
A Packet of LDRs for Hobby Use

Using an LDR in a Simple Circuit

You can build a basic light sensor using:

  • 1 LDR
  • 1 fixed resistor (to form a voltage divider)
  • Arduino or any microcontroller (optional)
  • A transistor and LED (for standalone systems)

Arduino LDR Circuit Example

A light dependent resistor (LDR) is connected to an Arduino Uno board in the circuit below.

Arduino LDR circuit diagram
Arduino LDR Circuit

How It Works

The LDR and fixed resistor form a voltage divider. As light changes, the voltage at the middle of the divider changes. This voltage can then be read by a microcontroller or used to switch a transistor. In the case of the above circuit, the voltage is read on Arduino Uno analog pin A0.

Arduino LDR Sketch

Use the following basic Arduino sketch with the above circuit to get an analog reading from the LDR on Arduino analog pin A0. The sketch reads the value of the LDR voltage divider using analogRead(A0). It compares this analog value to see if it is greater than 700. If it is greater than 700, in other words dark, then the on-board Arduino LED is switched on. Adjust the value 700 to suit your LDR.

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  int sensorValue = analogRead(A0);
  if (sensorValue > 700) {
    digitalWrite(LED_BUILTIN, HIGH);
  }
  else {
    digitalWrite(LED_BUILTIN, LOW);
  }
  delay(10);
}

Photoresistor vs Photodiode vs Phototransistor

While all are light-sensitive components, they work differently:

ComponentOutputSpeedApplication
LDR (Photoresistor)ResistanceSlowGeneral light sensing
PhotodiodeCurrentFastHigh-speed detection
PhototransistorAmplified currentModerateModerate-speed circuits

Light Dependent Resistor Advantages and Limitations

Light Dependent Resistor Pros

  • Inexpensive
  • Easy to use
  • Works well for gradual light detection

Light Dependent Resistor Cons

  • Slow response time
  • Less precise than other light sensors
  • Performance varies with temperature and age

Light Dependent Resistor Conclusion

The light dependent resistor is a simple yet powerful component for detecting changes in light levels. Whether you’re building an automated night light or experimenting with DIY solar sensors, understanding how a photoresistor works is a valuable skill for any beginner in electronics.

With its affordability and ease of use, the LDR is a great starting point for learning how light affects electronic circuits.

Now that you know how a light dependent resistor works, see our other article: How Does a Resistor Work?