Fire control system
2014
ACKNOWLEDGMENT We would like to thank our advisor instructor Ato Nebiyu Tenaye from Electrical and Computer Engineering Department for his support, advice and provision of motivation throughout the duration of the project.
i
Fire control system
2014
ABSTRACT This project is designed to reduce accident and property damage caused by fire. It provides the safe control method of a fire and also creates awareness before fire developed. And also provides several main functions by giving a convenient solution to avoid frequent fire accident. First, they provide a means to identify a developing fire through either manual or automatic methods. Second, they alert the house occupants to a fire condition and the need to evacuate. Another common function is the transmission of alarm notification signal to the fire department through mobile. They also shut down the air handling equipment, control special process operation like gas line through open and close the relay and also we add a data base in order to log a data. This project include the design and implementation of a fire alarm system using the Arduino; which control the entire system this control system is developed by using sketches (Arduino program code). The detectors are placed in each room according to the detectors behavior and a signal from each detector at any level is monitored. From hardware test, the initiating device detects fire when smoke and heat sensed by the detectors, followed by the monitoring system which indicates smoke and heat beyond its stated value. Finally when one or more sensors from each level initiated, the system activate the notification appliances and send text message to fire brigade.
i
Fire control system
2014
Contents ACKNOWLEDGMENT................................................................................................................... i ABSTRACT ...................................................................................................................................... i CHAPTER ONE .............................................................................................................................. 1 INTRODUCTION ........................................................................................................................... 1 1.1. Objectives ............................................................................................................................. 1 1.2. Project scope ......................................................................................................................... 1 1.3. Statement of the Project ........................................................................................................ 2 CHAPTER TWO ............................................................................................................................. 3 LITERATURE REVIEW ................................................................................................................ 3 2.1. Fire Alarm system ............................................................................................................... 3 2.2. Conventional System Architecture .................................................................................... 3 2.3. Hardware component ......................................................................................................... 5
2.3.1. Initiating device circuits ................................................................................................. 5 2.3.2. Signaling line circuits .................................................................................................... 9 2.3.3. Arduino ........................................................................................................................ 10 Figure 3: Arduino Uno R3 Pin Diagram .................................................................................... 11 CHAPTER THREE ....................................................................................................................... 12 METHODOLOGY ........................................................................................................................ 12 ANALYSIS AND TECHNIQUE .................................................................................................. 13 3.1 Fire control system ............................................................................................................... 13 3.2. Initiating devices technique .................................................................................................... 14 3.2.1. Detection ...................................................................................................................... 14 3.2.2. Automatically fire detection ......................................................................................... 15 3.2.3. Signal conditioning ...................................................................................................... 17 3.3. Notification appliance technique ........................................................................................ 19
ii
Fire control system
2014
3.3.3 Manually fire detection ..................................................................................................... 20 3.4. A Fire Alarm Control Panel (FACP) .................................................................................. 20 CHAPTER FOUR .......................................................................................................................... 21 FIRMWARE DESIGN .................................................................................................................. 21 4.2. Arduino Build Process ........................................................................................................ 21 CHAPTER FIVE ........................................................................................................................... 23 RESULT AND DISCUSSION ...................................................................................................... 23 CHAPTER SIX .............................................................................................................................. 26 CONCLUSION .............................................................................................................................. 26 REFERENCES .......................................................................................................................... 27 APPENDEXS ................................................................................................................................ 28
List of Figures
Figure 1: Typical system Architecture ............................................................................................. 4 Figure 2: MQ-2 Semiconductor Sensor ........................................................................................... 6 Figure 3: Arduino Uno R3 Pin Diagram ........................................................................................ 11 Figure 4: Manual and automatic control system ............................................................................ 13 Figure 5: LM35 Temperature sensor ............................................................................................. 15 Figure 6: Variable resistor (for smoke sensor) ............................................................................... 15 Figure 7: performance characteristic .............................................................................................. 16 Figure 9 Flow Chart ....................................................................................................................... 22 Figure 10simulation Design ........................................................................................................... 24 Figure 11 Simulation Design out put ............................................................................................. 25
iii
Fire control system
Abbreviations Used GSM – Global Systems for Mobile TDMA – Time Division Multiple Access ADC – Analog Digital Conversion FACP – Fire Alarm Control panel FACU – Fire Alarm Control Unit
iv
2014
Fire control system
2014
CHAPTER ONE INTRODUCTION 1.1. Objectives In determining the purpose and the direction of this project, there are several objectives that need to be accomplished in developing the system. This project aims to achieve the following objectives.
To design a low cost microcontroller based fire alarm s ystem.
To develop the prototype of the fire alarm control system using heat and smoke detector. To develop the monitoring system to protect the user and their belongings.
1.2. Project scope In a way to achieve the above objectives, this project needs to be implemented as follow. The microcontroller is used as the heart of this fire alarm control system that
controls the entire operations involved. The fire alarm control system is capable to locate and identified the place where
the fire develop on LCD. Capable to send text message using GSM module.
1
Fire control system
2014
1.3. Statement of the Project Fire control system is a system that used to identify a developing fire emergency in a timely manner. And also to provides a convenient solution to avoid frequent fire accident. The main purposes of designing and implementing a fire control system device are identifying the developing fire and also shut down special process system. In worldwide, even in our country, this system is practicable in different international hotels, international meeting halls, in guest houses and resorts. Because of the cost and complex installation of imported devices of fire control systems; this system is not found in many places, like in our campus, school, and in house application. Therefor; we are taking this initiative to adverse the system into simplified form which mainly maintain the main activities of the system so as to available the system at the required quantity, time, price and place. In our simulation; the main challenges were unavailability of GSM module and smoke detector device on proteus. However; we tried to precede the simulation by using alternative device like virtual terminal and variable resistor respectively.
2
Fire control system
2014
CHAPTER TWO LITERATURE REVIEW
2.1. Fire Alarm system
A key aspect of fire protection is to identify a developing fire emergency in a timely manner, and to alert the building's occupants. First, they provide a means to identify a developing fire through either manual or automatic methods. Second, they alert building occupants to a fire condition and the need to evacuate. Another common function is the transmission of an alarm notification signal to the fire department or other emergency response organization. They may also shut down electrical, air handling equipment or special process operations, and they may be used to initiate automatic suppression systems.
2.2. Conventional System Architecture The philosophy of a conventional system revolves around dividing the building into a number of areas where the devices locate. The detectors and callpoints within each area are then wired on dedicated circuits. In the event of a detector or callpoint being triggered, the panel is able to identify which circuit contains the triggered device and thereby indicate which location the fire alarm has come from. It is then necessary to manually search the indicated location to pinpoint the exact cause of the fire alarm. Unwanted Alarms because most conventional detectors are simple two state devices they can only be in either a normal or fire condition. Although modern components and good system design can go some way to reducing potential problems, it is not uncommon for conventional systems to generate unwanted alarms due to certain operating conditions or transient environmental conditions such as the presence of steam near to a smoke detector. A key development aimed at reducing such unwanted alarms has been the multicriteria detector. Traditionally, detectors were designed to respond to particular fire 3
Fire control system
2014
phenomena such as heat or the presence of smoke. However, multi-criteria devices, which contain both a smoke sensing element and a thermal sensing element, the fire alarm decision is taken by analysis of the responses from both elements, resulting in improved detection performance as well as greatly enhanced false alarm suppression. Sounder Circuits In addition to the detection circuits, there is also a need for separate circuits of alarm annunciation devices such as sounders and beacons to signal the existence of a fire alarm condition to the building users. For sounder circuit continuity monitoring to function effectively, sounder circuits have to be wired in a single radial circuit, spurs and tees are not permitted. Almost every conventional fire panel will have facilities for more than one sounder circuit and generally the higher the specification of the panel or the higher the number of detection zones provided, the sounder circuits will be provided. Normally however there will be less sound circuits than detection zone circuits so it will be necessary for a sounder circuit to provide cover for more than one zone. This increases installation complexity by forcing the sounder wiring to follow different routes to that of the detector wiring. When designing a conventional system it is important to ensure that the panel has adequate zone capacity for the size and complexity of the building and that the panel can support the intended sounder circuit wiring and loading.
Figure 1: Typical system Architecture 4
Fire control system
2014
2.3. Hardware component To create more efficient fire control system we have
Initiating device circuits
Signaling line circuits
Notification appliance circuits
2.3.1. Initiating device circuits Detector
Fire detectors are designed to respond at an early stage to one more of the four major characteristics of combustion, heat, smoke, flame or gas. No single type of detector is suitable for all types of premises or fires. Detectors should be chosen for the best response to the effects of fires, as well the need to minimize unwanted false alarm activations. Detectors should be located where the early stages of fire will be detected, and ensure they are placed at regular intervals on the ceiling and the issue of unwanted fire alarm activations from environmental conditions must also be considered. 2.3.1.1. Manual Fire Detection - Pull Stations
The general design philosophy is to place stations within reach along paths of escape. It is for this reason that they can usually be found near exit doors in corridors and large rooms. The advantage of manual alarm stations is that, upon discovering the fire, they provide occupants with a readily identifiable means to activate the building fire alarm system. They are simple devices, and can be highly reliable when the building is occupied. The key disadvantage of manual stations is that they will not work when the building is unoccupied. They are an important component in any fire alarm system. A manually operated device used to initiate an alarm signal. 2.3.1.2. MQ-2 Semiconductor Sensor
Sensitive material of MQ-2 gas sensor is SnO2, which with lower conductivity in clean
air. When the target combustible gas or smoke exist, the sensor’s conductivity is hi gher along with the gas or smoke concentration rising. It uses simple electro circuit to convert
5
Fire control system
2014
change of conductivity to corresponding output signal of gas concentration. MQ-2 gas sensor has high sensitivity to LPG, Propane and Hydrogen, smoke also could be used to Methane and other combustible steam, it is with low cost and suitable for different application.
Figure 2: MQ-2 Semiconductor Sensor 2.3.1.3. Automatic Detectors – Heat/Thermal
Heat detectors are the oldest type of automatic fire detection device. They began development of automatic sprinklers in the 1860s and have continued to the present with proliferation of various types of devices. Heat detectors that only initiate an alarm and have no extinguishing function are still in use. Although they have the lowest false alarm rate of all automatic fire detector devices, they also the slowest in fire detecting. A heat detector is best situated for fire detection in a small confined space where rapidly building high-output fires are expected, in areas where ambient conditions would not allow the use of other fire detection devices, or when speed of detection is not a prime consideration. Heat detectors are generally located on or near the ceiling and respond to the convicted thermal energy of a fire. They respond either when the detecting element reaches a predetermined fixed temperature or to a specified rate of temperature change. In general, heat detectors are designed to operate when heat causes a prescribed change in a physical 6
Fire control system
2014
or electrical property of a material or gas. Heat Detector is a fire detector that detects either abnormally high temperature, or rate of temperature rise, or both.Heat detectors can be sub-divided by their operating principles: 1. Fixed Temp Fixed-temperature heat detectors are designed to alarm when the temperature of the operating elements reaches a specific point. The air temperature at the time of alarm is usually considerably higher than the rated temperature because it takes time for the air to raise the temperature of the operating element to its set point. This condition is called thermal lag. Fixed-temperature heat detectors are available to cover a wide range of operating temperatures - from about 135'F (57'C) and higher. Higher temperatures detectors are also necessary so that detection can be provided in areas normally subject to high ambient temperatures, or in areas zoned so that only detectors in the immediate fire area operate. 2. Rate-of-Rise One effect that flaming fire has on the surrounding area is to rapidly increase air temperature in the space above the fire. Fixed-temperature heat detectors will not initiate an alarm until the air temperature near the ceiling exceeds the design operating point. The rate-of-rise detector, however, will function when the rate of temperature increase exceeds a predetermined value, typically around 12 to 15'F (7 to 8'C) per minute. Rateof-rise detectors are designed to compensate for the normal changes in ambient temperature that are expected under non-fire conditions. 3. Combination Combination detectors contain more than one element which responds to fire. These detectors may be designed to respond from either element, or from the combined partial or complete response of both elements. An example of the former is a heat detector that
7
Fire control system
2014
Operates on both the rate-of-raise and fixed-temperature principles. Its advantage is that the rate-of-rise element will respond quickly to rapidly developing fire, while the fixedtemperature element will respond to a slowly developing fire when the detecting element reaches its set point temperature. The most common combination detector uses a vented air chamber and a flexible diaphragm for the rate-of-rise function, while the fixedtemperature element is usually leaf-spring restrained by a eutectic metal. When the fixedtemperature element reaches its designated operating temperature, the eutectic metal fuses and releases the spring, which closes the con tact. 4. Flame A flame detector responds either to radiant energy visible to the human eye (approx. 4000 to 7700 A) or outside the range of human vision. Similar to the human eye, flame detectors have a 'cone of vision', or viewing angle, that defines the effective detection capability of the detector. With this constraint, the sensitivity increases as the angle of incidence decreases. Such a detector is sensitive to glowing embers, coals, or flames which radiate energy of sufficient intensity and spectral quality to actuate the alarm. Each type of fuel, when burning, produces a flame with specific radiation characteristics. A flame detection system must be chosen for the type of fire that is probable. For example an ultraviolet (UV) detector will respond to a hydrogen fire, but an infrared (IR) detector operating in the 4.4 micron sensitivity range will not. It is imperative therefore; that a qualified fire protection engineer is involved in the design of these systems, along with assistance from the manufacturer's design staff. 2.3.1.3.1. LM35 Precision centigrade Temperature Sensor
The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in 0Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external calibration or trimming.
8
Fire control system
2014
Low cost is assured by trimming and calibration at the wafer level. The LM35's low output impedance, linear output, and precise inherent calibration make interfacing to readout or control circuitry especially easy. It can be used with single power supplies, or with plus and minus supplies. As it draws only 60mA from its supply, it has very low self-heating, less than 0.1 oC in still air. The LM35 is rated to operate over a -55o to a 150 oC temperature range, while the LM35C is rated for a -40o to 110 oC range (-10o with improved accuracy).LM35 is a 3 pin device and its performance characteristics are shown below:
2.3.2. Signaling line circuits 2.3.2.1. GSM (Global System for Mobile Communications)
GSM is a TDMA (Time Division Multiple access) based wireless network technology developed in Europe that is used throughout most of the world. GSM phones make use of a SIM card to identify the user's account. The use of the SIM card allows GSM network users to quickly move their phone number from one GSM phone to another by simply moving the SIM card. Currently GSM networks operate on the 850MHz, 900MHz, 1800MHz, and 1900MHz frequency bands. Devices that support all four bands are called quad-band, with those that support 3 or 2 bands called tri-band and dual-band, respectively. To incorporate SMS to PC or Embedded Controller using Serial Port and any of your favorite programing language (C, C#, Basic, Pascal). GSM Modem provides a standard API set for communicating with Modem and setup for send and receive SMS. 2.3.2.2. DC Motor and Motor drives DC Motor
9
Fire control system
2014
2.3.3. Arduino Arduino is a tool for making computers that can sense and control more of the physical world than our computer. It's an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board. Arduino can be used to develop interactive objects, taking inputs from a variety of switches or sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino projects can be stand-alone, or they can communicate with software running on our computer. The Arduino programming language is an implementation of Wiring, a similar physical computing platform, which is based on the Processing multimedia programming environment. 2.3.3.1. Arduino Uno
The Arduino Uno is a microcontroller board is based on the ATmega328 (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with AC-to-DC adapter or battery to get started.
10
Fire control system
Figure 3: Arduino Uno R3 Pin Diagram
11
2014
Fire control system
2014
CHAPTER THREE METHODOLOGY This fire alarm control system is divided into two main parts. These are the hardware and software parts. They play an important role to make the system work properly and effectively. The first step in methodology was the systems literature studies, research and analysis. It includes problem identification and determining the system objective. During this period the system requirement is determined which is hardware, software and interface involved in the system development. The second step is designing the system. The main activity is transforming the analysis and requirement obtained from step one into design specification for constructing and system implementation. This step divided into two designing the detection system and monitoring system.
Designing detection system
This system involves detection component and microcontroller. First set detectors to maximum value then feed the output signal from the detector to microcontroller, it changes this signal (analog) to digital and display on the LCD. Then take this digital value as a control method for the detectors. When the detectors read value beyond the maximum it activates all the system.
Designing monitoring system
This monitoring device Arduino involves controlling the entire system. It is designed in a way to control the system using microcontroller on it. All the mechanism to monitor the system written on the code then load this code on the Arduino according to the loaded code the microcontroller controls the entire system.
12
Fire control system
2014
CHAPTER THREE ANALYSIS AND TECHNIQUE 3.1 Fire control system This project typically made up of initiating device circuits, signaling line circuits and notification appliance circuits. The block diagram below gives an overview about our entire project. Each section in the block diagram comprises different device with different functionality.
Figure 4: Manual and automatic control system
13
Fire control system
2014
3.2. Initiating devices technique Initiating devices are two type automatically fire detection and manually fire detection device. This is the device where the whole system depend up on .It gives an initiating signal to the microcontroller in the form of smoke and heat then the microcontroller further translate and transmit
the signal to notification appliance . Automatically
operating device includes smoke sensor and heat sensor. And the other is manual fire detection, it is a manually operated device used to initiate an alarm signal.
3.2.1. Detection A basic necessity of Fire control system is the detection of fire conditions as early as possible, so as to provide enough time for Automated Systems/ Fire workers for effective counter actions. It is extremely essential that addressable microprocessors based devices be used, so that the locations of fire may be easily located. These devices (Detectors) are provided all over the power plant for detection of fire as e arly as possible. Fire detectors are designed to detect one or more characteristics of fire, i.e. smoke, heat or flame. Any single type of detector is not suitable for all applications and the final choice will depend on the individual circumstances. Usually combined use of different types of detectors is made to achieve appropriate standard of protection. The detectors working on different principles of operation will respond differently to a given fire situation. Also, a particular type of detector cannot detect a fire equally efficiently in all situations. Detectors are classified into the following categories:
Smoke Detectors
Heat Detectors
Flame Detectors
Linear Heat Sensing Cables
14
Fire control system
2014
3.2.2. Automatically fire detection In the project for automatically detection we used smoke and heat sensors. For better accuracy we put the heat detector in the kitchen because there are a lot of smokes in the kitchen which lead the sensor to false alarm. And the two smoke detector in the bed room and living room. For the heat detector we used LM35 temperature sensor as shown in the figure below and for smoke detector we used variable resistor.
Figure 5: LM35 Temperature sensor
Figure 6: Variable resistor (for smoke sensor) The LM35 we used is precision integrated-circuit temperature sensor, with an output voltage linearly proportional to the Centigrade temperature and its performance 15
Fire control system
2014
characteristic is described in the figure bellow. To match the output voltage from LM35 with the microcontroller operational voltage range we used signal con ditioning.
Figure 7: performance characteristic 3.2.2. MQ2 senor The test circuit of the sensor need to be put to two voltage, heater voltage (VH) and test voltage (VC) used to detect voltage (VRL) on load resistance(RL) whom is in series with sensor. The sensor has light polarity, Vc need DC power. VC and VH could use same power circuit with precondition to assure performance of sensor. In order to make the sensor with better performance, suitable RL value is needed: power of sensitivity body (Ps)
Ps=Vc2×Rs/(Rs+RL)2.
16
Fire control system
2014
Figure 8: MQ2 test circuit Sensitivity Characteristics
The figure below shows the typical sensitivity characteristics of the MQ-2, ordinate means resistance ratio of the sensor (Rs/Ro), abscissa is concentration of gases. Rs means resistance in different gases, Ro means resistance of
sensor in 1000ppm Hydrogen. All
test are under standard test conditions.
Figure 9: Sensitivity Characteristics
3.2.3. Signal conditioning
17
Fire control system
2014
When the heat detector detects a temperature beyond its maximum temperature the heat detector transmit analog signal to the microcontroller and the microcontroller convert the analog signal to a digital using its integrated ADC convertor for the next step which is for notification appliance. But the output voltage from the heat detector is 10.0mV/C which is much less than the operating voltage range of the microcontroller, so the MCU is not respond until it get voltage within its range. There for we used operational amplifier to amplify the output signal from heat detector (LM35). Non-inverting amplifier
In a non- inverting amplifier, the output voltage c hange in the same direction as the input voltage.
The gain equation for the op-amp is: Vout = AOL(V+ - V-) However in this circuit V_ is a function of Vout because of the negative feedback through the R g R f network. R 1 and R 2 from a voltage divider, and as V- is high-impedance input, it does not load it appreciably. Consequently: V- = β . Vout
where β = R g / R g+R f
Substituting this in to the gain equation we ob tain: Vout = AOL( Vin - β . Vout ) Solving for Vout: Vout = Vin (1 / β + 1/ AOL) If AOL is very large, this simplifies to Vout ͌ Vin / β = Vin / (Rg /Rg + Rg) = Vin( 1 + R f / R g) Note that the non-inverting input of the operational amplifier will need a path for DC to ground; if the signal source might not give this, or if that source requires a given load 18
Fire control system
2014
impedance, the circuit will require another resistor from input to ground. In either case, the ideal value for the feedback resistors (to give minimum offset voltage) will be such that the two resistances in parallel roughly equal the resistance to ground at the noninverting input pin.
Figure 10: An op amp connected in non- inverting configuration
3.3. Notification appliance technique Notification appliance includes LCD Display, LED, Buzzer, Cell phone and motor to regulate the exhaust and supply fan. The LCD displays three string based on the output drawn from initiating device to the microcontroller, when the LM35 read a temperature beyond its maximum level the LCD displays fire in the kitchen then the led and buzzer will be on, the motor start run and the microcontroller send text to the user. The same thing will be happen when the smoke detectors read temperature above its sated point but the LCD displays fire only in the living and bed room .They are controlled by the output signal from microcontroller. For the motor to work properly we have optocoupler and gate driver in the system. The optocoupler is put between microcontroller and gate driver to protect and isolate the motor, it protect the gate driver and the motor damaging from high voltage. And the purpose of the gate driver in the system is to regulate the output voltage from the microcontroller, it regulate the 5V output to 12V because the MOSFET did not work with 5V.
19
H-bridge
Fire control system
2014
3.3.3 Manually fire detection Manual pull stations are the devices that are located on the wall. While there are different designs, generally they are activated by pulling on hand. As with all parts of a fire alarm system pull stations should only be activated when there is a true emergency.
3.4. A Fire Alarm Control Panel (FACP) A Fire Alarm Control Panel (FACP), or Fire Alarm Control Unit (FACU), is the controlling component of a fire alarm System. The panel receives information from initiating devices (sensors) designed to detect changes associated with fire, monitors their operational integrity and provides for automatic control of equipment, and transmission of information necessary to prepare the facility for fire based on a predetermined sequence. The panel may also supply electrical energy to operate any associated sensor, control, transmitter, or relay. In our project the Fire Alarm Panel consists of a Monitoring station, a Master CPU, Loop Cards & Supervisory Control Modules. Our control panel does the following tasks:-
Detect fire quickly enough to fulfill its intended functions.
Transmit the detection signal.
Translate the detection signal into a clear alarm indication that will attract the attention of the user in an immediate and unmistakable way and indicate the location of fire and initiate operation of supplementary service, such as fire extinguishing system, etc.
Remain insensitive to phenomena other than those which its function is to detect.
Signal immediately and clearly and supervised fault that might put in danger the correct performance of the system.
These all devices are controlled by the Atmega32 microcontroller, which is inside the control panel.
20
Fire control system
2014
CHAPTER FOUR FIRMWARE DESIGN Arduino is best known for its hardware, but we need software to program that hardware.
Both the hardware and the software are called “Arduino.” The combinati on enables us to create projects that sense and control the ph ysical world.
4.1. Arduino Software Software programs, called sketches (Arduino program code), are created on a computer using the Arduino integrated development environment (IDE). The IDE enables us to write and edit code and convert this code into instructions that Arduino hardware understands. The IDE also transfers those instructions to the Arduino board (a process called uploading). To develop a code for our project we choose Arduino program code based on the following practical consideration
Simple, clear programming environment - The Arduino programming environment is easy-to-use and flexible.
Open source and extensible software.
We can add AVR-C code directly into our Arduino programs.
Cross-platform
4.2. Arduino Build Process The Arduino environment performs some small transformations to make sure that the code is correct C or C++ (two common programming languages). It then gets passed to a compiler (avr-gcc), which turns the human readable code into machine readable instructions (or object files). Then, our code gets combined, the standard Arduino libraries that provide basic functions like digitalWrite() or Serial.print(). The result is a single Intel hex file, which contains the specific bytes that need to be written to the program memory of the chip on the Arduino board. This file is then uploaded to the board: transmitted over the USB or serial connection via the bootloader already on the chip or with external programming hardware.Sketches are compiled by avr-gcc. 21
Fire control system
Start
Set the max temp and smoke value NO Sense the temp and smoke
YES
If temp > max or smoke > max
LED & buzzer ON display the location
Fan change direction according to value open/close
Send text using GSM module
End
Figure 8 Flow Chart
22
2014
Fire control system
2014
CHAPTER FIVE RESULT AND DISCUSSION The result was simulated on protes using Arduino code. And when one of the initiating device detector/sensor the smoker or heat; the sensing was performed by varying the variable resistor for smoke detection and LM35 for heat detection. The variation of value have analogue output and this analogue output of the device feed to the microcontroller as an input besides inside the microcontroller the ADC conversion performed and the external voltage was selected as a reference and used
for better accuracy. After
identifying the digital reading on LCD display we select a specific number and by comparing the reading value to that of the selected specific number. If the reading value less than the selected specific result; the address sensor status is on normal state else the status become fire and the LCD display the place where the fire begin and the microcontroller send the command for the notification appliance. The red “LED” light, exhaust fan and the buzzer are on and also the relay closed the gas-line. Finally the system send a text message about the status of the system to mobile but since “GSM” module is not found in proteus; and we use virtual terminal replacing the GSM module. In our simulation; the main challenges were unavailability of GSM module and smoke detector device on proteus. However; we tried to precede the simulation by using alternative device like virtual terminal and variable resistor respectively.
23
Fire control system
The simulations results are shown below:
Figure 9simulation Design
24
2014
Fire control system
Figure 10 Simulation Design out put
25
2014
Fire control system
2014
CHAPTER SIX CONCLUSION Conclusion In this project, the goal of implementing a fire alarm control system is to detect smoke and heat in the simulation was achieved. The software implementation of the algorithm was examined in Arduino program code to verify its accuracy. The smoke and heat detection algorithm was derived from temperature and diffraction of light ray detection. Heat detectors respond to temperature rise associated with fire, so we used Lm35 temperature sensor. For smoke detector we don’t have a smoke sensor in the proteus instead we used variable resistor for this purpose. We used L293D H bridge motor driver for the exhaust and supply fan, and relay to close and open the gas valve. For the purpose of isolation and protection of the motor driver we have opt-coupler in the system. Since our system is addressable we have a 2x16 display. The transition of software to hardware is accomplished but throughout the translation we face a lot of challenge we properly connect the system hardware but some part doesn’t work accurately as related to the simulation. Sometimes it shows an expected result like activating the entire system when it is in normal condition.
26
Fire control system
2014
REFERENCES 1. Menvier Fire Systems; COOPER Safety Fire system (The Company’s product manual books). 2. Atmega32Datasheet and LM35 Datasheet. 3. C Programming for Microcontrollers Joe Pardue. 4. Fire Detection and Alarm System Basics (Hochiki America Corporation) www.hochiki.com 5. www.honeywell.com
27
Fire control system
2014
APPENDEXS
Appendix A: Detailed Literature Review Motor drive (l293d) Pin Description: Pin No
Function
Name
1
Enable pin for Motor 1; active high
Enable 1,2
2
Input 1 for Motor 1
Input 1
3
Output 1 for Motor 1
Output 1
4
Ground (0V)
Ground
5
Ground (0V)
Ground
6
Output 2 for Motor 1
Output 2
7
Input 2 for Motor 1
Input 2
8
Supply voltage for Motors; 9-12V (up to 36V)
Vcc 2
9
Enable pin for Motor 2; active high
Enable 3,4
10
Input 1 for Motor 1
Input 3
11
Output 1 for Motor 1
Output 3
12
Ground (0V)
Ground
13
Ground (0V)
Ground
14
Output 2 for Motor 1
Output 4
15
Input2 for Motor 1
Input 4
16
Supply voltage; 5V (up to 36V)
Vcc 1
Table 1. L293D pin description 28
Fire control system
2014
Appendix B: LCD Display Pin Description Pin
Function
Name
1
Ground (0V)
Ground
2
Supply voltage; 5V (4.7V – 5.3V)
Vcc
3
Contrast adjustment; through a variable resistor
V EE
4
Selects command register when low; and data register when high
Register Select
5
Low to write to the register; High to read from the register
Read/write
6
Sends data to data pins when a high to low pulse is given
Enable
No
7
DB0
8
DB1
9
DB2
10
DB3 8-bit data pins
11
DB4
12
DB5
13
DB6
14
DB7
15
Backlight VCC (5V)
Led+
16
Backlight Ground (0V)
Led-
Table 2. LCD pin description
29
Fire control system
Appendix C: Arduino Code #include #include //char recvChar; SoftwareSerial mySerial(7, 8); // RX, TX int tempPin = 0; int lightPin = 1; int manualPin = 13; int ledPin = 11; //int motor1Pin0 = 7; int motor1Pin1 = 9; int motor1Pin2 = 10; int relayPin = 12; // BS E D4 D5 D6 D7 LiquidCrystal lcd(1, 2, 3, 4, 5, 6);
//………………………………………………………………………………. void setup() { lcd.begin(16, 2);
30
2014
Fire control system analogReference(DEFAULT); //pinMode(sensePin, INPUT); pinMode(manualPin, INPUT); pinMode(ledPin, OUTPUT); pinMode(relayPin,OUTPUT); // set all the other pins you're using as outputs: pinMode(motor1Pin1, OUTPUT); pinMode(motor1Pin2, OUTPUT); } //........................................................ void loop() { int tempReading = analogRead(tempPin); int lightReading = analogRead(lightPin); if((tempReading >=104)||(lightReading >= 512)) { digitalWrite(relayPin, HIGH); digitalWrite(ledPin, HIGH); //digitalWrite(motor1Pin0, HIGH); digitalWrite(motor1Pin1, LOW); // set pin 2 on L298N low digitalWrite(motor1Pin2, HIGH); // set pin 7 on L298N high if(tempReading >=104)
31
2014
Fire control system { lcd.setCursor(0, 0); lcd.print("Temp:"); lcd.setCursor(6, 0); lcd.print("Fire " ); delay(500); if(lightReading <512){ lcd.setCursor(0, 1); lcd.print("Smoke:"); lcd.setCursor(6, 1); lcd.print("Normal" ); } } if(lightReading >=512) { lcd.setCursor(0, 1); lcd.print("smoke:"); lcd.setCursor(6, 1); lcd.print("Fire " ); delay(500); if(tempReading <104){ lcd.setCursor(0, 0);
32
2014
Fire control system lcd.print("Temp:"); lcd.setCursor(6, 0); lcd.print("Normal" ); } } } else{ if (digitalRead(manualPin) == HIGH){ digitalWrite(relayPin, HIGH); digitalWrite(ledPin, HIGH); //digitalWrite(motor1Pin0, HIGH); digitalWrite(motor1Pin1, LOW); // set pin 2 on L298N low digitalWrite(motor1Pin2, HIGH); // set pin 7 on L298N high lcd.setCursor(0, 0); lcd.print("
");
lcd.setCursor(6, 0); lcd.print("Fire "); lcd.setCursor(0, 1); lcd.print("
");
lcd.setCursor(6, 1); lcd.print("Fire "); }
33
2014
Fire control system else{ digitalWrite(ledPin, LOW); digitalWrite(relayPin, LOW); //digitalWrite(motor1Pin0, LOW); digitalWrite(motor1Pin1, LOW); // set pin 2 on L298N high digitalWrite(motor1Pin2, LOW); // set pin 7 on L298N low lcd.setCursor(0, 0); lcd.print("Temp:"); lcd.setCursor(6, 0); lcd.print("Normal"); lcd.setCursor(0, 1); lcd.print("Smoke:"); lcd.setCursor(6, 1); lcd.print("Normal"); if((tempReading >=104)||(lightReading >= 512)) { Serial.begin(19200); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } // Serial.println("Goodnight moon!"); // set the data rate for the SoftwareSerial port
34
2014