
Photoresistor LDR Light Sensor Module – LM393 Comparator for Arduino, ESP32 & Raspberry Pi
The LDR Light Sensor Module uses a photoresistor (Light Dependent Resistor) paired with an LM393 voltage comparator to detect ambient light levels. It provides both analog (AO) and digital (DO) output signals, with an onboard potentiometer for adjustable light threshold sensitivity.
Key Specifications
- Sensor: Photoresistor (LDR)
- Comparator IC: LM393
- Output: Analog (AO) + Digital (DO)
- Operating Voltage: 3.3V – 5V DC
- Threshold Adjustment: Onboard potentiometer
- Indicator LEDs: Power and output status LEDs
- Connector: 4-pin (VCC, GND, DO, AO)
Compatibility & Use Cases
This module is fully compatible with Arduino, ESP32, NodeMCU, and Raspberry Pi via both analog and digital GPIO pins. Common applications include:
- Automatic street light and night-light control circuits
- Day/night detection for IoT home automation
- Light-activated relay and alarm systems
- Solar tracker and sun-following robot projects
- STEM and educational light-sensing experiments
Connect AO to an ADC pin for proportional light readings, or use DO for simple light/dark threshold switching without any ADC.
Frequently Asked Questions
Should I use the analog or digital output?
Use AO with an ADC pin when you want a changing light level value for graphs or displays. Use DO when you only need a simple dark-versus-light switch signal for a relay or LED.
How do I set the light level at which it triggers?
Hold the sensor at the light level where you want it to switch, then slowly turn the onboard potentiometer until the output LED just changes state. That point becomes your threshold.
Does it give an exact lux reading?
No. An LDR gives a relative light level rather than a calibrated lux value, which is perfect for day/night detection and automatic lighting projects.
Will it work with both 5V Arduino and 3.3V ESP32?
Yes. The module runs from 3.3V to 5V, so it connects directly to Arduino, ESP32, ESP8266 and Raspberry Pi Pico without extra circuitry.
Order now from Xsortex HUB and get fast delivery across India.
- Choosing a selection results in a full page refresh.
- Opens in a new window.
