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, 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 versatility 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 following table outlines the key technical details of the KY-018 LDR Photo Resistor:

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)
Maximum Power Rating 100 mW
Response Time Rise: ~20 ms, Fall: ~30 ms
Operating Temperature -30°C to +70°C
Dimensions 18 mm x 10 mm x 2 mm

Pin Configuration

The KY-018 module consists of three pins. The table below describes each pin:

Pin Name Description
1 Signal (S) Outputs an analog voltage proportional to light intensity.
2 VCC Power supply pin (3.3V to 5V).
3 GND Ground connection.

Usage Instructions

How to Use the KY-018 in a Circuit

  1. Power the Module: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground.
  2. Read the Signal: Connect the Signal (S) pin to an analog input pin of a microcontroller (e.g., Arduino UNO) to measure the voltage output.
  3. Light Sensitivity: The output voltage decreases as the light intensity increases. Use this behavior to detect changes in light levels.

Example Circuit with Arduino UNO

Below is an example of how to connect the KY-018 to an Arduino UNO and read light intensity:

Circuit Connections

  • KY-018 VCC → Arduino 5V
  • KY-018 GND → Arduino GND
  • KY-018 Signal (S) → Arduino A0 (Analog Pin)

Arduino Code Example

// KY-018 LDR Photo Resistor Example with Arduino UNO
// Reads light intensity and prints the value to the Serial Monitor

const int ldrPin = A0; // KY-018 Signal pin connected to Arduino A0

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  pinMode(ldrPin, INPUT); // Set the LDR pin as input
}

void loop() {
  int lightValue = analogRead(ldrPin); // Read the analog value from the LDR
  Serial.print("Light Intensity: ");
  Serial.println(lightValue); // Print the light intensity value
  delay(500); // Wait for 500ms before the next reading
}

Important Considerations

  • Voltage Levels: Ensure the module is powered within its operating voltage range (3.3V to 5V).
  • Ambient Light: The LDR's resistance is affected by ambient light. Test the module in the intended environment for accurate results.
  • Analog-to-Digital Conversion: When using a microcontroller, ensure the analog-to-digital resolution (e.g., 10-bit on Arduino) is sufficient for your application.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings

    • Cause: Incorrect wiring or loose connections.
    • Solution: Double-check the connections, ensuring VCC, GND, and Signal pins are correctly connected.
  2. Output Does Not Change with Light

    • Cause: Insufficient light intensity or a damaged LDR.
    • Solution: Test the module with a flashlight or in a brighter environment. Replace the module if necessary.
  3. Fluctuating Readings

    • Cause: Electrical noise or unstable power supply.
    • Solution: Use a decoupling capacitor (e.g., 0.1 µF) between VCC and GND to stabilize the power supply.

FAQs

Q: Can the KY-018 detect very low light levels?
A: Yes, the KY-018 is sensitive to low light levels, but its response time may increase in darker conditions.

Q: Can I use the KY-018 with a 3.3V microcontroller like the ESP32?
A: Yes, the KY-018 operates within a voltage range of 3.3V to 5V, making it compatible with 3.3V microcontrollers.

Q: How do I calibrate the KY-018 for my application?
A: You can calibrate the module by mapping the analog readings to specific light intensity levels using a reference light source and adjusting your code accordingly.

Q: Is the KY-018 suitable for outdoor use?
A: The KY-018 is not weatherproof. If used outdoors, ensure it is enclosed in a protective casing to prevent damage from moisture and dust.