Have you ever wondered how fire alarm systems detect flames? In this project, we’ll build a simple Flame Detector using an Arduino Uno and a Flame Sensor Module. When the sensor detects a flame, an LED connected to the Arduino will turn ON, giving a visual indication that fire has been detected.
You can add buzzer in the place of LED for sound alert.
Components Required
| Sr. No. | Component | Quantity |
|---|---|---|
| 1 | Arduino Uno ➤ https://amzn.to/4dBgpHp | 1 |
| 2 | Flame Sensor Module ➤ https://amzn.to/3Sa9WL6 | 1 |
| 3 | LED (Any Color) ➤ https://amzn.to/4tYOLc4 | 1 |
| 4 | 220Ω Resistor ➤ https://amzn.to/4u3aCiH | 1 |
| 6 | Jumper Wires ➤ https://amzn.to/430CfOo | 5 (M-F) |
How Does a Flame Sensor Work?
A flame sensor is designed to detect infrared light emitted by flames. When a flame comes within the sensor’s detection range, the sensor output changes and the Arduino can use this information to trigger an alert.
In this project, we will use the analog output (A0) of the flame sensor to monitor flame intensity.
Circuit Connections
Flame Sensor to Arduino
| Flame Sensor Pin | Arduino Pin |
| VCC (+) | 5V |
| GND | GND |
| A0 | A0 |
LED to Arduino
| LED Connection | Arduino Pin |
| LED (+) via 220Ω Resistor | D13 |
| LED (-) | GND |
Arduino Code
// Flame Sensor + LED — Arduino
// Flame sensor AO → A0, LED → Pin 13 (with 220Ω resistor)
const int flameSensorPin = A0; // Analog output from flame sensor
const int ledPin = 13; // LED pin
const int buzzerPin =8; //Buzzer Pin
const int threshold = 28; //change this value if needed
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buzzerPin, OUTPUT);
Serial.begin(9600);
Serial.println("Flame detector ready");
}
void loop() {
int sensorValue = analogRead(flameSensorPin); // 0–1023
Serial.print("Flame sensor: ");
Serial.println(sensorValue);
if (sensorValue > threshold) {
digitalWrite(ledPin, LOW); //No Flame detected → LED off
} else {
digitalWrite(ledPin, HIGH); // flame → LED on
digitalWrite(buzzerPin, HIGH);
Serial.println(" FLAME DETECTED!");
}
delay(100); // Read ~10 times per second
}
Troubleshooting
- Check all wiring connections.
- Verify the LED polarity (Long leg to 13th pin of arduino, short leg to GND pin of arduino)


Leave a Reply