Arduino Flame Sensor Interface

arduino flame sensor

Build fire alarm or fire detector using Flame sensor and Arduino board, the sensor basically detects IR (Infra Red) light wavelength between 760 nm – 1100 nm (nano meter) that is emitted from fire flame. Most of the flame sensors came with YG1006 sensor which is a high speed and high sensitive NPN silicon photo transistor. It is covered with black epoxy, since the sensor is sensitive to infrared radiation. By using this concept project you can understand how to monitor and alert about fire flame, It is most suitable for fire fighting robot, fire alarm etc..,

Flame Sensor

Flame Sensor

The flame sensors available in the market with two categories one is having three pins (D0, Gnd, Vcc) and second one is having four pins (A0, D0, Gnd, Vcc) both are can be easily interfaced with Arduino and arduino compatible boards.

If you wish to connect manually without any sensor module you can try the following circuit with discrete components, yes you can :-)

Flame Sensor Circuit Diagram

fdsfassa

Circuit diagram Source: http://forum.arduino.cc/index.php?topic=394981.0

Choose comparator amplifier for output drive and make two possible output as A0 and D0, here

D0 – Give Zero output for nothing detected and One for a +Ve detection.

A0 – Give values in range representing the flame probability/size/distance and must be connected to the PWM input of microcontroller.

Testing Angle of Sensitivity

Make little experiment to test the angle of sensitivity for your flame sensor, to find the exact active vision range and angle.

fire sensor

By connecting sensor output pins with multimeter and showing towards flame with different angle and distance gives you describable details about viewing angle.

Arduino Flame sensor Hookup

Analog (A0) Output

arduino flame sensor hookup

 

Digital (D0) Output

arduino flame sensor connection

Connect as per the hookup diagram give power supply from the power source of Arduino board. connect output pin of flame sensor to the Arduino GPIO pin, and upload the following code as per your wish.

Arduino Code for Flame Sensor 

Flame Sensor Digital (D0) Output

 

/* Source: www.theorycircuit.com*/

int Buzzer = 13; // Use buzzer for alert 
int FlamePin = 2;  // This is for input pin
int Flame = HIGH;  // HIGH when FLAME Exposed

void setup() {
  pinMode(Buzzer, OUTPUT);
  pinMode(FlamePin, INPUT);
  Serial.begin(9600);
  
}

void loop() {
  Flame = digitalRead(FlamePin);
  if (Flame== HIGH)
  {
    Serial.println("HIGH FLAME");
    digitalWrite(Buzzer, HIGH);
  }
  else
  {
    Serial.println("No flame");
    digitalWrite(Buzzer, LOW);
  }
}


Flame Sensor Analog (A0) Output

 

/* Source: www.theorycircuit.com */

const int analogPin = A0;    // Flame Sensor (A0) to Arduino analog input pin A0
const int BuzzerPin = 13;       // Buzzer output pin
const int threshold = 400;   // Flame level threshold (You can vary the value depends on your need)

void setup() {
  
  pinMode(BuzzerPin, OUTPUT);
  // initialize serial communications:
  Serial.begin(9600);
}

void loop() {
  // read the value of the Flame Sensor:
  int analogValue = analogRead(analogPin);
   Serial.println(analogValue); //serial print the FLAME sensor value
  
  if (analogValue > threshold) {
    digitalWrite(BuzzerPin, HIGH);
    Serial.print("High FLAME");
  } 
  else if (analogValue = threshold){
    Serial.print("Low FLAME");
    digitalWrite(BuzzerPin, HIGH);
    delay(400);
    digitalWrite(BuzzerPin, LOW);
  }
  else {
    digitalWrite(BuzzerPin, LOW);
    Serial.print("No flame");
  }

  delay(1);       
}

 

Add a Comment

Your email address will not be published. Required fields are marked *