💡 LDR Sensor Module
🎯 Lesson Objective
In this lesson, students will understand:
• What an LDR sensor is
• How an LDR sensor works
• The structure of an LDR sensor module
• How light intensity can be detected using LDR
• How LDR sensors are used in robotics and automation systems
This lesson introduces a sensor used to detect light intensity in the surrounding environment.
1️⃣ What is an LDR Sensor?
An LDR (Light Dependent Resistor) is an electronic component that changes its resistance based on the amount of light falling on it.
In simple terms:
• When the light intensity increases, the resistance of the LDR decreases.
• When the light intensity decreases, the resistance of the LDR increases.
Because of this property, LDR sensors are used to detect light levels in an environment.
LDR sensors are commonly used in systems that need to react to changes in light.
Examples include:
💡 Automatic street lights
🏠 Smart lighting systems
🌞 Solar tracking systems
🤖 Light-sensitive robots
2️⃣ How an LDR Sensor Works
The operation of an LDR is based on the principle of photoconductivity.
When light falls on the surface of the LDR:
1️⃣ Photons from the light strike the sensor surface.
2️⃣ These photons release electrons inside the material.
3️⃣ The number of free electrons increases.
4️⃣ The electrical resistance of the LDR decreases.
When the environment becomes darker, fewer electrons are released, and the resistance increases again.
This change in resistance can be measured and interpreted by the microcontroller.
3️⃣ LDR Sensor Module Components
In robotics projects, LDR sensors are often used as part of an LDR sensor module.
This module contains additional components that help the microcontroller read the sensor easily.
💡 LDR (Light Dependent Resistor)
The main sensing element that detects light intensity.
⚙️ Comparator Circuit
This circuit converts the varying analog signal from the LDR into a digital signal that the microcontroller can read.
🎚 Sensitivity Adjustment Potentiometer
A small adjustable knob is used to adjust the sensitivity of the sensor.
By turning this knob, you can control the threshold at which the sensor detects light.
💡 Indicator LED
Most LDR modules include an LED indicator that shows when the sensor detects a certain light condition.
4️⃣ LDR Sensor Pin Configuration
Most LDR sensor modules contain three pins.
🔴 VCC
Supplies power to the module.
Usually connected to 3.3V or 5V.
⚫ GND
Ground connection for the circuit.
🟡 OUT (Output Pin)
The output pin sends a signal to the microcontroller when the light level crosses the detection threshold.
The output is usually a digital signal (HIGH or LOW).
5️⃣ Detecting Light Using LDR
The LDR sensor detects light by measuring the difference between bright and dark environments.
For example:
🌞 Bright Environment
The LDR resistance becomes very low.
🌑 Dark Environment
The LDR resistance becomes high.
The microcontroller reads this change and can trigger actions based on the light level.
For example:
• Turn on a light when it becomes dark
• Activate a robot when light is detected
6️⃣ Applications of LDR Sensors
LDR sensors are widely used in automation and robotics systems.
Common applications include:
💡 Automatic street lighting systems
🏠 Smart home lighting control
🌞 Solar energy systems
🤖 Light-following or light-sensitive robots
These sensors are especially useful in projects where the system must respond to changes in environmental lighting conditions.
7️⃣ LDR Sensor in This Course
In this course, the LDR sensor will be used in the Light Sensitive Robot project.
In this robot:
• The LDR sensor detects the light intensity around the robot.
• The ESP32 processes the sensor data.
• The robot changes its behavior based on the light level.
This demonstrates how robots can react to environmental conditions automatically.
🚀 What Happens Next
Now that you understand how LDR sensors detect light intensity, the next step is to learn about another sensor used for detecting fire.