Forest Fire Detection System using Arduino and Image Processing vb.net

(Last Updated On: February 13, 2020)

Forest Fire Detection System

Description:

Forest Fire Detection System- This project is based on image processing based forest fire detection along with an email notification. It concentrates in particular on systems that use image and video processing for converting visual data into a form that can be understood by the computer program.

In this project the image processing is done using visual basic dot net “VB.NET” 2010 express edition using emgucv. Emgu CV is a cross platform .Net wrapper to the OpenCV image processing library. Allowing OpenCV functions to be called from .NET compatible languages such as C#, VB, VC++, IronPython etc. The wrapper can be compiled in Mono and run on Windows, Linux, Mac OS X, iPhone, iPad and Android devices.

In this project, a special computer application is designed in Visual Basic “VB.NET”.  This designed application is capable of detecting the fire and displaying the temperature in Centigrade in real-time. There is a certain threshold value set for the temperature Sensor defined in the Arduino programming. This threshold value can be adjusted as per the requirement. The K-type thermocouple is used to monitoring the temperature. This temperature sensor is capable of measuring the temperature greater than 1000C which is perfect for this project.

As you know using the image processing there is a high chance of the false detection, to overcome the problem of false detection, I used a temperature sensor with the Arduino which monitors the temperature in that particular area. As you know temperature rises due to the fire. So, this temperature monitoring system will work as the feedback for the fire detection application.

So, a notification email will only be sent if the fire is detected and the temperature has crossed a predefined value. For the email notification both the conditions should satisfy. If any of the two is missing, it will be taken as the false data.


The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

K type thermocouple: https://amzn.to/2o9ym9y
Arduino Uno: https://amzn.to/2tVz1vu
Mega 2560: https://amzn.to/2ze1kdu
LM7805 Voltage Regulator: https://amzn.to/2IZEl5x
Potentiometer: https://amzn.to/2JSLbfg
330-ohm resistors pack: https://amzn.to/2NtlAeh
5v 2A adaptor: https://amzn.to/2GsNfcw
2n2222 NPN transistors: https://amzn.to/2EmXsIb
10k Resistor: https://amzn.to/2KTd6OW
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
LDR pack: https://amzn.to/2m2khGR
female DC power jack socket: https://amzn.to/2KEo1gt
470uf capacitors: https://amzn.to/2xDCOzf
5×7 cm Vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / stripboard: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
wirecutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF

DISCLAIMER:

Please Note: these are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!



How to create an XML file for Fire Detection:

This is my 6th tutorial on image processing using Arduino and VB.NET. In my previous tutorial on the eye pupil tracking system, I explained all the steps on how to train an XML file and then how to use that XML file in the VB.NET application for detecting the human eye. The same technique is used in this project as well. I used the following images to train my own XML file.

Forest Fire Detection System

You need to watch this tutorial if you want to learn how to create your own XML file for fire detection.

You can use the fire XML file which I created. But I recommend you should try yourself. If you learned this method of creating the XML files, you will be able to detect and track any object.

Download fire XML file: fire


K type thermocouple connection with Arduino Uno:

Forest Fire Detection System

As you can see the circuit diagram is very simple. The Max6675 breakout board is used with the K type thermocouple. The VCC of the Max6675 is connected with the Arduino’s 5 volts. The ground pin of the Max6675 is connected with the Arduino’s ground. The SCK pin of the Max6675 breakout board is connected with the pin number 6 of the Arduino Uno. The CS pin of the Max6675 is connected with the Arduino’s pin number 5 and the last pin SO of the Max6675 breakout board is connected with the Arduino’s pin number 4.

The +VE and GND wires of the K type thermocouple will be connected with the +VE and GND contacts of the Max6675 breakout board.


Forest fire detection system Arduino Programming:

Before you start the programming, first of all, make sure that you download the max6675 library. This library can be downloaded by clicking on the download button below.

Download Libraries

Forest Fire Arduino Program Explanation:

You need the following library to use the K type thermocouple and max6675.

#include “max6675.h”

Following are the Arduino’s pins defined for the D0, CS, and CLK. These are the pins of the max6675 breakout board.

int thermoDO = 4; // so

int thermoCS = 5; //

int thermoCLK = 6; // sck

A variable temp1 of the type float is used to store the temperature.

float temp1 = 0;

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);

void setup() {

For the Serial communication with the Computer or Laptop, you need to specify the baud rate. In my case, I selected 9600. Make sure you use the same baud rate in the designed fire detection application, otherwise the project won’t work.

Serial.begin(9600);

// wait for MAX chip to stabilize, 500 milli seconds equal to a half second

delay(500);

}

void loop() {

The following line reads the temperature and store the value in temp1.

temp1 = thermocouple.readCelsius();

Using the serial.println function the temperature value is sent serially to the computer fire detection application.

Serial.println(temp1);

// adjust the following conditions according to the temperature you want to set .

if(temp1 < 40   )

{

Serial.println(“normal”);

delay(1000);

}

if(temp1 > 60)

{

Serial.println(“fire”);

delay(1000);

} else

delay(500);

}


VB.NET Fire Detection Application:

Forest Fire Detection System

The form1 has a picturebox1, one button with the caption Button1, Six labels, a checkbox with the caption fire sensor data and a text box. A total of 6 timers are used in the form and a serial port. This Serial Port is important for the communication between the Arduino and computer applications. This is the same application I used in the human face recognition based entrance door lock control system “https://www.electroniclinic.com/arduino-image-processing-based-entrance-lock-control-system/.

Read all of my previous 5 articles on the image processing, because these are using the same concept and I have already explained the extreme basics, so that’s why In this article I am giving you only the references.


Image Processing Forest Fire Detection Application Programming:

Before you start the programming, first of all, make sure that you download and install the emgucv. The version of the emgucv used is already explained in my previous tutorials.


Forest fire detection system Report / Thesis:

The complete thesis of the forest fire detection system based on the image processing can be downloaded by clicking on the following download button.

Download thesis:

Demonstration video of the Fire Detection System:

Related Arduino and vb.net Image Processing Projects:

Arduino Image Processing based Entrance lock Control System

Arduino image processing Eye Pupil Tracking, how to make Haarcascade XML file

Arduino Camera Tracking System using Image processing vb.net EmguCv

Arduino Image processing CCTV camera system using VB.net

OCR Optical Character recognition using VB.net and Arduino

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply