Skip to content

Light · Arduino Uno guide

Interfacing IR Flame Sensor Module with Arduino Uno

Infrared flame detector for early fire-alert projects.

Updated November 14, 2026 Arduino C++None — built-in analogRead/digitalRead

Flame Sensor practical reference

An IR-photodiode-based sensor tuned to detect the infrared signature of open flame, popular in DIY fire-alarm and safety projects. It uses an infrared photodiode sensitive to the specific wavelength range emitted by a flame (roughly 760-1100nm), producing both a digital threshold output and a proportional analog signal so a microcontroller can detect not just the presence of fire but roughly how close or intense it is — a common building block for fire-alert systems, candle-detection demos, and safety shutoffs.

Key specifications

  • Sensor type: IR photodiode flame sensor with LM393 comparator driver board
  • Operating voltage: 3.3V–5V DC
  • Operating current: ~15 mA typical
  • Detection wavelength: ~760-1100nm (the IR range associated with combustion flame)
  • Detection angle: ~60° cone typical
  • Detection range: ~20cm-100cm for a small open flame (like a candle or lighter), depending on flame size and sensitivity setting
  • Digital output (DO): Goes LOW when flame IR is detected above the threshold set by the onboard potentiometer (HIGH otherwise, on most boards)
  • Analog output (AO): Continuous voltage proportional to detected flame IR intensity
  • Interface: 1 digital pin (threshold trigger) + 1 analog pin (intensity reading)

Pinout and connection notes

Because this sensor responds to IR wavelengths, direct sunlight or strong incandescent lighting can trigger false positives — test the sensitivity potentiometer setting in the actual deployment environment rather than assuming lab/indoor test conditions will match. This is a hobby-grade detection aid and should not be relied upon as a certified life-safety fire alarm.

  • VCC: Power, 3.3–5V DC
  • GND: Ground
  • DO: Digital output — threshold-triggered flame detection
  • AO: Analog output — proportional to detected flame intensity

Integration checklist

  1. Confirm the exact part number and breakout-board revision.
  2. Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
  3. Check controller pin assignments and bus address or interface mode against the example code.
  4. Power up with external loads disconnected, then test signals before full integration.
  5. If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.

Troubleshooting and reproducibility

Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.

Specifications

Sensor element
Infrared-sensitive photodiode on a hobby breakout board; spectral response varies by sensor
Board circuitry
Common modules include an LM393-style comparator and sensitivity potentiometer
Outputs
Digital threshold output is common; analog output exists only on some board revisions
Supply
Many modules accept 3.3–5 V, but verify the exact board and output levels
Detection
Responds to infrared energy; range and angle depend on flame size, background, optics and adjustment
False triggers
Sunlight, incandescent sources, reflections and other IR sources can trigger the sensor
Safety
Not a certified fire detector and not suitable as the sole protection for people or property

Pinout

PinNameDescription
VCCSupplyConnect to the voltage supported by the specific breakout board.
GNDGroundCommon ground with the controller.
DOComparator outputDigital threshold signal; active polarity and pull-up behavior depend on the module. Test before relying on HIGH/LOW meaning.
AOAnalog outputPresent only on some module variants; check the board markings and measure its output range before connecting to an ADC.

Wiring & code

Setting up Flame Sensor with Arduino Uno

Library

None — built-in analogRead/digitalRead by —

No library needed; uses core Arduino functions only.

Wiring

Component pinArduino Uno pinNote
VCC5V
GNDGND
AOA0Lower reading = closer/stronger flame.
DOD2Digital trip point, set by onboard potentiometer.
sketch.ino
#include <Arduino.h>
#define FLAME_AO A0
#define FLAME_DO 2

void setup() {
  Serial.begin(9600);
  pinMode(FLAME_DO, INPUT);
}

void loop() {
  int level = analogRead(FLAME_AO);
  bool flameDetected = !digitalRead(FLAME_DO); // active LOW on most breakout boards

  Serial.print(F("IR level: ")); Serial.print(level);
  Serial.print(F("  Flame: ")); Serial.println(flameDetected ? F("YES") : F("no"));
  delay(200);
}
  • This is an IR-flame sensor, not a smoke/heat detector — it responds to the IR spectrum a flame emits, so strong sunlight or IR remotes can cause false positives.
  • Detection range is roughly 20-100cm depending on flame size; test your threshold potentiometer setting at the actual distance you plan to use.
  • Do not rely on this alone for life-safety fire detection — pair with a proper smoke detector for anything safety-critical.

Keep learning

Related guides & projects