The KY-026 Flame Sensor module is an electronic device capable of detecting fire or other light sources that emit wavelengths primarily in the range of 760nm to 1100nm. It is commonly used in safety systems for fire detection and can also serve in robotics and DIY projects where flame sensing is required. The module is sensitive to flame and other sources of infrared light, and it outputs a digital signal when a flame is detected.
Pin | Description |
---|---|
A0 | Analog output pin. Provides an analog voltage proportional to flame intensity. |
D0 | Digital output pin. Outputs HIGH when flame is detected based on the threshold set by the potentiometer. |
GND | Ground pin. Connects to the ground of the power supply. |
Vcc | Power supply pin. Accepts 3.3V to 5V from an external power source. |
// KY-026 Flame Sensor Example Code
int flamePin = 2; // Flame sensor digital output connected to digital pin 2
int flameDetected = LOW; // Variable to hold the flame detection status
void setup() {
pinMode(flamePin, INPUT); // Set the flame sensor pin as input
Serial.begin(9600); // Start serial communication at 9600 baud rate
}
void loop() {
flameDetected = digitalRead(flamePin); // Read the flame sensor output
if (flameDetected == HIGH) {
Serial.println("Flame detected!"); // If HIGH, flame is detected
} else {
Serial.println("No flame detected."); // If LOW, no flame is detected
}
delay(1000); // Wait for 1 second before the next read
}
Q: Can the KY-026 Flame Sensor detect smoke? A: No, the KY-026 is designed to detect flames and infrared light, not smoke.
Q: What is the range of detection for the KY-026 Flame Sensor? A: The sensor can detect flames within approximately 60 degrees of its field of view.
Q: How do I adjust the sensitivity of the sensor? A: Turn the onboard potentiometer clockwise to increase sensitivity and counterclockwise to decrease it.
Q: Can the sensor differentiate between different light sources? A: The sensor is designed to detect infrared light and may not differentiate between different IR light sources.
This documentation provides a comprehensive guide to using the KY-026 Flame Sensor module with an Arduino UNO. For further assistance, consult the manufacturer's datasheet or contact technical support.