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 ability to detect varying light levels makes it an essential component for projects requiring light-based automation or monitoring.

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 electronics and Arduino projects
  • Security systems with light detection
  • Solar tracking systems

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, as described below:

Pin Name Description
Signal Outputs the analog voltage signal proportional to light intensity
VCC Power supply input (3.3V to 5V)
GND Ground connection

Usage Instructions

How to Use the KY-018 in a Circuit

  1. Connect the Pins:

    • Connect the VCC pin to a 3.3V or 5V power supply.
    • Connect the GND pin to the ground of your circuit.
    • Connect the Signal pin to an analog input pin of your microcontroller (e.g., Arduino).
  2. Read the Signal:

    • The Signal pin outputs an analog voltage that varies with light intensity. Higher light intensity results in a lower resistance of the LDR, increasing the voltage at the Signal pin.
  3. Voltage Divider:

    • The module uses a voltage divider circuit with the LDR and a fixed resistor. The output voltage can be calculated using the formula: [ V_{out} = V_{in} \times \frac{R_{LDR}}{R_{LDR} + R_{fixed}} ]
    • Here, ( R_{LDR} ) is the resistance of the LDR, which changes with light intensity.

Arduino Example Code

Below is an example of how to use the KY-018 with an Arduino UNO to measure light intensity:

// KY-018 LDR Photo Resistor Example Code
// Reads the analog signal from the KY-018 module and prints the light intensity
// to the Serial Monitor.

const int ldrPin = A0; // Connect the Signal pin of KY-018 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 ldrValue = analogRead(ldrPin); // Read the analog value from the LDR
  Serial.print("Light Intensity (Analog Value): ");
  Serial.println(ldrValue); // Print the light intensity value to Serial Monitor
  
  delay(500); // Wait for 500ms before the next reading
}

Important Considerations

  • Power Supply: Ensure the module is powered within its operating voltage range (3.3V to 5V).
  • Analog Input: Use an analog input pin on your microcontroller to read the signal.
  • Light Sensitivity: The LDR is sensitive to visible light. Avoid exposing it to extreme light conditions for prolonged periods to prevent damage.
  • Calibration: Depending on your application, you may need to calibrate the readings to map the analog values to actual light intensity levels.

Troubleshooting and FAQs

Common Issues and Solutions

Issue Possible Cause Solution
No output signal Incorrect wiring Double-check the pin connections.
Signal value not changing LDR not exposed to varying light levels Test with a flashlight or cover the LDR.
Unstable or noisy readings Electrical noise or loose connections Use shorter wires and ensure secure connections.
Arduino not detecting the module Incorrect analog pin configuration Verify the pin number in the code.

FAQs

  1. Can the KY-018 detect infrared light?

    • No, the KY-018 is designed to detect visible light and is not sensitive to infrared light.
  2. What is the maximum distance for light detection?

    • The detection range depends on the intensity of the light source. Brighter light sources can be detected from greater distances.
  3. Can I use the KY-018 with a Raspberry Pi?

    • Yes, but since the Raspberry Pi lacks analog input pins, you will need an external ADC (Analog-to-Digital Converter) to read the signal.
  4. How do I map the analog values to lux (light intensity)?

    • The KY-018 does not provide direct lux readings. You can calibrate the module using a lux meter and map the analog values accordingly.

By following this documentation, you can effectively integrate the KY-018 LDR Photo Resistor into your projects for reliable light sensing functionality.