Automatic Fire Detection System With Water Sprinkler System

Overview

CHAPTER ONE

1.0                                          INTRODUCTION


In this project, a fire sensor is used to detect the occurrence of the fire in the surrounding environment. If you want abstract for this project, then visit INTELLIGENT FIRE DETECTION SYSTEM WITH AUTOMATIC WATER SPRINKLER SYSTEM USING MSP430 .Actually here a fire sensor is connected to a circuit which produces a digital output when the fire is detected. This digital output is connected to the MSP430G2553 microcontroller pin as interrupt signal. A motor driven and voice prompting program or a part of it is written in the interrupt service routine which is executed when the sensor digital output is high (interrupt signal to MSP430). A water sprinkler mechanism is connected to the shaft of the dc motor and audio signal is generated via the speaker, which will sprinkle the water when the fire is detected by the sensor (fire extinguisher). A 16×2 LCD is also interfaced with MSP430G2553 to show the status about the fire occurred or not in more effective way. Instead of the LCD one can use a speaker to make the project output more effective by playing sound using the buzzer. But in this project, both LCD and Buzzer are used to make the project output more beautiful.

To achieve this digital output, the sensor is connected to the LM348 op amp and a preset is used to fix the threshold level. Therefore the LM348 acts as a comparator and its output is either logic High or logic Low depend up on the sensor output and preset value. Complete details about the gas/fire sensor and its digital interface circuit will be discussed in the next coming articles, because to make this article short and simple.

Gas sensor and its digital circuit:

Gas or Fire sensor with digital output

Circuit Diagram:

Figure 1.1 : circuit diagram for the Automatic fire detection system with water sprinkler system

Figure 1.1 : circuit diagram for the Automatic fire detection system with water sprinkler system

Circuit Explanation:

A 3.3V power supply for the MSP430 can be achieved by connecting 3.3V zener regulator in shunt and a 68ohms resistor is connected in series to the 12v supply. So that approximately 8-10 mA current will flow through the MSP430 when it is active otherwise it will flow through the zener diode.

I = (V1-V2)/Rs = (12-3.3)/68ohms.

A 5v buzzer is connected to the P1.2 pin of MSP430 and the fire sensor digital output is connected to P1.3 of MSP430 as shown in the above figure 1.1. The power on reset circuit with a 47kohms resistor and 1nf capacitor is connected to reset pin (RST) of MSP430 as shown in the above figure 1.1. The upper four MSB lines (D3 – D7) of the 16×2 LCD are connected to the Port2 upper pins (P2.3 to P2.7) and the Register Select (RS) line, Enable (EN) line are connected to P1.6 and P1.7 of the MSP430. In this circuit the read write (R/W) pin is connected to ground, because the microcontroller program is used to write the data on to the LCD, no read operation. A preset of 10k is connected to VEE line of the LCD and a 1k resistor is connected in series to it as a protection resistor. The 1k resistor protects LCD by not allowing more current when the adjustable preset pointer is at minimum position. ULN2803 current sinker allows maximum of 500mA current and is used to drive the dc motor by connecting the one end of it to ground via 500mA fuse. When P2.3 pin of the MSP430 is at logic high which is connected to the ULN2803 input, then the corresponding output pin is connected to ground and the motor current start flowing through the motor from the 12V DC supply.

Operation:

When circuit power is up, the LCD will display a message “No fire is detected”. When the fire sensor detected the fire, its output turn to logic HIGH and it acts as an interrupt signal to MSP430. Then immediately, corresponding ISR function is executed in the MSP430 and set the motor pin to high, which in turn enable the input pin of the ULN2803. Therefore the ULN2803 drives the motor by allowing motor current via 500mA current. Now the LCD updates its status, by displaying the message “Fire detected” and at the same time the buzzer will alarm about the fire occurred. A water sprinkler mechanism is connected to the motor to sprinkle the water on fire to light off.

Firmware Program Code Explanation:

The firmware code starts with the Basic Clock System initialization of the MSP430 and the MCLK and SMCLK frequency are initialized to 2MHz. This clock frequency can be achieved by following the below steps.

  1. Select the basic clock frequency range and DCO frequency range to 8MHz.

Code: BCSCTL1 = CALBC1_8MHZ;

           DCOCTL = CALDCO_8MHZ;

  1. Choose SMCLK to driven by MCLK by setting SELM_0 bit. And divide the           MCLK and SMCLK by a pre-scale factor of 4 by setting DIVM_2 and DIVS_2.

SELMx bits – 00 – DCOCLK.

01 – DCOCLK.

10 – XT2CLK.

11 – LFXT1CLK or VLOCLK.

Code: BCSCTL2 |= DIVM_2  + SELM_0 + DIVS_2;   // SMCLK = MCLK = DCO/4                                                                                           //= 8M/4 = 2MHz

  1. Each and Every port pin of the MSP430 got multiple functions. To choose the port pin as general purpose I/O function

Code: P2SEL = 0;

 P2SEL2 = 0;

  1. Define the necessary pins as input and output. If the port pin is initialized to 1, then it is output otherwise it is input.

                    Code:  P2DIR = 0xF0; // make all port2 upper pins as output P2.7, P2.6, P2.5,                                                             //  P2.4 are LCD pins

                                      P1DIR |= 0xC7; // P1.5 – gas Sensor(input), P1.6 and P1.7 for LCD, P1.0                                                              //- LED output, P1.3 – Motor , P1.2 – Buzzer

                                      P1OUT = 0X00;

                                      P2OUT = 0x00;       P2OUT = 0x00;

  1. Initialize the P1.5 as an interrupt signal.

Code: P1IE |= 0x20;                             // P1.5 interrupt enabled

                                     P1IES &= ~0x20;                            // P1.5 low to high edge

                                     P1IFG &= ~0x20;                           // P1.5 IFG cleared

  1. Initialize the 16×2 LCD as two line, 5×7 matrix – see the program below
  2. In the Interrupt service routine, I have used the P1.0 pin as a status bit. Because the P1.5 pin is initialized to detect the low to high edge transition as interrupt signal. But our sensor output will either high or low depend upon the fire detected or not. When fire is detected by the sensor, then it will produce a low to high transition on the P1.5 as interrupt and enable the P1IFG flag. Therefore corresponding ISR will be called which will update the status of the LCD, start the motor, buzzer sounds the alarm.

But when the fire is lited off, then the sensor will produce logic high to low transition on the P1.5 line, but this pin won’t recognize the interrupt because it is initialized to respond for high to low. So the motor won’t stop running, buzzer won’t stops the sound, no update in the LCD still displaying the message that “fire detected”.

For this reason, I have used a port pin P1.0 to know the status of the fire sensor, when the fire is detected then P1.0 is set to 1 otherwise it is cleared. Hence, I am going to change the edge transition from high to low and low to high depend up on the P1.0 status. So that, the interrupt service routine is called for both high to low and low to high transition.

Research Guidelines

The Title Page should be the first section of your project “Automatic Fire Detection System With Water Sprinkler System”, providing essential details like the project title, your name, your supervisor’s name, the institution, and the submission date. After that, the Abstract offers a brief summary of your project, touching on its purpose, methods, results, and conclusions in 150-300 words. The Acknowledgments section is where you can thank those who supported your research, such as your supervisor, peers, or organizations that provided resources.

Next, the Table of Contents organizes the Automatic Fire Detection System With Water Sprinkler System by listing its chapters and sections, along with page numbers for easy reference. The List of Figures and List of Tables help guide readers to specific visual elements like graphs, charts, or tables included in the document. There should also be an Abbreviations and Glossary section to explain any specialized terms or acronyms, making the content clearer to readers unfamiliar with the technical language.

The main body of the Automatic Fire Detection System With Water Sprinkler System should start with the Introduction, which provides background information, outlines the research problem, states your objectives, and gives a brief overview of your research methods. Following that, the Literature Review offers an in-depth look at previous research relevant to your project, identifying gaps your study aims to address. The Methodology section then explains the research design, tools, and data collection methods you used to conduct the project and analyze the data.

In the Results and Discussion section, you present your findings and discuss them in relation to the Automatic Fire Detection System With Water Sprinkler System research questions or objectives, often using tables or charts to help explain the data. The Conclusion summarizes the key results, discusses their implications, and suggests possible directions for future research. You may also include recommendations based on your findings, offering practical advice for improvements or applications. Finally, the Automatic Fire Detection System With Water Sprinkler System project should include a References or Bibliography section to list all the sources you cited, as well as Appendices for any additional material. A Statement of Originality is often included to confirm the authenticity of your work