Blog
Flame Detect Sensor
What is flame sensor
A flame sensor is an electronic device that can detect flames (or high-temperature heat sources) in the environment and convert them into electrical signals. It’s widely used in fire early warning, safety protection, industrial control, and other fields. Its core function is to quickly determine whether a flame exists by identifying the unique physical characteristics of flames (such as light of specific wavelengths, temperature changes, etc.), and then trigger an alarm or link with other equipment (like fire-extinguishing devices, power-off systems, etc.).
Schematic
Working principle
The combustion process of a flame releases specific forms of energy, and flame sensors detect flames by capturing these characteristics. The common detection principles are as follows.
- Optical detection (most commonly used)
Flames emit light of specific wavelengths when burning (mainly infrared and ultraviolet light), and the flame spectra of different combustibles vary.- Infrared flame sensors: Detect infrared radiation emitted by flames. They use optical filters to filter out interference from other light sources in the environment and only respond to specific infrared signals from flames.
- Ultraviolet flame sensors: Detect ultraviolet radiation generated during flame combustion. This kind of radiation is rare in ordinary ambient light, so they have strong anti-interference ability and are suitable for outdoor or complex light environments.
- Temperature detection
Some sensors are combined with temperature sensors to help determine the existence of flames by detecting a sharp rise in ambient temperature. However, relying solely on temperature detection results in slow response speed, so it’s usually used in combination with optical detection.
Pinout
Component
- Sensitive components: Such as infrared receiving tubes and ultraviolet phototubes, which are responsible for capturing light signals from flames.
- Filter circuit: Filters out interference signals from non-flame light sources to improve detection accuracy.
- Amplifying circuit: Converts weak light signals into recognizable electrical signals (analog or digital).
- Output interface: Transmits processed signals (such as high/low levels, voltage changes) to control devices like single-chip microcomputers.
Three-channel flame sensor
The three-channel flame sensor uses three infrared sensors sensitive to infrared rays, each detecting the infrared radiation wavelength of fire within a specific range. Through a programmable algorithm, it checks the proportion and mutual relationship of the data received by the three sensors to reduce false alarms. This design is based on preventing false alarms and improving the sensitivity of infrared flame detectors. At the same time, each signal channel uses multi-frequency infrared technology and automatic digital scaling technology to further optimize detection performance.
Four-channel flame sensor
The four-channel flame sensor has various technical implementations. Some use three infrared sensors and one ultraviolet sensor, combining the characteristics of flames in the ultraviolet and infrared spectra to improve detection response speed. By utilizing the unique performance of flames in different spectral bands, more accurate flame recognition is achieved. Others use four infrared sensors to achieve more precise flame recognition and background noise suppression.
Five-channel flame sensor
Flame sensor Arduino
Library
This is the Library Manager interface in the Arduino development environment, used to search for and install Arduino libraries
- MFRC522: An Arduino RFID library used to read and write RFID cards or tags through the SPI interface.
- MFRC522-spi-i2c-uart-async: An Arduino RFID library that supports SPI, I2C, and UART interfaces and has asynchronous callback functions.
- MFRC522_fix: Modified based on the original library, it’s an Arduino RFID library used to read and write RFID cards or tags through the SPI interface.
Code
#include
#include //OLED library
#define Firepin 2
#define FireApin 3
#define Fanpin 6
#define Waterpin 7
Adafruit_SSD1306 display(128,64, &Wire, -1);
//Set the screen size of OLED
void setup() {
pinMode(Firepin,INPUT);
pinMode(FireApin,INPUT);
pinMode(Fanpin,OUTPUT);
pinMode(Waterpin,OUTPUT);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);//Initialize OLED and set IIC communication address
}
void loop() {
display.clearDisplay();//Clear screen
display.setTextColor(WHITE);//Setting text color, monochrome OLED is invalid, but must have
display.setTextSize(2);//Set text size
display.setCursor(0, 0);//Set the starting X and Y axes of the text
if(digitalRead(Firepin)==0)
{
display.print("FIRE");
digitalWrite(Fanpin,1);
digitalWrite(Waterpin,1);
}
else
{
display.print("safe");
digitalWrite(Fanpin,0);
digitalWrite(Waterpin,0);
}
display.display();//Execute Display
}