Component guide · Beginner · 3 min read
Flame Sensor Modules

How They Work and Wiring
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
A flame sensor module uses an infrared photodiode that responds to the 760 to 1100 nm light flames give off, plus an LM393 comparator. The digital output changes state when a flame is seen, with sensitivity set by a trimmer, and the analog output shows how strong the IR is. A lighter is detected from about 50 cm to 1 m in front. Sunlight and halogen lamps can trigger it.
Key specs at a glance
- Detector
- IR photodiode or phototransistor, about 760 to 1100 nm
- Outputs
- DO (threshold, usually LOW on flame) and AO (analog strength)
- Range
- About 0.5 to 1 m for a lighter flame, more for larger fires
- Field of view
- About 60°
- Supply
- 3.3 to 5 V
- Variants
- Single sensor, 3-pin DO-only, 5-channel arrays for robots
Wiring and reading
VCC to 3.3 V or 5 V, GND to GND, DO to a digital pin and AO to an analog pin if your module has one. With no flame, adjust the trimmer until the DO LED is just off; then a lighter flame in front turns it on. Most modules pull DO LOW on detection, so check with digitalRead() and the LED.
Use AO to estimate direction: a 5-channel array or two sensors angled apart lets a fire-fighting robot turn towards the stronger reading, then switch on a fan or a small water pump.
Avoiding false alarms
The sensor sees infrared, not flame shape or flicker, so anything hot or bright in IR can trigger it: direct sunlight, halogen and incandescent bulbs, heaters and IR remote controls. Point it away from windows, add a short tube or hood to narrow its view, and in code require the signal to stay on for a few hundred milliseconds. Real flames flicker at roughly 1 to 15 Hz, which code can look for on AO.
It is not a fire alarm
Hobby flame modules are fine for robots, science projects and demonstrations. They are not certified life-safety devices: they cannot detect smoke from a smouldering fire, and they miss flames that are out of their line of sight. Always use a certified smoke alarm for safety. For gas leaks, see the MQ gas sensors guide.
Try it: Voltage divider calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Pointing the sensor at a window or a halogen lamp.
- Reacting to one short reading instead of a sustained signal.
- Using it as a home fire alarm.
- Holding a lit flame too close and melting the module.
- Setting the trimmer so sensitive that room light triggers it.
Frequently asked questions
How far can a flame sensor detect fire?
About 0.5 to 1 m for a lighter flame directly in front, further for a larger fire, within a roughly 60° cone.
Why does my flame sensor trigger in sunlight?
Sunlight contains strong infrared in the same band. Shield the sensor, point it away from windows and require a sustained or flickering signal.
Is DO HIGH or LOW when a flame is detected?
On most modules DO goes LOW and the on-board LED lights. Check your module, as some invert it.
Can a flame sensor replace a smoke detector?
No. It only sees IR from visible flames in its line of sight. Use a certified smoke alarm for safety.
Does it work with ESP32?
Yes. Power it at 3.3 V so both outputs stay within the ESP32's input range.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 11 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.


