KY-026 Flame Sensor Module

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


The KY-026 consist of a 5mm infra-red receiver LED, a LM393 dual differential comparator a 3296W trimmer potentiometer, six resistors and two indicator LEDs. The board features an analog and a digital output.


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


Arduino KY-026 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.

Arduino KY-026 connection diagramclick to enlarge

KY-026 Arduino Example 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.

KY-026 arduino serial plotter

Inline Feedbacks
View all comments