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.
- Select the basic clock frequency range and DCO frequency range to 8MHz.
Code: BCSCTL1 = CALBC1_8MHZ;
DCOCTL = CALDCO_8MHZ;
- 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
- 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;
- 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;
- 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
- Initialize the 16×2 LCD as two line, 5×7 matrix – see the program below
- 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.
Automatic Fire Detection System With Water Sprinkler System. (n.d.). UniTopics. https://www.unitopics.com/project/material/automatic-fire-detection-system-with-water-sprinkler-system/
“Automatic Fire Detection System With Water Sprinkler System.” UniTopics, https://www.unitopics.com/project/material/automatic-fire-detection-system-with-water-sprinkler-system/. Accessed 23 November 2024.
“Automatic Fire Detection System With Water Sprinkler System.” UniTopics, Accessed November 23, 2024. https://www.unitopics.com/project/material/automatic-fire-detection-system-with-water-sprinkler-system/
Here’s a typical structure for Automatic Fire Detection System With Water Sprinkler System research projects:
- The title page of Automatic Fire Detection System With Water Sprinkler System should include the project title, your name, institution, and date.
- The abstract of Automatic Fire Detection System With Water Sprinkler System should be a summary of around 150-250 words and should highlight the main objectives, methods, results, and conclusions.
- The introduction of Automatic Fire Detection System With Water Sprinkler System should provide the background information, outline the research problem, and state the objectives and significance of the study.
- Review existing research related to Automatic Fire Detection System With Water Sprinkler System, identifying gaps the study aims to fill.
- The methodology section of Automatic Fire Detection System With Water Sprinkler System should describe the research design, data collection methods, and analytical techniques used.
- Present the findings of the Automatic Fire Detection System With Water Sprinkler System research study using tables, charts, and graphs to illustrate key points.
- Interpret Automatic Fire Detection System With Water Sprinkler System results, discussing their implications, limitations, and potential areas for future research.
- Summarize the main findings of the Automatic Fire Detection System With Water Sprinkler System study and restate its significance.
- List all the sources you cited in Automatic Fire Detection System With Water Sprinkler System project, following a specific citation style (e.g., APA, MLA, Chicago).