IOT

How to Interface Arduino with Flame Sensor?

 Fire is an unexpected destructive event that could easily spread and fetch a big loss of social assets and human life.  As prevention is always better than cure in the case of a fire, preventive measures are absolutely necessary. 

The most usual causes of house fires are electrical distribution, lighting systems, cooking, Etc. In this technological era, the use of engineering is the best way to avoid such accidents. As a result, fire safety components should be installed in both the home and the workplace. 

We have already discussed the  IoT-based Automatic smoke detection system that can perform and even monitor the smoke condition of a room.  It also allows us to alert users and the Fire and Rescue Department when a certain level of smoke is detected by a gas sensor. In this blog, we will discuss how to interface a Flame Sensor with Arduino which is a critical step in Fire Detection System

What is a Fire Detection System?.

A Fire detector is designed as an electronic fire-protection device that automatically senses the presence of smoke, as a key indicator of fire, and sounds a warning to building occupants. These smoke detectors provide a signal to a fire alarm control panel as part of a building’s central fire alarm system or produce an audible and visual signal locally in a household smoke detectors, or smoke alarms. 

Hardware Required

  • Arduino Uno
  • Flame Sensor
  • Buzzer
  • Jumper wires
  • Breadboard
  • USB Cable

Arduino Uno:

This microcontroller is open-source based on the Microchip ATmega328P developed by Arduino. cc. The current version of Arduino Uno comes with a USB interface, 14 digital I/O pins, 6 analog pins, an ICSP header, 16 MHz ceramic resonators, a power jack,  and a reset button. An Atmega328 microcontroller is used to connect with external electronics circuits.

Features:

  • Microcontroller: ATmega328
  • Operating Voltage: 5V
  • Input Voltage (recommended): 7-12V
  • Input Voltage (limits): 6-20V
  • Digital I/O Pins: 14 (of which 6 provide PWM output)
  • Analog Input Pins: 6
  • DC Current per I/O Pin: 40 mA
  • DC Current for 3.3V Pin: 50 mA
  • Flash Memory: 32 KB of which 0.5 KB is used by the bootloader
  • SRAM: 2 KB (ATmega328)
  • EEPROM: 1 KB (ATmega328)
  • Clock Speed: 16 MHz

Flame Sensors

A Fire Sensor or detector is a sensor designed to detect and respond to the presence of a flame or fire, allowing flame detection. A flame detector can often respond faster and more accurately than a smoke or heat detector due to the mechanisms it uses to detect the flame.

The flame sensor is known as one of the prominent sensors used to detect and respond to the presence of fire or flame. The module is designed based on the IR receiver and basically detects the presence of flammable gases likes nitrogen, hydrogen, and carbon mono oxide. These sensors can be directly interfaced with the I/O pins of processors and controllers. It operates at a wavelength of the range of 760 nm to 1100 nm in the light source. A flame sensor can even detect lighter flame at roughly 0.8m. This provides a detection angle of roughly 60 degrees and the sensor is particularly sensitive to the flame spectrum.

Moreover, this flame sensor is based on a YG1006 sensor which is a high speed and high sensitive NPN silicon phototransistor. Due to its black epoxy construction, the sensor is highly sensitive to infrared radiation. The flame sensor is defined as an ideal solution in a firefighting robot, which is used as a robot’s eyes to find the fire source. When any flame is detected, the Signal LED will light up, and thereby D0 pin goes LOW. The far-infrared flame probe in the sensor converts the light detected in the form of infrared light into current changes.

Features of a Flame Sensor:

  • Operating voltage 3.3V-5V.
  • Wavelength range: 760 nm-1100 nm
  • Detection angle: up to 60 degrees
  • Detection range: up to 100 cm.
  • Comparator chip LM393 makes module readings stable.
  • Sensitivity adjustable
  • Detects a flame or a light source of a wavelength in the range of 760nm-1100 nm.
  • Adjustable detection range
  • High Photo Sensitivity
  • Easy to use
  • Fast Response Time
  • Sensitivity adjustable
  • Detects a flame or a light source of a wavelength in the range of 760nm-1100 nm.
  • Digital and Analog Output.
  • Power indicator and digital switch output indicator
  • Dimensions : 14.8 x 6.4 x 2 cm
  • Weight: 10 gm

Pin Description

PinDescription
Vcc3.3 – 5V power supply
GNDGround
DoutDigital output

In order to adjust the sensitivity level, an onboard LM393 op-amp was used as a comparator. Thus the module provides analog and digital outputs.  The analog output gives a real-time voltage output signal on thermal resistance, and digital allows temperature thresholds set via a potentiometer.

Application

  • Hydrogen stations
  • Combustion monitors for burners
  • Oil and gas pipelines
  • Automotive manufacturing facilities
  • Nuclear facilities
  • Aircraft hangars
  • Turbine enclosures

Interfacing Flame Sensor with Arduino Uno

Make the connection as shown in the diagram below to connect the flame sensor to Arduino.

VCC, GND, and DO are the three pins of the Flame Sensor (some may have four). Connect VCC and GND to the power supply’s +5V and GND (or to the Arduino’s +5V). The DO (short for Digital Output) is connected to the Arduino’s Digital I/O Pin 11.

A Buzzer is used to indicate the detection of a flame or fire. A 1K Resistor, an NPN Transistor (such as 2N2222 or BC548), a 5V Buzzer, and a PN Junction Diode make up the Buzzer circuit. The buzzer is powered by the Arduino UNO’s Digital I/O 12 pin.

The flame sensor is triggered when it detects fire or flame. This sensing is dependent on variables like humidity, temperature, and smoke, among others. These signals can be analog or digital in nature. The flame sensor’s digital output was utilized in this project.

When Arduino receives this signal, it responds by performing the appropriate action. This could include the sounding of a buzzer or any other fire-fighting activity. As a detection device, we’ve linked a buzzer.

When the flame sensor detects a fire, the buzzer begins to ring, as shown above.

The detection range of a flame can be up to 100 cm. Furthermore, fire suppression may be triggered as a result of the detection system.

Code



const int buzzerPin = 5;
const int flamePin = 2;
int Flame = HIGH;

void setup() 
{
  pinMode(buzzerPin, OUTPUT);
  pinMode(flamePin, INPUT);
  Serial.begin(9600);
}

void loop() 
{
  Flame = digitalRead(flamePin);
  if (Flame== LOW)
  {
    Serial.println(“Fire is Detected”);
    digitalWrite(buzzerPin, HIGH);
  }
  else
  {
    Serial.println(“No Fire is Detected”);
    digitalWrite(buzzerPin, LOW);
  }

Working

Connect the wires and upload the code to the Arduino UNO. Place a lighted lighter or a match stick in front of the flame sensor to check its operation. Place any fire source in front of the flame sensor after downloading the code to the Arduino board.

The Flame Sensor’s output is HIGH under normal conditions. When a fire is detected, the sensor’s output turns LOW. The Buzzer is activated when Arduino detects a LOW signal on its input pin.

NOTE: The sensor’s sensitivity can be adjusted using the onboard 10K Potentiometer.

Conclusion

Hope this blog helps you to understand how to interface Flame sensor with Arduino. We, MATHA ELECTRONICS will come back with more informative blogs.

Leave a Reply

Your email address will not be published.