The KY-026 Flame Sensor is a compact electronic device designed to detect infrared (IR) radiation emitted by flames. This sensor is widely used in fire alarm systems, fire-fighting robots, and other fire detection applications. It can also be utilized in projects that require flame or heat detection, such as automatic cookers or environmental monitoring systems.
Pin | Description |
---|---|
VCC | Connects to the power supply (3.3V to 5V DC) |
GND | Connects to the ground of the power supply |
DO | Digital output pin, goes high when flame is detected |
AO | Analog output pin, provides an analog voltage proportional to the flame intensity |
// KY-026 Flame Sensor Example Code
int flamePin = 2; // Digital pin connected to the sensor's DO pin
int flameValue = 0; // Variable to store the flame sensor status
void setup() {
pinMode(flamePin, INPUT); // Initialize the flamePin as an input
Serial.begin(9600); // Start serial communication at 9600 baud rate
}
void loop() {
flameValue = digitalRead(flamePin); // Read the digital value from the sensor
if (flameValue == LOW) { // If a flame is detected
Serial.println("Flame detected!");
// Implement additional actions such as activating an alarm or safety mechanism
} else {
Serial.println("No flame 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 infrared radiation from flames, not smoke particles.
Q: What is the range of the sensor? A: The sensor can typically detect flames up to a distance of 1 meter, depending on the size and intensity of the flame.
Q: Is the KY-026 Flame Sensor waterproof? A: No, the KY-026 is not waterproof. Protect it from moisture to ensure proper operation.
Q: Can I use the analog output to determine the size of the flame? A: The analog output provides a voltage proportional to the flame's intensity, which can be used as an approximate measure of the flame size. However, it is not a precise measurement tool for flame size.
This documentation provides a comprehensive guide to using the KY-026 Flame Sensor with an Arduino UNO. For further assistance or advanced applications, consult the sensor's datasheet or contact technical support.