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
- Confirm the exact part number and breakout-board revision.
- Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
- Check controller pin assignments and bus address or interface mode against the example code.
- Power up with external loads disconnected, then test signals before full integration.
- 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.
Flame Sensor at a glance
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
| Pin | Name | Description |
|---|---|---|
| VCC | Supply | Connect to the voltage supported by the specific breakout board. |
| GND | Ground | Common ground with the controller. |
| DO | Comparator output | Digital threshold signal; active polarity and pull-up behavior depend on the module. Test before relying on HIGH/LOW meaning. |
| AO | Analog output | Present only on some module variants; check the board markings and measure its output range before connecting to an ADC. |
Wiring & code
Board integration
Library
None — built-in analogRead/digitalRead by —
No library needed; uses core Arduino functions only.
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VCC | 5V | |
| GND | GND | |
| AO | A0 | Lower reading = closer/stronger flame. |
| DO | D2 | Digital trip point, set by onboard potentiometer. |
#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.
