A photoresistor, or light-dependent resistor (LDR), is a passive electronic component that changes its resistance based on the amount of light it is exposed to. When light intensity increases, the resistance of the LDR decreases, and when light intensity decreases, its resistance increases. This property makes it an ideal component for light-sensing applications.
Below are the general technical specifications of a typical photoresistor (LDR). Note that exact values may vary depending on the specific model.
Parameter | Value |
---|---|
Resistance (Dark) | 1 MΩ or higher |
Resistance (Bright Light) | 1 kΩ to 10 kΩ |
Spectral Response | 400 nm to 700 nm (visible light) |
Maximum Voltage | 150 V |
Power Dissipation | 100 mW |
Response Time (Rise) | 20 ms |
Response Time (Fall) | 30 ms |
Operating Temperature | -30°C to +70°C |
A photoresistor does not have a specific pin configuration, as it is a two-terminal device. The terminals are interchangeable, meaning there is no polarity. Below is a description of its connections:
Pin | Description |
---|---|
Pin 1 | Connects to one side of the circuit (e.g., power or ground) |
Pin 2 | Connects to the other side of the circuit (e.g., input signal) |
Basic Circuit Setup:
Voltage Divider:
Below is an example of how to use an 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
Serial.print("LDR Value: ");
Serial.println(ldrValue); // Print the LDR value to the Serial Monitor
delay(500); // Wait for 500 ms before the next reading
}
No Change in Output Voltage:
Incorrect Readings:
LDR Not Responding:
Q: Can I use an LDR to measure precise light intensity?
A: LDRs are suitable for detecting relative changes in light intensity but are not ideal for precise measurements. For accurate light intensity measurements, consider using a photodiode or a light sensor module.
Q: How do I protect the LDR from environmental damage?
A: Use a transparent enclosure or cover to shield the LDR from dust, moisture, and physical damage while allowing light to pass through.
Q: Can I use an LDR with digital input pins?
A: LDRs are typically used with analog input pins. However, you can use a comparator circuit to convert the analog signal into a digital signal if needed.