2 pin flame sensor interfacing with Arduino | Fire detection alarm | Working

Flame Sensor Description: A flame sensor or a flame sensor module is a device that detects flame or fire around it. Fire alarm or fire detection is very important to deal with fire, so in this experiment, we will see how to interface/ connect a 2 pin flame sensor with the Arduino board mainly with Arduino UNO.
Flame Sensor

 Material Required: One flame sensor (2 pins), one 330 k ohm resistor, one breadboard, several connecting wires, an active buzzer (you can take any speaker).

Flame Sensor Working: 

    1. Connect the flame sensor to the breadboard.

Flame Sensor

    2. Connect one end of the resistor (330 k ohm) to the negative end of the flame sensor (the leg which is smaller in the length of the flame sensor is the negative one) and another end of the resistor to            5V of the Arduino.

Flame Sensor
    3. Connect the positive terminal of the flame sensor (the leg which is bigger in size) to the GND (ground) pin of the Arduino Uno (see the black wire).

Flame Sensor
    4. Again connect the negative terminal of the flame sensor to the Analog pin (A0) of the Arduino board (see the orange wire). 

Flame Sensor
    5. Now connect the other end of the resistor to the 5V pin of the Arduino Pin (see the white wire). 

Flame Sensor
    6. Let us now connect the Active buzzer, connect the positive end of the buzzer to digital pin 8 (see the blue wire), and the negative terminal of the buzzer to the GND (see the yellow wire).

Flame Sensor

    You may also like:

    Arduino Sketch:


    int flameSensorPin = 0; //  a0 
    int flameSensorReading; 
    int buzzerPin=8; 
    void setup(void) 
    {  
      Serial.begin(9600);
      pinMode(buzzerPin,OUTPUT);
    void loop(void) 
      flameSensorReading = analogRead(flameSensorPin);  
      if(flameSensorReading<1023)
    {
      digitalWrite(buzzerPin,HIGH);
    }
    else
    {
      digitalWrite(buzzerPin,LOW);
    }
     Serial.print("Analog reading = "); 
     Serial.println(flameSensorReading); // the raw analog reading delay(1000); 
     delay(500);
    }




    Thank you!

    Post a Comment

    1 Comments