Home Top Ad

KY-026 Flame Sensor Module

KY-026 flame sensor module for Arduino detects infrared light emitted surroundings for the occurrence of fire.

It is based on the YG1006 sensor which is a high speed and high sensitive NPN silicon phototransistor.

Module has both digital and analog outputs and a trimmer potentiometer to adjust the sensitivity.

The module is commonly used in fire-flame detection systems.

KY-026 module Specification

The quick specification of KY-026 flame sensor module:
  • Module: KY-026
  • Type: Both (digital and analog)
  • Chip: LM393 comparator
  • Operating Voltage: DC 3.3V to 5.5V
  • Maximum Current: 15mA
  • Infrared Wavelength Detection: 760 nm to 1100 nm
  • Sensor Detection Angle: 60°
  • LED Lights Indicators: Power indicator (LED1), Trigger indicator (LED2)
  • Board Dimensions: 1.5cm x 3.6cm [0.6in x 1.4in]

Pinout of KY-026 module

The ky-026 flame sensor module circuit board has 4 male connector pins, they are -
  1. AO: Analog Out
  2. G: GND (Ground)
  3. +: Vcc (+3.3V to +5V)
  4. DO: Digital Out

KY-026 module Circuit diagram

Schematic of ky-026 flame sensor module circuit shown below.

Working principle of KY-026 module

Inside the module consist of a 5mm YG1006 infra-red receiver LED, an LM393 dual differential comparator, a trimmer potentiometer, six resistors, and two indicator LEDs are used.

The working principle of the KY-026 flame sensor module circuit is simple.

The sensor basically detects IR (Infra-Red) light wavelength between 760 nm – 1100 nm (nanometer) that is emitted from the fire flame.

The operating voltage is dc +3.3V to +5V, LED1 shows as a power indicator in the circuit board.

YG1006 IR sensors like all other photosensors work on the principle that a photon of sufficient energy can knock out electrons so that the resistance of the circuit is changed.

LM393 comparator integrated circuit convert this resistance and gives two types of output values.

One is Logic value in IC pin-2 and the other is Numerous value in IC pin-5 through the potentiometer.

When the sensor detects the fire, a HIGH signal (or logic 1) will give in digital output pin, otherwise, it gives logic 0.

However, a high numeric value will return when there's no flame near and it'll drop to near zero in the presence of fire.

Turn the potentiometer clockwise to increase the detection threshold and counter-clockwise to decrease it.

The LED2 turn ON only if the sensor detects a flame.

Interfacing KY-026 module with Arduino

Connection diagram of the KY-026 Flame sensor module.

Connect the module's analog output (AO) to pin A0 on the Arduino board and the digital output (DO) to pin 3.

To power, the module connects the power line (+) and ground (G) to +5V and GND respectively.

KY-026 module Arduino Example Code

In the above Arduino sketch, we'll read values from both digital and analog interfaces on the KY-026 fire sensor module.

Use a lighter/candle to interact with the flame sensor module, turning on the LED on the Arduino (pin 13) shows the fire is detected. Use Tools > Serial Plotter on the Arduino IDE to visualize the values on the analog interface.

Program/Source Code:
int led = 13; // initializing pin 13 as the LED pin
int digitalPin = 2; // initializing pin 2 as KY-026 digital interface
int analogPin = A0; // initializing pin A0 as KY-026 analog interface
int digitalVal; // state of digital readings
int analogVal; // state of 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 if a flame is detected
    digitalWrite(led, LOW); // otherwise turn OFF Arduino's LED

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



If you have any doubts or questions, please let me know. Don't add links as it goes to spam. Share your valuable feedback. Thanks