📖 Lesson 3.1 – What is an LDR Sensor Module?
🎯 Learning Objectives
After completing this lesson, students will be able to:
✅ Understand what an LDR Sensor Module is
✅ Understand how the module detects light
✅ Identify all four pins of the module
✅ Understand Analog Output (AO) and Digital Output (DO)
✅ Understand the sensitivity adjustment potentiometer
✅ Learn real-world applications of LDR modules
1. Introduction
Many modern systems can automatically detect day and night conditions.
Examples include:
- Automatic Street Lights
- Garden Lights
- Smart Home Lighting
- Solar Tracking Systems
- Mobile Brightness Control
These systems need a sensor that can detect the amount of light in the environment.
One of the most popular sensors used for this purpose is the:
LDR Sensor Module
In this module, we will learn how to use an LDR sensor module with Arduino UNO to create automatic lighting systems.
2. What is an LDR?
LDR stands for:
Light Dependent Resistor
An LDR changes its electrical resistance according to the amount of light falling on it.
More Light
↓
Lower Resistance
Less Light
↓
Higher Resistance
The sensor module converts these changes into signals that Arduino can easily read.
3. What is an LDR Sensor Module?
An LDR Sensor Module is a ready-made circuit board that contains:
- LDR Sensor
- LM393 Comparator IC
- Sensitivity Adjustment Potentiometer
- Indicator LEDs
- Output Pins
The module makes it easier to connect and use an LDR with Arduino.
4. Why Use an LDR Module Instead of a Raw LDR?
A raw LDR requires:
- Additional resistor
- Voltage divider circuit
- More wiring
An LDR Module already contains the necessary circuitry.
Advantages:
✅ Easy to connect
✅ Beginner friendly
✅ Adjustable sensitivity
✅ Provides both Analog and Digital outputs
5. Parts of an LDR Sensor Module
1. LDR Sensor
The round sensor located at the front.
Its job is to detect light intensity.
2. LM393 Comparator IC
This small integrated circuit processes the LDR signal.
It generates digital output based on the light level.
3. Sensitivity Potentiometer
A small blue adjustable screw.
Used to:
- Increase sensitivity
- Decrease sensitivity
- Set light detection threshold
4. Power LED
Indicates that the module is receiving power.
If this LED is ON:
The module is powered correctly.
5. Status LED
Indicates sensor detection status.
This LED changes according to light conditions.
6. Four Pins of LDR Module
Most LDR modules contain four pins.
| Pin | Function |
|---|---|
| VCC | Power Supply (5V) |
| GND | Ground |
| AO | Analog Output |
| DO | Digital Output |
7. Understanding Each Pin
VCC
Provides power to the module.
Connection:
Arduino 5V → VCC
GND
Ground connection.
Connection:
Arduino GND → GND
AO (Analog Output)
AO provides continuously changing values.
Range:
0 – 1023
when read using Arduino.
Useful when we want to know the exact light intensity.
Example:
| Condition | AO Value |
|---|---|
| Bright Light | 850–1023 |
| Room Light | 400–700 |
| Dark Room | 0–300 |
DO (Digital Output)
DO provides only two states:
HIGH
or
LOW
Used for automatic ON/OFF applications.
Example:
- Day → HIGH
- Night → LOW
(Depends on module adjustment)
8. AO vs DO
| Feature | AO | DO |
|---|---|---|
| Output Type | Analog | Digital |
| Value Range | 0–1023 | HIGH / LOW |
| Accuracy | High | Basic |
| Arduino Function | analogRead() | digitalRead() |
| Best For | Measuring Light | ON/OFF Detection |
9. Sensitivity Adjustment
The blue potentiometer allows you to set the detection threshold.
You can rotate it using a small screwdriver.
Clockwise
May increase sensitivity.
Anti-Clockwise
May decrease sensitivity.
This adjustment determines when the digital output changes state.
10. How the Module Works
Bright Light
Light falls on LDR
↓
LDR resistance decreases
↓
Module output changes
↓
Arduino reads high light level
Darkness
Less light reaches LDR
↓
Resistance increases
↓
Module output changes
↓
Arduino detects darkness
11. Real-Life Example
Imagine an automatic street light.
During Day:
Bright Light
↓
LDR Detects Light
↓
Street Light OFF
During Night:
Darkness
↓
LDR Detects Low Light
↓
Street Light ON
This is exactly what we will build in this module.
12. Applications of LDR Module
Automatic Street Lights
Lights turn ON automatically at night.
Garden Lighting
Garden lamps work automatically.
Smart Home Automation
Room lights respond to light conditions.
Solar Tracking Systems
Solar panels follow sunlight.
Mobile Brightness Control
Adjusts screen brightness automatically.
Security Systems
Detects sudden changes in light.
13. Advantages of LDR Module
Easy Wiring
Only four connections.
Low Cost
Very affordable.
Beginner Friendly
Perfect for learning sensors.
Adjustable Sensitivity
Can be calibrated easily.
Dual Output
Analog and Digital outputs available.
14. Limitations
Affected by Environment
Different rooms produce different readings.
Slower than Advanced Sensors
Not suitable for very high-speed applications.
Requires Calibration
Threshold may need adjustment.
15. Common Beginner Mistakes
Mistake 1
Connecting VCC and GND incorrectly.
Mistake 2
Using AO pin with digitalRead().
AO should use:
analogRead()
Mistake 3
Using DO pin with analogRead().
DO should use:
digitalRead()
Mistake 4
Ignoring sensitivity adjustment.
Always calibrate the module before testing.
📊 Summary
In this lesson, we learned:
✅ What an LDR Sensor Module is
✅ Full form of LDR
✅ Components present on the module
✅ Functions of VCC, GND, AO, and DO pins
✅ Difference between Analog and Digital outputs
✅ Sensitivity adjustment
✅ Real-world applications
The LDR Sensor Module is one of the easiest and most useful sensors for building automatic lighting and smart automation projects.
📖 Key Terms
LDR
Light Dependent Resistor
AO
Analog Output
DO
Digital Output
LM393
Comparator IC used in the module
Potentiometer
Adjusts sensitivity
Threshold
The light level at which output changes state
🎯 Quiz
1. What does LDR stand for?
A. Light Data Resistor
B. Light Dependent Resistor ✅
C. Low Digital Resistor
D. Light Detection Relay
2. Which pin provides analog output?
A. VCC
B. GND
C. AO ✅
D. DO
3. Which pin provides digital output?
A. AO
B. DO ✅
C. VCC
D. GND
4. Which IC is commonly used on an LDR module?
A. ATmega328P
B. LM393 ✅
C. ESP32
D. NE555
5. What is the purpose of the potentiometer?
A. Supply power
B. Store data
C. Adjust sensitivity ✅
D. Upload code
🏠 Assignment
Task 1
Draw and label the four pins of the LDR Sensor Module.
Task 2
Explain the difference between AO and DO outputs.
Task 3
List five applications of an LDR Sensor Module.
Task 4
Identify the components present on your LDR module.
Task 5
Observe light conditions in your room and explain how the LDR module would respond during morning, afternoon, evening, and night.