The KY-010 Módulo Foto Interruptor is a light-sensitive module designed to detect light levels using a photoresistor. It is commonly used in projects that require light detection, such as automatic lighting systems, light-sensitive alarms, and other light-based control systems. The module outputs a digital signal, making it easy to interface with microcontrollers like Arduino.
This module is ideal for applications where detecting the presence or absence of light is critical, such as in security systems, environmental monitoring, or interactive projects.
The KY-010 module has three pins, as described in the table below:
Pin Name | Description | Connection Details |
---|---|---|
Signal | Digital output signal (High/Low) | Connect to a digital input pin on a microcontroller |
VCC | Power supply input (3.3V to 5V) | Connect to the 3.3V or 5V pin of the microcontroller |
GND | Ground | Connect to the GND pin of the microcontroller |
Wiring the Module:
Behavior:
Example Circuit:
Below is an example code snippet to use the KY-010 module with an Arduino UNO:
// KY-010 Photoresistor Module Example Code
// This code reads the digital signal from the KY-010 and turns on an LED
// when light is detected.
const int sensorPin = 2; // KY-010 Signal pin connected to digital pin 2
const int ledPin = 13; // Built-in LED on Arduino UNO
void setup() {
pinMode(sensorPin, INPUT); // Set the sensor pin as input
pinMode(ledPin, OUTPUT); // Set the LED pin as output
Serial.begin(9600); // Initialize serial communication for debugging
}
void loop() {
int sensorValue = digitalRead(sensorPin); // Read the KY-010 output
if (sensorValue == HIGH) {
// If light is detected, turn on the LED
digitalWrite(ledPin, HIGH);
Serial.println("Light detected!");
} else {
// If no light is detected, turn off the LED
digitalWrite(ledPin, LOW);
Serial.println("No light detected.");
}
delay(100); // Small delay for stability
}
The module is not detecting light:
Unstable or fluctuating readings:
No output signal:
Q: Can the KY-010 detect infrared light?
A: No, the KY-010 is designed to detect visible light and is not sensitive to infrared light.
Q: Can I use the KY-010 with a 3.3V microcontroller?
A: Yes, the KY-010 operates within a voltage range of 3.3V to 5V, making it compatible with 3.3V systems.
Q: How can I increase the sensitivity of the module?
A: The sensitivity of the KY-010 is fixed, but you can adjust the placement of the module or use additional optics to focus light onto the sensor.
Q: Is the KY-010 suitable for outdoor use?
A: The KY-010 is not weatherproof. If used outdoors, ensure it is protected from moisture and extreme temperatures.
By following this documentation, you can effectively integrate the KY-010 Módulo Foto Interruptor into your projects for reliable light detection.