bclose

27 – Arduino and Flame Detectors

Objectives

 

 

    • Introduce flame detectors.
    • Assemble a prototype.
    • Take a look at their features.
 

Bill of materials

Arduino UNO

Arduino UNO or equivalent.

Jumper wires

Some jumper wires.

Buzzer

A piezoelectric buzzer

Flame sensor

A flame detector

 

Flame Detectors

 

It is not surprising that flame detectors are among the best seller gadgets. The industry supplies them in all types, sizes and prices, because the idea that your house or business can get burnt is something that helps a lot to take out the wallet and find a detector able to warn you in advance whether there are flames near your valuable things.

In fact, you’re likely to have several of these detectors in your home. Imagine, for example, gas heaters, household gas ovens, or a simple water heater and a heating.

All of them require a flame burning gas. If for any reason the flame extinguishes and it is not detected, the gas would flow and spread through the room, ready to cause an upsetting explosion.

Therefore, all these appliances, and their industrial counterparts, incorporate, by law, a flame detector that can cut the gas whenever a lack of flame is detected.

The most simple (and cheap) detectors usually include ultraviolet detectors or infrared sensors.

 
  • The market offers also a wide range of sensors as smoke detectors and harmful gases such as carbon monoxide (CO) -a gas typical from combustion-, carbon dioxide (CO2), or dangerous gases such as hydrocarbons (propane, butane and others).
  • If we have time we talk about them in further chapters.
 

In a normal environment, the ignition flame causes a ionization of powerful common gases (actually an ionized plasma, similar to that illuminates a halogen lamp), generating a typical frequency pattern in the ultraviolet range. The detector is a semiconductor sensitive to this frequency range.

When the flame is stabilized, it is relatively easy to detect its infrared spectrum using a photoresistor LDR specifically designed to be sensitive to a characteristic range.

We’ll use a very simple and easy to handle infrared flame sensor. They work by detecting a specific wavelength (about 760 nm) which is characteristic of the flames, although they are relatively easy to deceive and can produce false readings under certain kind of lights.

As everything in life it is a matter of price, and our flame detector is quite cheap so we will have to manage with it. But nevertheless, I am confident, that the outcome of the session would be satisfactory.

This sensor is sold very often encapsulated in a Keyes mount with a potentiometer to adjust the sensitivity, for little money. Even it is sold in multiple formats, with multiple heads pointing in different directions.

Flame sensor in a breakout board
Flame sensor with multiple heads

Normally it is always advisable to use it mounted (because they are easier to use and no wires are released), but as I had a separate detector left on the table I will assemble it on the breadboard to see what happens.

Flame sensor

 

Circuit Wirirng Diagram

 

The common way to read this flame detector would be to use a voltage divider like this:

Voltage divider

R1 should take values about 500k but as I had nothing similar to this, I used four 100k resistors in series to have accurate readings in the Arduino A0 pin. The wiring diagram is something like this:

Chapter 27, schematic diagram

And here we have the circuit wiring diagram for the breadboard:

Chapter 27, wiring diagram

 

The control program

 

The program is quite simple. We have just to read the voltage drop across the voltage divider and generate an acoustic signal with the buzzer as soon as the value of reading in A0 exceeds a certain threshold.

We’ll also recover the Beep() function that we wrote in the Buzzer’s chapter to fire the alarm whenever a flame is detected.

Sketch 27.1
void setup()
   {
       pinMode(9, OUTPUT);
   }

void loop()
   {
       int v = analogRead(A0) ;
       if ( v > 10)
            beep(200) ;
   }
  
void beep(unsigned char pause)
   {
       analogWrite(9, 20);
       delay(pause);             // Wait
       analogWrite(9, 0);        // Turn off
       delay(pause);             // Wait
   }

What the program does is to read the pin A0 and whether its value exceeds a minimum threshold (to avoid false readings), then the Beep() function is called to fire the alarm.

 
    • Note: Normally you have to calibrate the sensor sensitivity. We must see the returned values in your specific case and refine this threshold value for the buzzer don’t be continuously honking.

 

  • We could also modify the program so that the tone signal be more acute as the reading value in the A0 pin grows.

 

 

 

Summary

 

 
    • We have seen that these little flame detectors are simple y reasonably effective.
    • You can obtain false readings, specially if you bring a strong light closer
    • I recommend you using the detector in the Keyes mount as it is easier to use.
    • We have built a fire alarm using very cheap materials.
 

 

 

 

 

No Comments

Give a Reply