Features:
- Detects ambient brightness and light intensity
- Adjustable sensitivity via blue potentiometer
- Operating voltage: 3.3V to 5V
- Digital output (D0) and analog output (A0)
- Power indicator (Red) and digital output indicator (Green)
- Integrated LM393 wide range voltage comparator
- Fixed bolt hole for easy mounting
- Compact PCB size
Principle of Work:
The LDR is a high-resistance semiconductor made from cadmium sulfide in a zigzag pattern. When exposed to light, photons excite electrons from the valence band to the conduction band, reducing resistance and allowing current to flow. The stronger the light, the more electrons are excited, decreasing the resistance further.
Pinout:

Pin |
Description |
A0 |
Analog Output |
D0 |
Digital Output |
VCC |
Power (3.3V–5V) |
GND |
Ground |
Applications:
- Darkness and light detection
- Automatic lighting systems
- Light intensity measurement
Circuit Diagram:
Connect GND to GND, VCC to 5V, and A0 to analog input pin (e.g., A0).

Library:
No external library is required.
Sample Code:
int sensorPin = A5; // Declare analog pin
void setup() {
Serial.begin(9600);
}
void loop() {
int rawValue = analogRead(sensorPin);
float voltage = rawValue * (5.0 / 1023) * 1000;
float resistance = 10000 * (voltage / (5000.0 - voltage));
Serial.print("Voltage value: ");
Serial.print(voltage);
Serial.print(" mV, Resistance: ");
Serial.print(resistance);
Serial.println(" Ohm");
Serial.println("---------------------------------------");
delay(500);
}
Upload the code and open the Serial Monitor. Point the sensor at a light source and observe the voltage and resistance changes.
Technical Details:
- Operating Voltage: 3.3V–5V
- Output Voltage: 0–5V
- Adjustable sensitivity via onboard potentiometer
- Dimensions: 3cm x 1.6cm
- Built-in LM393 comparator
Resources:
Comparisons:
This module is more user-friendly than a raw LDR sensor as it includes an onboard comparator, digital and analog outputs, a fixed mounting hole, and does not require an external resistor voltage divider. Unlike simpler modules such as the KY-018, it can drive relays and other logic-level devices directly.
Features:
- Detects ambient brightness and light intensity
- Adjustable sensitivity via blue potentiometer
- Operating voltage: 3.3V to 5V
- Digital output (D0) and analog output (A0)
- Power indicator (Red) and digital output indicator (Green)
- Integrated LM393 wide range voltage comparator
- Fixed bolt hole for easy mounting
- Compact PCB size
Principle of Work:
The LDR is a high-resistance semiconductor made from cadmium sulfide in a zigzag pattern. When exposed to light, photons excite electrons from the valence band to the conduction band, reducing resistance and allowing current to flow. The stronger the light, the more electrons are excited, decreasing the resistance further.
Pinout:

Pin |
Description |
A0 |
Analog Output |
D0 |
Digital Output |
VCC |
Power (3.3V–5V) |
GND |
Ground |
Applications:
- Darkness and light detection
- Automatic lighting systems
- Light intensity measurement
Circuit Diagram:
Connect GND to GND, VCC to 5V, and A0 to analog input pin (e.g., A0).

Library:
No external library is required.
Sample Code:
int sensorPin = A5; // Declare analog pin
void setup() {
Serial.begin(9600);
}
void loop() {
int rawValue = analogRead(sensorPin);
float voltage = rawValue * (5.0 / 1023) * 1000;
float resistance = 10000 * (voltage / (5000.0 - voltage));
Serial.print("Voltage value: ");
Serial.print(voltage);
Serial.print(" mV, Resistance: ");
Serial.print(resistance);
Serial.println(" Ohm");
Serial.println("---------------------------------------");
delay(500);
}
Upload the code and open the Serial Monitor. Point the sensor at a light source and observe the voltage and resistance changes.
Technical Details:
- Operating Voltage: 3.3V–5V
- Output Voltage: 0–5V
- Adjustable sensitivity via onboard potentiometer
- Dimensions: 3cm x 1.6cm
- Built-in LM393 comparator
Resources:
Comparisons:
This module is more user-friendly than a raw LDR sensor as it includes an onboard comparator, digital and analog outputs, a fixed mounting hole, and does not require an external resistor voltage divider. Unlike simpler modules such as the KY-018, it can drive relays and other logic-level devices directly.