Description
Photosensitive resistance module is most sensitive to ambient light. Module is commonly used to detect amient light. Module can be directly connected with Microcontrollers or to trigger relay module. Module sets output to LOW logic (on DO pin) if the light intensity is higher than set point. Module only supports digital output and does not has Analog output.
Features
- Uses photosensitive resistance sensor
- Uses LM393 wide voltage comparator
- Clean signal, good waveform, strong driving ability for more than 15 mA
- With adjustable potentiometer to adjust light sensitivity
- Has single mounting hole
- Small board PCB size: 3.2 cm x 1.4 cm
Technical Specifications
- Operating voltage of 3.3 V to 5 V
- Output Type: Digital Output (0 and 1)
- PCB size: 3.2 cm x 1.4 cm
- Output Low: when light intensity is higher than set point
- Output High: when light intensity is lower than set point
Getting started with the Photosensitive Sensor Module Detection Photoresistor LDR Light Sensor Module
To introduce the basic steps on how to use LDR digital sensor Module with Arduino UNO or other Microcontroler to detect the light brightness in the environment and decide to switch OFF or ON light.
Hardware required
Connecting the Hardware
Connect the LDR digital sensor Module to the Arduino as shown below,
CODE
upload it into IDE
int ldrPin = 7;
int ledPin= 12;
int val = 0;
void setup() {
pinMode(ldrPin, INPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
int val = digitalRead(ldrPin);
Serial.println(val);
if(val == HIGH ){
digitalWrite(ledPin, HIGH);
Serial.println(“LED ON”);
}
else{
digitalWrite(ledPin, LOW);
Serial.println(“LED OFF”);
}
}
RESULT
Before to detect the light brightness in the environment ,LED is ON
Open Serial Monitor to see the result.
LDR detects Light ,LED turn Off
Open Serial Monitor to see the result.