How does the IR flame sensor work

Detection of flames and fire with the Multi Function Shield and an IR flame sensor module

The Multi Function Shield, which I have already introduced, offers a good basis for trying out sensors with the possibility of simply displaying data on its 4-way, 7-segment display and the free connection pins.

This time, a fire alarm is to be implemented with the MFS and a flame sensor module.

Sensor YG1006

The heart of the flame detection module is the component YG1006, which looks like a 5mm LED with a black head. However, it is a phototransistor that is located in a black epoxy housing and thus only receives infrared radiation. The long leg is the emitter, the short one is the collector.

The technical data are:
  • Collector-emitter voltage: 30 V
  • Emitter-collector voltage: 5 V
  • Power consumption: 20 mA / 75 mW

As a glance at the data sheet shows: the higher the measured temperature, the lower the current that the YG1006 delivers. Up to room temperature (25 °) this is about 75 mW, i.e. 15 mA at 5V. Then it falls linearly to a temperature of 85 ° C, at which it finally delivers almost no current (0 mA).

However, it should be remembered that artificially generated infrared radiation, e.g. B. by an IR remote control that hits the sensor, also leads to a rash.

Flame sensor module

The YG1006 is usually offered ready-soldered on a module. Then it usually has the name KY-026 or it comes nameless on one HW-484Board (which is also used for other sensor modules).

In addition to the actual flame sensor, an LM393-IC, a potentiometer, 2 LEDs and a few resistors are installed here.

With the LM393, currents can be compared, starting from 25 nA. Together with the potentiometer, it is responsible for setting the value at the analog output AO. The sensitivity of the flame detection can be set on the potentiometer. This changes the analog value.

The lower LED lights up as soon as the power supply is present and signals readiness. From an analog value of 500 (from 1023) the digital output switches to HIGH and the upper LED lights up.

The module has 4 header pins that are connected as follows:

Only 4 female-female-Dupont cables are required for this.


The test program shows the analog value on the 4-way, 7-segment display. Here a high number means: no flame detected and a low number means: flame detected.

If the digital output of the sensor goes to HIGH, an alarm is triggered, which is signaled by all 4 LEDs flashing on the MFS and a recurring beep. The acoustic alarm (beep) can be switched off by pressing the 2nd button and switched on again by pressing the 1st button.

If the fixed value of 500 analog units, which is specified by the module, seems too high, you can also evaluate the analog value to switch the alarm. The necessary adaptation to the program is easy.

Source code