In this tutorial we are going discuss Flame Sensor Interfacing with LPC2148.
Before start this tutorial we should know below topics. If you know already, please go further.
- LPC2148 Development Board
- Flame Sensor
- LCD Module (To print the Sensor output)
Fire is one of the most dangerous events possible; somewhere in the world, one occurs every minute of every day. While fire can be our friend in some instances, it can be our worst enemy when it’s uncontrolled and allowed to continue through a building. Fire is, of course, destructive, and the smoke from a fire creates a toxic, dangerous atmosphere. The rapid detection of a fire and its control can save several thousand lives, thousands of injuries, and millions of dollars in property loss each year.
The flame is the visible portion of the fire. So if we find the flame, then we can also find the fire.
Characteristics of flame
All flames have certain characteristics in common that include:
- Production of heat
- Expansion of gases
- Production of by-product of combustion
- Emission of light (infrared or ultraviolet)
- Ionization of the atmosphere in and around the flame
Flame detection systems have been developed to incorporate several of these characteristics.
Today’s flame detectors utilize optical technologies to detect flames. Flames are known to emit electromagnetic radiation in the infrared (IR), visible light, and ultraviolet (UV) wavelengths depending on the fuel source.
Optical flame sensors are divided into many groups depending on which range of the total radiation band they are designed to detect:
- Ultraviolet detector
- Near IR array
- Infrared thermal cameras
- IR/IR flame detection
- IR3 flame detection
- Visible sensors
Flame detector using Infrared
Since more than 90% of the flame’s total radiation is infrared, these detectors receive ample radiation of quite high intensity and will operate with either very weak or very hot flames. So in this tutorial we are going to use IR flame detector.
Flame sensors are available in the market in two types one having three pins and the other having four pins respectively. Both of the sensors can be easily interfaced to any micro-controller. I am using three pin flame sensor in this tutorial.
Flame sensor can detect fire or any other light sources whose wavelength is in the range of 760nm to 1100nm. This device consists of and IR sensor, an LED for indication, operational amplifier circuit and a potentio-meter. The device is sensitive to flame so when it detects the flame it turns on its LED to show an indication. The sensitivity of the flame sensor can be adjusted according to the requirements. It can be used at different places e.g. in offices, home, institutions, industrial applications.
Flame Sensor Interfacing with LPC2148
- Vcc – 5v
- Gnd – Ground
- D0 – P1.24
- RS – P0.8
- RW – P0.9
- EN – P0.10
- Data Lines – P0.0 – P0.7
If it is detecting any flame in front of this sensor, LCD will display “Flame Detected”.
#define bit(x) (1<<x)
#define delay for(i=0;i<7000;i++);
#define FLAME (IO1PIN & (1<<24))
unsigned int i;
void dat(unsigned char);
void cmd(unsigned char);
void string(unsigned char *);
IO1DIR = 0x0;
void cmd(unsigned char a)
void dat(unsigned char b)
void string(unsigned char *p)
Note: In our tutorial we are using 3-pin sensor. Only Digital output is available in this sensor. If you want to use 4-pin sensor, you can use 4-pin sensor’s D0 Pin. But somebody may want to use A0 pin in 4-pin sensor. In that case you cannot use this example. You need to use ADC for that case since it is not digital output.