Flame Sensor Tutorial

Flame Detection with Flame Sensor

Objective

This experiment demonstrates how to detect flame using a flame sensor, which can be used for fire detection and safety systems.

Required Components

Working Principle

The flame sensor detects infrared radiation from a flame or fire. When exposed to a flame, the sensor detects changes in the IR spectrum and sends an output to the microcontroller.

Circuit Diagram

Flame Sensor Circuit Diagram

Follow these steps to wire the flame sensor:

Arduino Code


/*
 * Flame Detection using Flame Sensor
 * This code detects the presence of a flame and outputs the result to the serial monitor.
 */

const int flamePin = 2;  // Flame sensor connected to digital pin 2
int flameState = 0;

void setup() {
    Serial.begin(9600);  // Initialize serial communication
    pinMode(flamePin, INPUT);  // Set the flame sensor pin as input
}

void loop() {
    // Read the flame sensor
    flameState = digitalRead(flamePin);

    // If the flame is detected
    if (flameState == HIGH) {
        Serial.println("Flame Detected!");
    } else {
        Serial.println("No Flame.");
    }

    delay(500);  // Wait for 0.5 seconds
}
            

Results

The serial monitor will display "Flame Detected!" when the sensor detects a flame and "No Flame" when it doesn't.

Applications

Conclusion

The flame sensor is an essential tool for detecting fires, with applications in fire safety, industrial safety, and robotics for fire fighting.