
Fire detection is crucial for both residential and industrial applications. A flame sensor is a device that detects fire by sensing infrared or ultraviolet light emitted by flames. When combined with an Arduino, it can help create an automated fire detection system. In this guide, we’ll cover everything you need to know about using a flame sensor with Arduino, from wiring and coding to troubleshooting and advanced applications.
Infrared (IR) Flame Sensors – Detect infrared radiation emitted by flames.
Ultraviolet (UV) Flame Sensors – Detect UV rays produced by combustion.
Combined UV-IR Sensors – Offer enhanced fire detection by sensing both UV and IR light.
A flame sensor detects specific wavelengths of light emitted by a fire. The sensor module converts this light into an electrical signal, which is then interpreted by a microcontroller such as an Arduino.

Operating Voltage: 3.3V to 5V
Detection Range: 760nm – 1100nm (for IR sensors)
Response Time: Fast response, typically within milliseconds
Detection Angle: 60-120 degrees depending on the sensor type
If you need quick response time, use a UV-based flame sensor.
For standard applications, IR flame sensors are cost-effective.
Ensure the sensor’s voltage is compatible with Arduino (typically 5V).
Arduino Uno (or any compatible board)
Flame Sensor Module
Jumper Wires
LED for Output Indication
Buzzer for Alarm (optional)
Connect the Flame Sensor to Arduino:
VCC → 5V on Arduino
GND → GND on Arduino
OUT: Digital Pin 7 on Arduino
Connect an LED (optional) for indication.

int flamePin = 7;
int ledPin = 13;
void setup() {
pinMode(flamePin, INPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
int flameState = digitalRead(flamePin);
if (flameState == LOW) {
digitalWrite(ledPin, HIGH);
Serial.println("Fire detected!");
} else {
digitalWrite(ledPin, LOW);
}
delay(1000);
}
Light a small flame (e.g., candle) near the sensor and observe the LED/buzzer.
Adjust the sensitivity using the onboard potentiometer if needed.
Home Fire Alarm Systems
Industrial Fire Detection
Robotic Fire Extinguishers
Check the wiring and power supply if the sensor isn’t detecting fire.
If false alarms occur, adjust the sensor’s sensitivity.
Using a flame sensor with Arduino is an effective way to detect fire and enhance safety. With proper wiring, calibration, and coding, you can build a reliable fire detection system for various applications.