Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use KY-018 LDR Photo Resistor: Examples, Pinouts, and Specs

Image of KY-018 LDR Photo Resistor
Cirkit Designer LogoDesign with KY-018 LDR Photo Resistor in Cirkit Designer

Introduction

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.

Explore Projects Built with KY-018 LDR Photo Resistor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO Light Sensor with KY-018 LDR for Ambient Light Detection
Image of arduino-uno: A project utilizing KY-018 LDR Photo Resistor in a practical application
This circuit uses an Arduino UNO to read the light intensity from a KY-018 LDR Photo Resistor. The LDR is powered by the Arduino's 5V and GND pins, and its signal output is connected to the Arduino's analog input pin A0.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 3B Light Sensor Interface
Image of photo-resistor: A project utilizing KY-018 LDR Photo Resistor in a practical application
This circuit connects a KY-018 LDR Photo Resistor to a Raspberry Pi 3B for light sensing applications. The LDR's signal pin is connected to GPIO 11 on the Raspberry Pi, allowing the microcontroller to read the light levels detected by the sensor. The LDR is powered by the Raspberry Pi's 5V and ground pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
LDR-Controlled LED Circuit with 10k Resistor
Image of Smart Lighting System: A project utilizing KY-018 LDR Photo Resistor in a practical application
This is a light-dependent LED circuit powered by a 9V battery. It uses a 10k Ohm resistor in series with the LED for current limiting, and a photocell (LDR) to adjust the LED brightness based on ambient light levels.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Light-Activated Relay Circuit with Photocell and Transistor
Image of darshan: A project utilizing KY-018 LDR Photo Resistor in a practical application
This circuit is a light-sensitive relay switch that uses a photocell (LDR) to control a 12V relay via a BC547 transistor. The relay is powered by a 12V battery, and the transistor acts as a switch that is triggered by the resistance change in the LDR, which is influenced by the ambient light level.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with KY-018 LDR Photo Resistor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of arduino-uno: A project utilizing KY-018 LDR Photo Resistor in a practical application
Arduino UNO Light Sensor with KY-018 LDR for Ambient Light Detection
This circuit uses an Arduino UNO to read the light intensity from a KY-018 LDR Photo Resistor. The LDR is powered by the Arduino's 5V and GND pins, and its signal output is connected to the Arduino's analog input pin A0.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of photo-resistor: A project utilizing KY-018 LDR Photo Resistor in a practical application
Raspberry Pi 3B Light Sensor Interface
This circuit connects a KY-018 LDR Photo Resistor to a Raspberry Pi 3B for light sensing applications. The LDR's signal pin is connected to GPIO 11 on the Raspberry Pi, allowing the microcontroller to read the light levels detected by the sensor. The LDR is powered by the Raspberry Pi's 5V and ground pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Smart Lighting System: A project utilizing KY-018 LDR Photo Resistor in a practical application
LDR-Controlled LED Circuit with 10k Resistor
This is a light-dependent LED circuit powered by a 9V battery. It uses a 10k Ohm resistor in series with the LED for current limiting, and a photocell (LDR) to adjust the LED brightness based on ambient light levels.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of darshan: A project utilizing KY-018 LDR Photo Resistor in a practical application
Battery-Powered Light-Activated Relay Circuit with Photocell and Transistor
This circuit is a light-sensitive relay switch that uses a photocell (LDR) to control a 12V relay via a BC547 transistor. The relay is powered by a 12V battery, and the transistor acts as a switch that is triggered by the resistance change in the LDR, which is influenced by the ambient light level.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Automatic streetlights and night lamps
  • Light intensity measurement systems
  • DIY projects involving light detection
  • Solar tracking systems
  • Security systems (e.g., detecting light changes in a room)

Technical Specifications

The KY-018 module consists of an LDR and a fixed resistor, forming a voltage divider circuit. Below are the key technical details:

Key Specifications

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

Pin Configuration

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

Usage Instructions

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.

Connecting the KY-018 to an Arduino UNO

  1. Connect the Signal pin of the KY-018 to an analog input pin on the Arduino (e.g., A0).
  2. Connect the VCC pin to the 5V pin on the Arduino.
  3. Connect the GND pin to the GND pin on the Arduino.

Sample Arduino Code

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
}

Important Considerations

  • Voltage Range: Ensure the module is powered within its operating voltage range (3.3V to 5V).
  • Analog Input: The Signal pin outputs an analog voltage, so it must be connected to an analog input pin on the microcontroller.
  • Light Sensitivity: The LDR's resistance changes significantly with light intensity. In very low light, the resistance can reach up to 1 MΩ, while in bright light, it can drop to around 10 kΩ.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings

    • Cause: Loose or incorrect wiring.
    • Solution: Double-check all connections, ensuring the Signal pin is connected to an analog input pin, and VCC and GND are properly connected.
  2. Unstable or Fluctuating Readings

    • Cause: Electrical noise or interference.
    • Solution: Add a capacitor (e.g., 0.1 µF) across the Signal pin and GND to filter out noise.
  3. Low Sensitivity to Light Changes

    • Cause: Insufficient light intensity or incorrect placement of the LDR.
    • Solution: Ensure the LDR is exposed to sufficient light and is not obstructed.
  4. Arduino Serial Monitor Not Displaying Values

    • Cause: Serial Monitor not set to the correct baud rate.
    • Solution: Set the Serial Monitor to 9600 baud to match the code.

FAQs

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.