Robot Pi Shop

KY-018 Mini Photosensitive Sensor Module

$1.25

Shipping calculated at checkout.

Quantity

KY-018 Mini Photosensitive Sensor Module – LDR Light Sensor for Arduino & ESP32

The KY-018 Mini Photosensitive Sensor Module is a compact analog light sensor designed to detect changes in ambient light intensity.

Featuring a Light Dependent Resistor (LDR), also known as a photoresistor, the module changes its electrical resistance according to the amount of light it receives. The resulting analog voltage can be measured by a microcontroller to monitor surrounding light conditions.

The KY-018 is ideal for Arduino, ESP32, Raspberry Pi projects with an external ADC, automatic lighting systems, robotics, and DIY electronics applications.

Key Features

  • Model: KY-018
  • Sensor Type: Light Dependent Resistor (LDR)
  • Detection Method: Ambient Light Intensity
  • Output Type: Analog Voltage
  • Operating Voltage: Typically 3.3V–5V DC
  • Light Sensitivity: Resistance Changes with Light Intensity
  • 3-Pin Interface: Signal (S), VCC (+), GND (-)
  • Compact and Lightweight PCB Design
  • Easy Integration with Microcontrollers
  • Suitable for Automatic Lighting and Light Detection Projects

Technical Specifications

Parameter Specification
Model KY-018
Product Type Mini Photosensitive Sensor Module
Sensor Element LDR / Photoresistor
Sensor Technology Photoconductive
Detection Type Ambient Light
Operating Voltage Typically 3.3V–5V DC
Output Type Analog Voltage
Light Response Resistance Decreases as Light Increases
Output Voltage Range Approximately 0V to Supply Voltage
Number of Pins 3
Pin Configuration S / + / -
Onboard Resistor Typically 10kΩ
Board Dimensions Approximately 18.5 × 15mm
Interface Analog ADC Input
Light Measurement Relative Light Level

Pin Configuration

Pin Function
S Analog Light Sensor Output
+ Power Supply
- Ground

Arduino Connection Example

KY-018 Arduino Uno
S A0
+ 5V
- GND

The Arduino reads the analog voltage from the LDR circuit. The reading changes as the surrounding light intensity increases or decreases.

Arduino Example Code

const int lightSensorPin = A0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int lightValue = analogRead(lightSensorPin);

  Serial.print("Light Sensor Value: ");
  Serial.println(lightValue);

  delay(500);
}

The Arduino Uno returns an analog reading from 0 to 1023, representing the voltage measured at the sensor output.

Depending on the module's voltage-divider arrangement, the reading may increase or decrease as the light intensity increases.

Applications

  • Automatic Lighting Systems
  • Day and Night Detection
  • Arduino and ESP32 Projects
  • Ambient Light Monitoring
  • Robotics and Automation
  • Smart Home Projects
  • Light-Activated Alarms
  • DIY Weather Stations
  • Educational STEM Projects
  • Electronic Prototyping

Important Notes

  • The KY-018 is an analog light sensor, not a digital light sensor.
  • It provides relative light intensity readings rather than calibrated lux measurements.
  • The module does not normally include an adjustable sensitivity potentiometer.
  • A microcontroller with an ADC is required to read the analog output.
  • Raspberry Pi boards require an external ADC, such as the MCP3008 or ADS1115, because they do not have built-in general-purpose analog inputs.
  • For ESP32, power the module at 3.3V to keep its output within the microcontroller's ADC voltage limits.
  • The response depends on the photoresistor characteristics, ambient lighting, and module circuit.
  • The sensor is suitable for detecting gradual light changes but is not intended for high-speed optical communication.
  • Verify the pin configuration of the supplied module before connecting power.

Package Includes

1 × KY-018 Mini Photosensitive Sensor Module