Skip to Content

LDR Light Sensor Module 4 Pins With Analog & Digital Output

This module is used to measure the brightness of a light source by detecting ambient brightness and light intensity using a photosensitive resistor (LDR). It's highly sensitive to environmental light and compatible with various microcontrollers such as Arduino and ESP32.

Package Includes:

  • 1 x LDR Photosensitive Sensor Blue Module

15.00 AED 15.00 AED Tax Included
15.00 AED Tax Included

Not Available For Sale

This combination does not exist.

Terms and Conditions
30-day money-back guarantee
Shipping: 2-3 Business Days

 

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:

LDR Module 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).

LDR Module Circuit

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:

  • Basic usage tutorial

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

  • LoRa SX1276 Wireless Module: Built around the SX1276 chip, the module employs LoRa technology, allowing for long-range data transmission and excellent penetration capabilities.
  • Configurable Output Power: The module's output power can be adjusted from +13 to +20 dBm (up to 100 mW) through software settings, providing flexibility in balancing communication distance and power consumption.
  • Low Power Consumption: During transmission, power consumption ranges from 50mA (+13 dBm) to 150mA (+20dBm), while in listening mode, it requires approximately 30mA, making it energy-efficient for battery-operated applications.
  • AES-128 Encryption Support: The module offers AES-128 encryption, ensuring secure and private data transmission, making it suitable for applications that require data confidentiality.
  • Multipoint Network Capabilities: It supports multipoint networks, allowing the establishment of individual nodes within the network for seamless and efficient communication.
  • Wide Power Supply Range: The module can be powered with a voltage range from 3V to 5V, making it compatible with various power sources and microcontrollers.

NOTE: It is important to solder a 16cm length of cable to the antenna pin before using it since not connecting any antenna can damage it. Optionally, the board has pads to solder an SMA connector with antenna thread.

Specifications

  • LoRa SX1276 wireless module with SPI interface (900 MHz)
  • Output power: +13 to +20 dBm up to 100 mW configurable by software
  • Consumption: 50mA (+13 dBm) to 150mA (+20dBm) in transmission, approx 30mA in listening
  • Supports AES-128 encryption
  • Supports multipoint networks with individual nodes
  • Power: 3 to 5V