Smoke Sensor
Smoke Sensor
Figure:11.1
11.1. Objectives
Our objective is to design a Fire Alarm System that would full fill the following objectives: Indicate the room in which fire erupted. Sound the alarm if fire occurs. False Alarm occurrence should be kept minimum. The system should be flexible enough to be easily modified in case if new rooms are added to the building. The system should also provide the flexibility to adjust the temperature and smoke sensitivity levels as per the operating environment.
11.2. Working
This paper proposes the design and construction of fire alarm system which is controlled by 89S52 microcontroller. LCD is used to indicate situations of the system composed of 2 modes of working state, regular working mode and fire mode. Graphic output states are displayed on LCD by using software Keil uVision2, interfacing with microcontroller. Input signal coming from the normally opened warning devices such as heat detector and smoke detector is sent into a detectable instrument to separate the mode of working state. After that, output signal
19
is dispatched to 89S52 microcontroller for analysis. This microcontroller can transfer data and display the situation of detector in 4 zones. Thus, the environment of the zones is exposed on LCD. In case of fire mode, the data will be sent to LCD and to Buzzer simultaneously.
11.3. Requirements
This system consists of following modules.
with the positive input of comparator while at its negative input there is constant 3 volts .so as the smoke will produce, there will be voltage at output of sensor. As the smoke intensity increase and the sensor output will reach 3.1 volts the comparator will pass a high signal to microcontroller. As this sensor is quite sensitive to smoke so we have kept 3 volts as a standard at comparator input so that it should detect real fire and do not activate on fake signals just like if someone is smoking.
LCD Interfacing
The LCD we used was having 16 pins out of which 8 pins are directly going to microcontroller pin number 1 to 8. Two pins are connected with Vcc one with ground and one with the potentiometer to set the resolution of LCD. Three control pins of LCD are also connected to microcontroller pin no 2.5, 2.6, and 2.7 .They are used for enabling LCD, performing read or write operations and to select command or data register
Buzzer
It has two pins; one is connected with the supply and the other one with the microcontroller pin no 2.4. When microcontroller will provide low signal, the circuit will be completed and the buzzer will start alarming.
21
If both the bits are at low logic levels (i.e. both the heat and smoke sensors are operating under normal conditions), the program simply displays NORMAL on the LCD and the buzzer also remains OFF. The programming approach to display output on the LCD includes character by character transfer of the entire string with an appropriate delay. The LCD is initialized only once and only the top line of the LCD is being used for display purpose.
Code:
LCD_RS LCD_RW LCD_EN BIT BIT BIT P2.7 P2.6 P2.5
LCD ORG
EQU 000H
P1
CALL
INIT_LCD
MOV CALL
A,#81H WR_LCD_COMMAND
CALL DELAY
CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL
WR_LCD_CHR A,#'I' WR_LCD_CHR A,#'R' WR_LCD_CHR A,#'E' WR_LCD_CHR A,#' ' WR_LCD_CHR A,#'A' WR_LCD_CHR A,#'L' WR_LCD_CHR A,#'A' WR_LCD_CHR A,#'R' WR_LCD_CHR A,#'M' WR_LCD_CHR A,#' ' WR_LCD_CHR A,#'#' WR_LCD_CHR A,#' ' WR_LCD_CHR
CLR
P2.4
A,#31H WR_LCD_CHR
23
A,#' '
WR_LCD_CHR MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL MOV CALL A,#' ' WR_LCD_CHR A,#' ' WR_LCD_CHR A,#' ' WR_LCD_CHR A,#'N' WR_LCD_CHR A,#'O' WR_LCD_CHR A,#'R' WR_LCD_CHR A,#'M' WR_LCD_CHR A,#'A' WR_LCD_CHR A,#'L' WR_LCD_CHR A,#' ' WR_LCD_CHR A,#' ' WR_LCD_CHR A,#' ' WR_LCD_CHR A,#' ' WR_LCD_CHR A,#' ' WR_LCD_CHR
24
SETB P2.4
JMP AGAIN
CALL WR_LCD_COMMAND DISP: MOV CALL RET A, #81H ; Curser at LINE # 1, Position # 3 WR_LCD_COMMAND
WR_LCD_COMMAND: CALL DELAY MOV LCD,A CLR LCD_RS CLR LCD_RW SETB LCD_EN CLR LCD_EN RET
WR_LCD_CHR:
25
CALL DELAY MOV LCD,A SETB LCD_RS CLR LCD_RW SETB LCD_EN CLR LCD_EN
RET
DELAY: mov djnz RET r5, #0ffh r5, $ ; delay loop instead of checking bit-7
GET_SENSOR_DATA:
26
12. CONCLUSION
An embedded system is a computer system with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs. Embedded systems control many devices in common use today. Embedded systems contain processing cores that are either microcontrollers, or digital signal processors (DSP). A processor is an important unit in the embedded system hardware. It is the heart of the embedded system. The key characteristic, however, is being dedicated to handle a particular task. Since the embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the size and cost of the product and increase the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale. Physically, embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, and largely complex systems like hybrid vehicles, MRI, and avionics. Complexity varies from low, with a single microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure.
27
13. REFERENCES
1. Michael Barr. Embedded system Glossary . Neutriono Technical Library. Retrieved 2007-04-21. 2. Heath, Steve (2003).Embedded system design. EDN series for design engineers ( 2ed). Newness.p.2.ISBN 978-0-7506-5546-0.An embedded system is a microprocessor based system that is built to control a function or a range of functions. 3. Giovanni ,Bill.Micro controller.com-Embedded System supersite. 4. Embedded System Dell OEM Solution /Dell.contnt.dell.com (2011-01-04). Retrieved on 2013-02-06. 5. Raj Kamla (2008).Embedded Systems- Architecture, Programming and design. Tata McGraw-Hill.p.5.ISBN 978-0-07-066764-8. 6. Ayala Keeneth j. The 8051 Microcontroller-Architecture, Programming and Application ,3rd edition 2008, Cengage Learning India PVT. Ltd. 7. Deshmukh ,Ajay V Microcontroller [Theory and Application], 1st edition,2006 Tata McGraw-Hill. 8. Gadre,Dhananjay V.Programming and Customizing the AVR Edition(10th reprint ),Tata McGraw Hill. 9. Tektronixshaks up prototyping ,Embedded Istrumentation Boosts Boards to Emulator status .Electronics Engineering Journal.2012-10-30.Retrieved 2012-10-30. 10. Embedded.com Under the Hood: Robot Guitar embeds autotuning By David Carey, TechOnline EE Times (04/22/08, 11:10:00 AM EDT)Embedded Systems Design Embedded.com 11. "Tektronix Shakes Up Prototyping, Embedded Instrumentation Boosts Boards to Emulator Status". Electronic Engineering Journal. 2012-10-30. Retrieved 2012-10-30. 12. Heiser, Gernot (December 2007). "Your System is secure? Prove it!". ;login:2 (6): 358. 13. "Working across Multiple Embedded Platforms". clarinox. Retrieved 2010-08-17. Microcontroller,It
28