LM393 LDR Light Sensor Module – 3 Pin
1. What Is an LDR Light Sensor Module?
The LDR Light Sensor Module is an electronic sensor designed to detect surrounding light conditions using a Light Dependent Resistor (LDR), also known as a photoresistor.
It features an LM393 comparator circuit that converts changes in light intensity into a digital output signal based on an adjustable threshold.
The onboard potentiometer allows users to configure the light level at which the module changes its output state.
This compact 3-pin module is suitable for automatic lighting systems, robotics, environmental monitoring experiments and microcontroller-based electronics projects.
2. What Can You Build With an LDR Light Sensor Module?
This light detection sensor is suitable for applications such as:
- Automatic streetlight models
- Day and night detection systems
- Automatic night lamps
- Light-controlled electronic switches
- Light-sensitive alarm prototypes
- Smart home lighting projects
- Light-seeking robots
- Automatic garden lighting prototypes
- IoT light monitoring projects
- School science and STEM projects
- DIY electronics and automation projects
3. Who Is It For?
The LDR Light Sensor Module is suitable for:
- Beginners learning electronics
- School and engineering students
- Arduino and ESP32 enthusiasts
- Robotics hobbyists
- IoT project developers
- STEM educators and trainers
- DIY electronics makers
It is particularly useful for learning about light sensing, resistance, voltage comparators, digital inputs and electronic automation.
4. How Does an LDR Light Sensor Module Work?
An LDR is a light-sensitive electronic component whose resistance changes according to the amount of light falling on its sensing surface.
- In bright light, the resistance of the LDR decreases.
- In darkness, the resistance of the LDR increases.
The LM393 comparator compares the voltage generated by the LDR circuit with a reference voltage configured using the onboard potentiometer.
When the light level crosses the selected detection threshold, the module changes its digital output state.
Working principle:
Light Exposure → Change in LDR Resistance → Voltage Comparison → Digital Output → Microcontroller → Action
For example, a microcontroller can use the sensor’s output to automatically turn on an LED when the surroundings become dark.
5. Technical Specifications
| Specification | Details |
|---|---|
| Product Type | LDR Light Sensor Module |
| Sensing Element | Light Dependent Resistor (LDR) |
| Comparator IC | LM393 |
| Sensing Technology | Photoresistive |
| Operating Voltage | Typically 3.3–5V DC |
| Output Type | Digital |
| Output Signal | HIGH / LOW |
| Analog Output | Not available |
| Detection Threshold | Adjustable |
| Adjustment Method | Onboard potentiometer |
| Number of Pins | 3 |
| Pin Labels | DO, GND, VCC |
| Indicators | Power and digital output LEDs |
| PCB Colour | Blue |
| Mounting | PCB mounting hole |
| Application | Light detection and automatic lighting |
The operating voltage is a reference specification for standard LM393 LDR modules. Actual electrical characteristics may vary by manufacturer.
This module provides threshold-based light detection rather than calibrated light intensity measurements.
6. LDR Light Sensor Module Pinout
The LDR Light Sensor Module features three electrical connections.
| Pin | Function |
|---|---|
| DO | Digital light detection output |
| GND | Ground |
| VCC | Positive power supply |
When viewing the component side of the module with its connection pins facing downward, the pin sequence from left to right is:
DO → GND → VCC
Always verify the labels printed on the actual PCB before connecting the module.
7. How to Connect an LDR Light Sensor Module to Arduino
The LDR Light Sensor Module can be connected to an Arduino Uno using three jumper wires.
Required components:
- LDR Light Sensor Module
- Arduino Uno
- Jumper wires
Wiring connections:
| LDR Light Sensor Module | Arduino Uno |
|---|---|
| VCC | 5V |
| GND | GND |
| DO | Digital Pin D2 |
After connecting the sensor, adjust the onboard potentiometer to configure the required light detection threshold.
Cover the LDR with your hand and then expose it to light to observe changes in the digital output.
8. Arduino Example Code
The following program reads the digital output of the LDR Light Sensor Module and displays its state in the Arduino Serial Monitor.
const int ldrPin = 2;
// Typical module: HIGH in darkness.
// Change to LOW if your module behaves differently.
const int darkState = HIGH;
void setup() {
pinMode(ldrPin, INPUT);
Serial.begin(9600);
}
void loop() {
int sensorValue = digitalRead(ldrPin);
if (sensorValue == darkState) {
Serial.println("Darkness Detected");
} else {
Serial.println("Light Detected");
}
delay(200);
}
How to test the sensor:
- Connect the LDR module to Arduino.
- Upload the program using Arduino IDE.
- Open the Serial Monitor at 9600 baud.
- Cover the LDR to simulate darkness.
- Expose the LDR to light.
- Observe the changes in the displayed sensor state.
- Adjust the potentiometer as required.
Verify the actual output polarity before using the sensor in an automated circuit.
9. Beginner Project: Automatic Streetlight Using an LDR Sensor
Build a simple automatic streetlight model using the LDR Light Sensor Module and Arduino.
Components required:
- 1 × LDR Light Sensor Module
- 1 × Arduino Uno
- 1 × 5mm LED
- 1 × 330Ω resistor
- Breadboard
- Jumper wires
Wiring connections:
- LDR VCC → Arduino 5V
- LDR GND → Arduino GND
- LDR DO → Arduino D2
- LED anode → Arduino D8 through a 330Ω resistor
- LED cathode → Arduino GND
Example Arduino code:
const int ldrPin = 2;
const int ledPin = 8;
// Verify the sensor's output polarity.
const int darkState = HIGH;
void setup() {
pinMode(ldrPin, INPUT);
pinMode(ledPin, OUTPUT);
}
void loop() {
int lightState = digitalRead(ldrPin);
if (lightState == darkState) {
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
delay(100);
}
Project operation:
- During bright light conditions, the LED remains OFF.
- When the surroundings become dark, the LED turns ON automatically.
- When light returns, the LED switches OFF.
Position the LDR away from the controlled LED to prevent the LED’s own light from repeatedly triggering the sensor.
This project teaches light detection, digital inputs, conditional programming and automatic lighting control.
10. Related Products
Complete your electronics project with:
- Arduino Uno R3 Compatible Programmable Board
- ESP32 Development Board
- RGB LED Module
- Common Cathode RGB LED
- Common Anode RGB LED
- 5V Passive Buzzer
- TTP223 Touch Sensor Module
- Flame Sensor Module
- Magnetic Reed Switch Sensor
- 4 Pin Sound Sensor Module
- MAX7219 8×8 LED Matrix Module
- Breadboard
- Jumper Wires
11. Related Tutorials
Explore these electronics learning topics:
- How to Use an LDR Light Sensor Module with Arduino
- How to Build an Automatic Streetlight Using Arduino
- How to Connect an LDR Sensor to ESP32
- How Does a Light Dependent Resistor Work?
- Understanding the LM393 Comparator
- How to Adjust an LDR Sensor’s Detection Threshold
- How to Build an Automatic Night Lamp
- Analog vs Digital Light Sensors
- How to Build a Light-Seeking Robot
12. Frequently Asked Questions
What is an LDR Light Sensor Module?
An LDR Light Sensor Module is an electronic sensor that detects surrounding light conditions using a Light Dependent Resistor and a comparator circuit.
What does LDR stand for?
LDR stands for Light Dependent Resistor. Its electrical resistance changes according to the amount of light falling on its sensing surface.
What is the function of the LM393 IC?
The LM393 comparator compares the voltage generated by the LDR circuit with an adjustable reference voltage and produces a digital detection signal.
Does this LDR module provide analog output?
No. This 3-pin LDR Light Sensor Module provides digital output only.
Can this LDR sensor measure light intensity in lux?
No. This module provides threshold-based light detection and is not a calibrated lux meter.
Can I adjust the light detection sensitivity?
Yes. The onboard potentiometer allows adjustment of the light level at which the digital output changes state.
Can I use this LDR Light Sensor Module with Arduino?
Yes. Connect the module’s VCC and GND pins to a compatible power supply and its DO pin to an Arduino digital input.
Can I use this LDR sensor with ESP32?
Yes, provided the module’s supply voltage and digital output levels are compatible with ESP32 GPIO pins.
Can I build an automatic streetlight using this sensor?
Yes. The sensor can detect day and night conditions and provide an input signal to a microcontroller for automatic lighting control.
What is the difference between a standalone LDR and an LDR module?
A standalone LDR changes its resistance according to light exposure. An LDR module includes additional circuitry that simplifies light detection and provides a usable output signal.
Can the LDR sensor directly control a mains-powered bulb?
No. The module provides a low-power detection signal. Mains-powered lighting requires appropriately rated and isolated switching equipment installed safely.
Where can I buy an LDR Light Sensor Module in Surat?
You can purchase the LDR Light Sensor Module online from Yagobotix with same-day delivery and pickup available in Surat.
13. What Is Included?
- 1 × LM393 LDR Light Sensor Module – 3 Pin, Blue PCB
Microcontroller boards, LEDs, resistors, breadboards and jumper wires are not included.
14. Compatibility
The LDR Light Sensor Module can be used in suitable electronics projects involving:
- Arduino Uno
- Arduino Nano
- Arduino Mega
- ESP32 development boards
- ESP8266 NodeMCU
- Raspberry Pi GPIO
- STM32 development boards
- Other compatible microcontrollers
- Custom light detection circuits
Verify the module’s supply voltage and output signal levels before connecting it to a microcontroller.
When using ESP32, ESP8266 or Raspberry Pi, use a compatible 3.3V supply where supported or appropriate logic-level conversion.
Do not connect a 5V digital output directly to a GPIO pin that is not 5V tolerant.
15. Buy LDR Light Sensor Module Online in India
Add automatic light detection to your next electronics project with the LDR Light Sensor Module from Yagobotix.
Featuring a Light Dependent Resistor, an LM393 comparator and an adjustable detection threshold, this compact sensor module is suitable for automatic lighting, robotics, smart home prototypes and educational electronics projects.
Whether you are building an automatic streetlight model or experimenting with light-controlled electronics, this module provides a convenient way to detect changes in surrounding light conditions.
Shop with Yagobotix:
- Shipping across India
- Same-day delivery in Surat
- Same-day pickup available in Surat
- Electronic components for students, hobbyists and engineers
Same-day services are subject to stock availability, delivery location and applicable order cut-off times.
Add to cart and start building your next electronics project with Yagobotix!






There are no reviews yet.