Electronics

LDR Light Sensor Module (Light Dependent Resistor)

AED 12.50

1

Description

To measure the brightness of a light source, utilize the LDR Light Sensor Module. Typically, the ambient brightness and light intensity are detected using the photosensitive resistor module that is most sensitive to environmental light intensity. When the external ambient light intensity reaches a predetermined threshold, the module's DO port output is high. Additionally, the module may produce analog signals on A0 that are compatible with a number of frequently used microcontrollers, including Arduino, ESP32, and others.

Package Includes:

  • LDR Photosensitive Sensor Blue Module 

Features:

  • Able to detect ambient brightness and light intensity
  • Adjustable sensitivity (via blue digital potentiometer adjustment)
  • Operating voltage 3.3V-5V
  • Digital switching outputs (0 and 1) -D0
  • With fixed bolt hole for easy installation
  • Small board PCB size.
  • Power indicator (Red) and the digital switch output indicator (Green)
  • Features wide range voltage comparator LM393

Description:

To measure the brightness of a light source, utilize the LDR Light Sensor Module. Adjustable sensitivity (via blue digital potentiometer adjustment) which is connected to comparator LM393 and it works with an input voltage of 3.3V-5Vit also has a fixed bolt hole for easy installation voltage, Typically, the ambient brightness and light intensity are detected using the photosensitive resistor module that is most sensitive to environmental light intensity. When the external ambient light intensity reaches a predetermined threshold, the module's DO port output is high. Additionally, the module may produce analog signals on A0 that are compatible with a number of frequently used microcontrollers, including Arduino, ESP32, and others.

Principle of Work:

Electrons are what causes electricity to flow through any metal, and they are classified as insulators, conductors, and semiconductors depending on how many electrons are passing through them at any given time. These are divided into groups based on the band gap, which is the energy difference between the valence band and the conduction band. Since there aren't many electrons accessible for conduction in a photoresistor, it is composed of high-resistance semiconductor material. The photoresistor's top is covered in a zigzag pattern made of the semiconductor cadmium sulfur. In order to obtain the necessary resistance and power rating, it is placed in this manner. When light strikes the photoresistor, the valence band electrons or valence electrons absorb energy sufficient for them to break their bond with the atom and move to the conduction band.

This process of transfer of electrons generates a current flow to the photoresistor and as more and more electrons transfer to the conduction band, the current flow increases and results in the decrease of resistance in the photoresistor.

Pinout of the Module:

 

Module Description
A0 Analog Pin
D0 Digital Pin
VCC +5V
GND GND

Applications:

  • Detecting the darkness and light.
  • Automatic light on/off system
  • It is used to measure light intensity.

Circuit:

The sensor pin GND to ground, the sensor pin VCC is connected to VCC, and sensor pin A0 to ANalog pin A0.

Library: 

no library is needed.

Code:

The program measures the current voltage value at the sensor,
calculates from this and the known series resistance the current
the resistance value of the sensor and outputs the results to the serial output

int sensorPin = A5; // Declare the input pin here
// Serial output in 9600 baud
void setup()
{
 Serial.begin(9600);
}
void loop()
{
 // Current voltage value is measured...
 int rawValue = analogRead(sensorPin);
 float voltage = rawValue * (5.0/1023) * 1000;
 float resitance = 10000 * ( voltage / ( 5000.0 - voltage) );
 // ... and here output to the serial interface
 Serial.print("Voltage value:"); Serial.print(voltage); Serial.print("mV");
 Serial.print(", resistance value:"); Serial.print(resitance); Serial.println("Ohm");
 Serial.println("---------------------------------------");
 delay(500);
}

We'll start obtaining data on the serial monitor when you upload the code, start the Serial Monitor, direct the sensor to a light source then check the serial monitor for changes

Technical Details: 

  • Operating voltage 3,3 V - 5 V
  • Output voltage 3,3 V - 5 V
  • Able to detect ambient brightness and light intensity
  • Adjustable sensitivity (via blue digital potentiometer adjustment)
  • Small board PCB size: 3cm * 1.6cm
  • Features wide range voltage comparator LM393

Resources:

Comparisons:
This module is an easy way to start with a sensor with Arduino, with this module you need no external components like bare-bone LDR because you can't work directly with LDRs without a voltage divider circuit which needs a resister plus an LDR, also this module has a fixed screw hole to fix your module in any DIY project, we don't forget to mention that the module has an analog output and Schmitt trigger which gives a digital output in comparison another module we have on this website like KY-018 which has no comparator and no digital output and can't drive a relay