KY-026 Flame Sensor Module

The KY-026 Flame Sensor module detects infrared light emitted by fire. This module has both digital and analog outputs and a potentiometer to adjust the sensitivity. Commonly used in fire detection systems.

Compatible with Arduino, Raspberry Pi, ESP32 and other microcontrollers.

KY-026 flame detector sensor module fritzing part
Arduino KY-026 Flame detector sensor module

KY-026 Specifications

This module consist of a 5mm infra-red receiver LED, a LM393 dual differential comparator, a 3296W trimmer potentiometer, 6 resistors,2 indicator LEDs and 4 male header pins. The board features an analog and a digital output.

Operating Voltage3.3V ~ 5.5V
Infrared Wavelength Detection760nm ~ 1100nm
Sensor Detection Angle60°
Board Dimensions1.5cm x 3.6cm [0.6in x 1.4in]

Connection Diagram

Connect the board’s analog output (A0) to pin A0 on the Arduino and the digital output (D0) to pin 3.

Connect the power line (+) and ground (G) to 5V and GND respectively.

A0Pin A0
D0Pin 2
Arduino KY-026 connection diagram

KY-026 Arduino Code

In this Arduino sketch we’ll read values from both digital and analog interfaces on the KY-026, use a lighter or a candle to interact with the flame detector module.

The digital interface will send a HIGH signal when fire is detected by the sensor, turning on the LED on the Arduino (pin 13). Turn the potentiometer clock-wise to increase the detection threshold and counter-clockwise to decrease it.

The analog interface with return a high numeric value when there’s no flame near and it’ll drop to near zero in the presence of fire.

int led = 13; // define the LED pin
int digitalPin = 2; // KY-026 digital interface
int analogPin = A0; // KY-026 analog interface
int digitalVal; // digital readings
int analogVal; //analog readings

void setup()
  pinMode(led, OUTPUT);
  pinMode(digitalPin, INPUT);
  //pinMode(analogPin, OUTPUT);

void loop()
  // Read the digital interface
  digitalVal = digitalRead(digitalPin); 
  if(digitalVal == HIGH) // if flame is detected
    digitalWrite(led, HIGH); // turn ON Arduino's LED
    digitalWrite(led, LOW); // turn OFF Arduino's LED

  // Read the analog interface
  analogVal = analogRead(analogPin); 
  Serial.println(analogVal); // print analog value to serial


Use Tools > Serial Plotter on the Arduino IDE to visualize the values on the analog interface, in this example we used a lighter to create a small flame every couple of seconds. You can see the values decreasing as the flame gets closer to the sensor and then increasing when the flame moves away from the sensor.


Leave a Comment