FIRE ALARM WITH SECURITY SYSTEM
MOHAMED FAIZ BIN MOHAMED MUSA
This Report Is Submitted In Partial Fulfillment Of Requirements For The Bachelor Degree of Electronic Engineering (Telecommunication)
Fakulti Kejuruteraan Elektronik Dan Kejuruteraan Komputer Universiti Teknikal Malaysia Melaka
Specially dedicated to my beloved parent:
Mohamed Musa Bin Hj Mansor and Roslina Bte Hj Rosdan
To my Supervisor:
Mdm. Siti Rosmaniza Bte Ab Rashid
Alhamdulillah, firstly I am grateful to almighty Allah S.W.T because at last I had finished my Final Year Project and my thesis successfully. I would like to express my sincere gratitude to my supervisor Mdm. Siti Rosmaniza Bte Ab Rashid for her invaluable guidance, continuous encouragement and constant support in making this research possible. I really appreciate her guidance from the initial to the final level that enabled me to develop an understanding of this research thoroughly. Without her advice and assistance it would be a lot tougher to completion.
I acknowledge my sincere indebtedness and gratitude to my parents for their love, dream and sacrifice throughout my life. I am really thankful for their sacrifice, patience, and understanding that were inevitable to make this work possible. Their sacrifice had inspired me from the day I learned how to read and write until what I have become now. I cannot find the appropriate words that could properly describe my appreciation for their devotion, support and faith in my ability to achieve my dreams.
CHAPTER CONTENT PAGE
STATUS VERIFICATION FORM ii
STUDENT DECLARATION iii
SUPERVISOR DECLARATION iv
LIST OF FIGURES xiii
LIST OF APPENDIX xv
1 INTRODUCTION 1.1 Introduction 1
1.2 Background 2
1.3 Objectives 2 1.4 Problem Statement 3
1.5 Scope Of Project 3 1.6 Project Methodology 4
2 LITERATURE REVIEW
2.1 Chapter Overview 6
2.2 Previous Project 7
2.2.1 Embedded system for Hazardous Gas detection 7 and Alerting.
2.2.2 Design & Development of ARM7TDMI-S based 8 GSM Mobile for Home Automation & Security 2.2.3 Wireless Home And Industrial Automation 8
Security System Using GSM.
2.3 Hardware 9
2.3.1 MQ-2 Sensor 9
2.3.2 Buzzer 10
2.3.3 Relay 11
2.3.4 Microcontroller AT89C2051 12
2.3.5 Raspberry Pi 13
2.3.6 Wireless Wifi Adapter 14
2.3.7 Webcam Camera 15
2.3.8 Micro SD Card 15
2.4 Software 17
2.4.1 Proteus 7 17
2.4.2 MikroC PRO for PIC 18
2.4.3 PICkit 2 19
3.1 Introduction 20
3.2 Project Planning 21
3.3 Project Flowchart 21
3.4 Project Chart 22
3.5 Block Diagram of Project 24
3.6 PCB Fabrication (Etching) Process 24
3.71 Step one is Prepare SD card 33
3.72 Step two is hook up the Raspberry Pi 34 3.73 Step three is configure the Raspberry Pi 35
4 RESULT AND ANALYSIS
4.1 Introduction 36
4.2 Sofware Part 37
4.2.1 User Interface (UI) using MIT App Inventor 37 4.2.2 Microcontroller Circuit Design 39 4.2.3 Smoke alarm sensor circuit design 40
4.3 Project Hardware 40
4.3.1 Raspberry Pi configuration and Wi-Fi configuration 40
4.3.2 Webcam Camera as a CCTV 42
4.3.3 Etching and soldering main circuit 43
4.3.4 Alert Process System 43
4.3.5 Establishing connection between module 44 and smart phone
4.3.6 The completed hardware design 45
4.3.7 The System Process 46
4.3.8 Block Diagram Structure 47
4.4 Discussion 48
5 CONCLUSION AND RECOMMENDATION
5.1 Introduction 50
5.2 Conclusion 51
5.3 Recommendations 51
APPENDIX A 54
APPENDIX B 55
APPENDIX C 56
LIST OF FIGURES
NO TITLE PAGE
1.1 Statistic of Fire in January 2012 2
2.1 MQ-2 Sensor 9
2.2 Buzzer 10
2.3 Relay 11
2.4 Schematic diagram of Microcontroller AT89C2051 12
2.5 Raspberry Pi 2 Model B 13
2.6 D-Link wireless adapter 14
2.7 Webcam Camera 15
2.8 microSD 15
2.9 Speed Class for Sdcard 16
2.10 PROTEUS 17
2.11 MikroC PRO for PIC 18
2.12 PICkit 2 19
3.1 Flow Chart 22
3.2 Flowchart of the project 23
3.3 Block Diagram of Project 24
3.4 Modified circuit to design PCB layout 25
3.42 Printed PCB Layout 26
3.43 Personal Protection Equipment (PPE) 27
3.44 Removing protection layer 27
3.45 Placing board with PCB layout in UV machine 28
3.46 Supplying UV light 28
3.47 Immersing the board in the developer liquid 29
3.49 Placing board into conveyer spray processor 30
3.50 PCB with etched circuit 31
3.51 Drying Process 31
3.52 Drilling Process 32
3.53 Board prepared for soldering 32
3.6 Win32 Disk Imager installer process 33
3.7 Connecting Raspberry Pi to peripherals 34
3.8 Raspberry Pi booting process 35
4.1 MIT App Inventor 37
4.2 Icon for CCTV 37
4.3 Main Screen 38
4.4 Live Streaming Video 38
4.5 Microcontroller PCB layout design in Pad2pad software 39 4.6 Smoke Sensor PCB layout design in Pad2pad software 40 4.7 The connection between Wireless Lan and Raspberry Pi 41
4.8 Webcam Camera 42
4.9 Circuit was etching and soldering 43
4.10 Alert user by call 43
4.11 Alert user by message 44
4.12 Design the hardware of fire alarm with security system 45
4.13 Places for a circuit 45
4.14 Microcontroller System For smoke sensor 47
4.15 The system for CCTV 48
5.1 Webcam Camera with Servo Motor 51
LIST OF APPENDIX
NO TITLE PAGE
A Complete Prototype 54
B Coding For CCTV on Raspberry Pi 55
C Description Of Raspberry Pi 56
Safety is a condition of being safe from undergoing or causing hurt, injury, or loss. There are several types of security such as vehicle safety, safety in the workplace and the most important is home safety. One of the safety issues that need to be concerned of is the fire occurrence at home. Based on the statistics of accidents caused by fire in the house, the number of deaths is increasing as show in Figure 1.1 . This is due to the lack of supervision by parents, especially towards the children's safety at home.
1.4 Problem Statement
When people leave their house, they will not know what will happen to their house either they leave for a short or long period, especially in the case of fire that can cause losses. If fire occurs without any notice, there would be a lot of losses that need to be borne by the owner of the house compared to earlier notice of the fire.
1.5 Scope Of Project
This project is designed to ensure the security of houses against the gas leaking or fire accident when the owners were away. This project will alert users by Call and SMS. Call and SMS received by users will enable the users to take immediate action against the gas leak or fire accident.
For this project, it will use PIC AT89C2051 as a microcontroller, smoke detector, buzzer and device. The MQ-2 gas sensor has high sensitivity to Liquefied petroleum gas (LPG), propane, smoke and hydrogen, also could be used for methane and other combustible steam, and suitable for different application. This semiconductor gas sensor detects the presence of combustible gas and smoke at concentrations from 300 to 10,000 ppm. The sensor‟s simple analogue voltage interface requires only one analogue input pin from the microcontroller. The sensor can operate at temperatures from -20 to 50°C and consumes less than 150 mA at 5 V.
1.6 Project Methodology
There are three main parts to complete this project : Smoke sensors circuit
o The component use in this circuit is MQ-2 sensor. This sensor used in gas leakage detecting equipment in family and industry, are suitable for detecting of Liquefied petroleum gas (LPG), i-butane, propane, methane ,alcohol, Hydrogen, smoke. This sensor call MQ-2.
o The microcontroller use is PIC AT89C2051. The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of Flash programmable and erasable read-only memory (PEROM). The relay module is combine with this circuit to trigger button function of mobile device.
o The mobile device is a medium transmission data to alert user from call and send a message.
o To controlled the CCTV and this features make user more easier to monitor their house.
1.7 Report Structure
2.1 Chapter Overview
effective for this project is done. Throughout the analysis at the beginning of the project, the special feature in this project is determined and the components used in this project are decided.
2.2 Previous Project
2.2.1 Embedded system for Hazardous Gas detection and Alerting.
2.2.2 Design & Development of ARM7TDMI-S based GSM Mobile for Home Automation & Security.
This journal is to alert the home user in the event of fire, smoke, water tank overflow, LPG leakage, theft detection and many more things. This system involved various sensors like AS-MLC, MQ 6, MQ2, LM 35, IR sensor, door vibration sensor. The LPC 2148 ARM7TDMI-S microcontroller has used in this system received the information. The LPC2148 microcontroller is based on 32/16 bit ARM7TDMI-S CPU with real-time emulation and embedded 8 trace support, that combines the microcontroller with embedded high speed flash memory ranging. The comparator is used by a sensor unit to decide the threshold level range for the presence of sensible things like smoke, fire, door vibration, Carbon Mono oxide presence. GSM modem is also attached with microcontroller which would send the SMS to the home user as well as the emergency service providers like fire brigade or police. This system use C-Language program to developed with help of Keil compiler. This program is transferred to the microcontroller using Flash Magic software. This system just can send a message to alert a home users, the enhancement for this system is by added the function that is make a call to a home users.
2.2.3 Wireless Home And Industrial Automation Security System Using GSM.
microcontroller will send the SMS to the home user mobile through GSM modem. The main control program is developed by using embedded C language and converted to exe file by using Keil package. This program enables the interaction between all hardwares connected in microcontroller and sends appropriate signal to the home user through GSM. The weakness of this project is the system automatically send a message to police station even the smoking not coming from inside of house, maybe smoke from outside. So it will give a troble to police and fireman.
2.3.1 MQ-2 Sensor
Figure 2.1 : MQ-2 Sensor