The KY-026 Flame Sensor is a versatile and sensitive module designed to detect the presence of flames or fire. It operates by sensing the infrared (IR) light emitted by a flame, which is then converted into an electrical signal. This sensor is commonly used in fire alarm systems, fire-fighting robots, and other fire detection applications. Its built-in signal amplifier enhances detection sensitivity, and it provides both analog and digital outputs for interfacing with microcontrollers like the Arduino UNO.
Pin Number | Pin Name | Description |
---|---|---|
1 | A0 | Analog output pin |
2 | GND | Ground |
3 | + | Power supply (3.3V to 5V) |
4 | D0 | Digital output pin (TTL level) |
To use the KY-026 Flame Sensor in a circuit, follow these steps:
+
pin to the 5V output on the Arduino UNO or to a 3.3V to 5V power supply.GND
pin to the ground on the Arduino UNO or to the power supply ground.A0
pin to an analog input on the Arduino UNO if you wish to measure the intensity of the flame.D0
pin to a digital input on the Arduino UNO if you only need a simple flame presence indication.// KY-026 Flame Sensor Example Code
const int analogPin = A0; // Analog output from the flame sensor
const int digitalPin = 2; // Digital output from the flame sensor
const int ledPin = 13; // Onboard LED
void setup() {
pinMode(ledPin, OUTPUT); // Set the LED pin as an output
pinMode(digitalPin, INPUT); // Set the digital pin as an input
Serial.begin(9600); // Start serial communication at 9600 baud
}
void loop() {
int analogValue = analogRead(analogPin); // Read the analog value
int digitalValue = digitalRead(digitalPin); // Read the digital value
Serial.print("Analog Value: ");
Serial.print(analogValue); // Print the analog value
Serial.print(" | Digital Value: ");
Serial.println(digitalValue); // Print the digital value
if (digitalValue == HIGH) { // If a flame is detected
digitalWrite(ledPin, HIGH); // Turn on the LED
} else {
digitalWrite(ledPin, LOW); // Turn off the LED
}
delay(100); // Wait for 100 milliseconds
}
Q: Can the KY-026 Flame Sensor detect smoke? A: No, the KY-026 is designed to detect infrared light from flames and does not detect smoke.
Q: What is the range of the sensor? A: The sensor can typically detect flames within a range of up to 1 meter, depending on the size and intensity of the flame.
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 types of flames? A: The KY-026 sensor does not differentiate between flame types; it detects the presence of IR light within its wavelength range.