The KY-018 LDR Photo Resistor, manufactured by AZ-Delivery (Part ID: KY-018), is a light-dependent resistor (LDR) that changes its resistance based on the intensity of light falling on it. This component is widely used in light sensing applications, such as automatic lighting systems, light meters, and DIY electronics projects. Its simplicity and reliability make it an excellent choice for both beginners and experienced users.
The KY-018 module consists of an LDR and a fixed resistor, forming a voltage divider circuit. Below are the key technical details:
Parameter | Value |
---|---|
Manufacturer | AZ-Delivery |
Part ID | KY-018 |
Operating Voltage | 3.3V to 5V |
Resistance Range | ~10 kΩ (bright light) to ~1 MΩ (dark) |
Power Consumption | Low |
Operating Temperature | -30°C to +70°C |
Dimensions | 18mm x 10mm x 2mm |
The KY-018 module has three pins. The table below describes each pin:
Pin Name | Description |
---|---|
Signal | Outputs an analog voltage proportional to light intensity |
VCC | Power supply pin (3.3V to 5V) |
GND | Ground pin |
The KY-018 LDR Photo Resistor is straightforward to use in a circuit. It outputs an analog voltage that varies with the intensity of light falling on the LDR. This voltage can be read by an analog input pin on a microcontroller, such as an Arduino UNO.
The following code demonstrates how to read the light intensity from the KY-018 and display the value on the Serial Monitor:
// KY-018 LDR Photo Resistor Example Code
// Reads the analog value from the KY-018 and displays it in the Serial Monitor.
const int ldrPin = A0; // KY-018 Signal pin connected to Arduino A0
void setup() {
Serial.begin(9600); // Initialize Serial Monitor at 9600 baud rate
pinMode(ldrPin, INPUT); // Set the LDR pin as input
}
void loop() {
int ldrValue = analogRead(ldrPin); // Read the analog value from the LDR
Serial.print("Light Intensity (Analog Value): ");
Serial.println(ldrValue); // Print the value to the Serial Monitor
delay(500); // Wait for 500ms before the next reading
}
No Output or Incorrect Readings
Unstable or Fluctuating Readings
Low Sensitivity to Light Changes
Arduino Serial Monitor Not Displaying Values
Q: Can the KY-018 be used with a 3.3V microcontroller?
A: Yes, the KY-018 operates within a voltage range of 3.3V to 5V, making it compatible with 3.3V microcontrollers like the ESP32 or Raspberry Pi Pico.
Q: How can I increase the sensitivity of the KY-018?
A: You can adjust the fixed resistor on the module or use an external resistor to modify the voltage divider circuit, but this requires careful consideration of the LDR's resistance range.
Q: Can the KY-018 detect complete darkness?
A: The KY-018 can detect very low light levels, but in complete darkness, the resistance of the LDR becomes extremely high, and the output voltage may approach 0V.
Q: Is the KY-018 suitable for outdoor use?
A: The KY-018 is not weatherproof. If used outdoors, it must be enclosed in a protective, transparent casing to shield it from moisture and dust.
By following this documentation, you can effectively integrate the KY-018 LDR Photo Resistor into your projects and troubleshoot any issues that arise.