

A Light Dependent Resistor (LDR), also known as a photoresistor, is a passive electronic component whose resistance decreases as the intensity of incident light increases. This property makes it an ideal choice for light sensing and control applications. LDRs are widely used in devices such as automatic streetlights, light meters, and alarm systems.








Below are the key technical details for the LDR manufactured by ARDUINO, part ID: UNO.
The LDR is a two-terminal device with no polarity. Below is the pin description:
| Pin Name | Description |
|---|---|
| Pin 1 | Connects to one side of the circuit |
| Pin 2 | Connects to the other side of the circuit |
Basic Circuit Setup:
Voltage Divider Formula: The output voltage at the junction can be calculated using the formula: [ V_{out} = V_{in} \times \frac{R_{LDR}}{R_{LDR} + R_{fixed}} ] where ( R_{LDR} ) is the resistance of the LDR and ( R_{fixed} ) is the fixed resistor.
Arduino UNO Example Code: Below is an example of how to use the LDR with an Arduino UNO to measure light intensity:
// Define the analog pin connected to the LDR
const int ldrPin = A0;
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
int ldrValue = analogRead(ldrPin); // Read the analog value from the LDR
// Convert the analog value to a voltage (assuming 5V reference)
float voltage = ldrValue * (5.0 / 1023.0);
// Print the LDR value and voltage to the Serial Monitor
Serial.print("LDR Value: ");
Serial.print(ldrValue);
Serial.print(" | Voltage: ");
Serial.println(voltage);
delay(500); // Wait for 500 ms before the next reading
}
No Change in Output Voltage:
Inconsistent Readings:
Low Sensitivity:
Can the LDR detect infrared light?
What is the maximum distance for light detection?
Can I use the LDR with a 3.3V system?
By following this documentation, users can effectively integrate the LDR into their projects and troubleshoot common issues.