- All products
- Sensors & Modules
- Distance + Light
- LDR Light Sensor Module 3 Pins With Adjustable Digital Out
- Distance + Light
Features
- Light Detection: Detects changes in surrounding light intensity.
- Adjustable Sensitivity: Onboard potentiometer for threshold tuning.
- Digital Output (D0): Outputs HIGH or LOW signal based on light level.
- Simple 3-Pin Interface: Easy connection to microcontrollers.
- Wide Compatibility: Works with Arduino, ESP8266, ESP32, and other MCUs.
Specifications
- Sensor Type: Light Dependent Resistor (LDR)
- Output Type: Digital (D0 only)
- Sensitivity Adjustment: Onboard potentiometer
- Operating Voltage: 3.3V – 5V DC
- Pin Configuration:
- VCC – Power Supply
- GND – Ground
- D0 – Digital Output
- Dimensions: Approx. 3cm × 1.5cm × 1.3cm
- Weight: Approx. 3g
Working Principle
The LDR changes its resistance depending on the amount of light it receives. In bright conditions, resistance decreases; in low light, resistance increases. The onboard comparator converts this change into a digital signal (HIGH or LOW), which can be read by a microcontroller.
Pinout

| Pin | Description |
|---|---|
| VCC | Power Supply (3.3V–5V) |
| GND | Ground |
| D0 | Digital Output Signal |
Applications
- Automatic street or room lighting
- Day/Night detection systems
- Light-triggered alarms
- Smart home automation
- Robotics and DIY projects
Example Arduino Connection

- VCC → 5V
- GND → GND
- D0 → Digital Pin 2
Example Arduino Code
#define LDRpin 2
void setup() {
pinMode(LDRpin, INPUT);
Serial.begin(9600);
}
void loop() {
int lightState = digitalRead(LDRpin);
if(lightState == HIGH){
Serial.println("Low Light Detected");
} else {
Serial.println("Bright Light Detected");
}
delay(500);
}
Library
No external library is required. The module works using the standard digitalRead() function.
Features
- Light Detection: Detects changes in surrounding light intensity.
- Adjustable Sensitivity: Onboard potentiometer for threshold tuning.
- Digital Output (D0): Outputs HIGH or LOW signal based on light level.
- Simple 3-Pin Interface: Easy connection to microcontrollers.
- Wide Compatibility: Works with Arduino, ESP8266, ESP32, and other MCUs.
Specifications
- Sensor Type: Light Dependent Resistor (LDR)
- Output Type: Digital (D0 only)
- Sensitivity Adjustment: Onboard potentiometer
- Operating Voltage: 3.3V – 5V DC
- Pin Configuration:
- VCC – Power Supply
- GND – Ground
- D0 – Digital Output
- Dimensions: Approx. 3cm × 1.5cm × 1.3cm
- Weight: Approx. 3g
Working Principle
The LDR changes its resistance depending on the amount of light it receives. In bright conditions, resistance decreases; in low light, resistance increases. The onboard comparator converts this change into a digital signal (HIGH or LOW), which can be read by a microcontroller.
Pinout

| Pin | Description |
|---|---|
| VCC | Power Supply (3.3V–5V) |
| GND | Ground |
| D0 | Digital Output Signal |
Applications
- Automatic street or room lighting
- Day/Night detection systems
- Light-triggered alarms
- Smart home automation
- Robotics and DIY projects
Example Arduino Connection

- VCC → 5V
- GND → GND
- D0 → Digital Pin 2
Example Arduino Code
#define LDRpin 2
void setup() {
pinMode(LDRpin, INPUT);
Serial.begin(9600);
}
void loop() {
int lightState = digitalRead(LDRpin);
if(lightState == HIGH){
Serial.println("Low Light Detected");
} else {
Serial.println("Bright Light Detected");
}
delay(500);
}
Library
No external library is required. The module works using the standard digitalRead() function.

