iv HOME ALARM MONITORING NETWORK GOH SWEE TIAN This thesis is submitted as partial fulfillment of the requirements for the award of the Bachelor of Electrical Engineering (Hons.) (Electronics) Faculty of Electrical & Electronics Engineering University Malaysia Pahang JUNE 2012
viii TABLE OF CONTENTS CHAPTER TITLE PAGE DECLARATION DEDICATION ACKNOWLEDGEMENT TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES i iv v vi ix x 1 INTRODUCTION 1.1 Overview 1 1.2 Problem Statement 2 1.3 Objective 3 1.4 Scope of Project 3 1.4.1 Hardware Specification 3 1.4.1.1 Monitoring Unit 3 1.4.1.2 Transmitting Unit 5 1.4.2 Software Specification 5 2 LITERATURE REVIEW 2.1 Existing Security System 6 2.1.1 Wire Home Security System 7
ix 2.1.2 WIFI Home Security System 8 2.1.3 GSM Home Security System 10 2.2 Simple Architecture of Home Alarm System 11 2.3 Data Transfer 13 2.3.1 WIFI 13 2.3.2 Radio Frequency 13 2.3.3 Bluetooth 14 2.3.4 GSM 14 2.3.5 ZigBee 15 2.4 Comparison of Data Transmission Technologies 16 2.5 ZigBee Module 16 2.6 Summary 17 3 METHODOLOGY 3.1 System Hardware 19 3.1.1 System Hardware for Transmitting Unit 20 3.1.2 System Hardware for Monitoring Unit 21 3.2 Hardware Development 22 3.2.1 Microcontroller 23 3.2.1 LCD Module 25 3.2.3 Key Pad 25 3.2.4 X-Bee Module 26 3.3 Software Development 27 3.3.1 Monitoring Unit 28 3.3.2 Transmitting Unit 30 3.4 Design Tool 3.4.1 WP 11 32 3.4.2 ASM 11 32 3.4.3 Protues 33 3.4.4 X-CTU 33
x 4 RESULTS AND DISCUSSION 4.1 Hardware Development 35 4.1.1 Circuit diagram 35 4.1.2 Prototype 37 4.1.3 X-Bee Communication Setup 39 4.2 Software Development 41 4.2.1 Completion Coding 41 4.3 Algorithm Functionality 43 4.3.1 Intrusion Owner is not at home 44 4.3.2 Intrusion Owner is at home 45 4.3.3 Captive Signal 46 4.3.4 Disarm Signal 47 5 CONCLUSION AND RECOMMENDATION 5.1 Conclusion 48 5.2 Future Work 48 5.3 Commercialize of Product 49 References 50
xi LIST OF TABLES TABLE NO. TITLE PAGE 2.1 Comparison feature between ZigBee, WIFI, Bluetooth, Radio Frequency(RF) and GSM module 16 2.2 Specification of ZigBee Module 17 3.1 Key Feature of ZigBee Family 27
xii LIST OF FIGURES FIGURE NO. TITLE PAGE 2.1 Model of Wire Security System 7 2.2 Wire Fix on Edge of Wall 8 2.3 Setup Wizard of Motion Detector 9 2.4 WIFI Security System 10 2.5 GSM Module 11 2.6 Simple Architecture of Home Security System 11 2.7 Simple Application of Home Security System 12 2.8 Bluetooth USB Dongle 14 2.9 Structure of GSM Network 15 2.10 Mesh Topology 18 3.1 Block Diagram of Transmitting Unit 21 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 Block Diagram of Monitoring Unit MH68HC11 Pin Assignment of HC11 E-Series Circuit Diagram of LCD Module Circuit Diagram of Key Pad Decoder and Key Pad Circuit Diagram of X-Bee Flow Chart of Monitoring Unit Flow Chart of Transmitting Unit WP11 X-CTU 22 23 24 25 26 27 30 32 33 35 4.1 Circuit Diagram for Transmitting Unit 37 4.2 Circuit Diagram for Monitoring Unit 38
xiii 4.3 Prototype of Transmitting Unit 39 4.4 Prototype of Monitoring Unit 39 4.5 Configuration for Transmitting Unit 40 4.6 Configuration for Monitoring Unit 41 4.7 Communication Between X-Bee on computer 42 4.8 Simple Coding for Transmit Signal 43 4.9 Simple Coding for Receive Signal 44 4.10 Display of LCD Module on owner is not at home 45 4.11 4.16 4.17 4.18 4.19 LED Display on owner is not at home Display of LCD Module on owner is at home LED Display on owner is at home Display of LCD Module on captive mode Display of LED on Captive Signal 46 46 47 47 48
1 CHAPTER 1 1.1 Overview In this modern day of digital technology, home security system is becoming one of the fastest developing application-based technologies in the world as people strive to make living more comfortable and safe. This idea of comfortable living in homes has changed for past decade as digital and wireless technologies are now integrated into it. Thus it is leading to the concept of home security system. The implementation of home security system has few advantages provide to owner as below: Prevention of loss property due to burglary Burglars won t come across a home that has a home security system installed. Hence, it will protect our property Safeguarding life Some intruder may tend to inflict to home owner or his family. Relaxation after a day s hard work Home owner may enjoy peace and tranquility after a hard day s work. It will make home owner feel safer and more protected. However, home security systems are not flawless. Is got some delay time for the burglar to escape. Hence, the aim of designing a home alarm monitoring network is to solve the problem. This project will ensure this home alarm monitoring network successful after commercialized.
2 1.2 Problem Statement Safety for neighborhood is an arisen issue on these days. It is distinct that the safety in the public is getting worse, and people are getting worried when they are trying to leave their home. Hence a lot of securities systems are develop in the market. Most of the security system that available in the market is providing security system with security service. Such security has their own call service center that will receive signal from owner house when got intruder. When someone intrudes to owner house, sensor will trigger and send to the call center. Call centre will send a text massage to owner hand phone to notify the owner. At the same time, they will make a call to police station that nearby owner house to monitoring the situation. This system is good initially, but it is less realistic because it need some time to arrive from police station to the owner house. During this period of time, many things may happen. Intruder may also escape during this period of time. The chance to catch the thief has waste. Moreover if it just some misunderstanding such as cat passed by and activated the alarm accidently. It will be waste of time and energy for the police to go and check the house. Unlikely to people in the past, people in town not only live in normal housing area. They are living in a guarded housed or in a condominium or flats. In such place, guards are employed to check on the people that going and out from the housing area. Guards also keep people safety on that housing area. Since, there are guard and guard house standby in most of the housing area. Home alarm monitoring network develop to connect the alarm system from owner house to the guard house. When alarm trigger, signal will send to the guard house. Guards will receive signal and go to check the owner house. The traveling time is short, intruder will catch and the owner property and family safety will be protected. The home alarm monitoring network will develop to solve this problem of inconvenience.
3 1.3 Objective The main objective of this project is to develop a microcontroller base home alarm monitoring system that able to sending signal form two house and receiving signal from guard house. In order to achieve main objective, following job must accomplish: i. Develop algorithm that will wirelessly sending signal and receive signal ii. Design microcontroller connecting owner house and guard house for network monitoring. 1.4 Scope of Project This project is using assembly language for the program development. It can divide into two parts that is hardware and software. Hardware architecture is design to meet the requirement of the project specification as well as circuit design of the system. Assembly language will develop to meet the hardware specification. 1.4.1 Hardware Specification In general, this system can be divided into two parts: Monitoring unit and transmitting unit. 1.4.1.1 Monitoring Unit Buzzer Buzzer will trigger mean got intruder on this housing area. Buzzer will off when receive disarm signal.
4 Current situation LED will light on to indicate owner situation: i. LED red Owner is captive by intruder ii. LED yellow Owner is at home iii. LED dim but buzzer trigger Owner is not at home iv. LED dim and buzzer off disarm signal Which house got intruder LCD will display which house got intruder Receiving signal X-Bee will receive signal from housing area 1.4.1.2 Transmitting Unit Key pad Different password will have different usage: i. Correct password need for open door ii. Captive password send signal to guard house for rescue iii. Disarm the danger signal send signal to inform that danger have been solve Switch Select mode to give correct information to the guard house when got intruder. Two modes can be selected that is: i. Mode 1 : Owner is not at home ii. Mode 2 : Owner is at home Current situation LED will light on to indicate current situation that have select:
5 i. LED green : Mode 1 have been selected ii. LED yellow : Mode 2 have been selected Magnetic switch Magnetic switch will trigger when enter house without password or wrong password Transmitting signal X-Bee will transmitting signal to guard house when got intruder 1.4.2 Software Specification Both houses will be able to communicate with the guard house by using X-Bee module. Software application Protues is used for designing circuit diagram of the project. Software application Asm11 use to convert assembly langue in to S.19 file that needed for programming of microcontroller. Wp11 is compiler use for the programming of the microcontroller.
6 CHAPTER 2 LITECTURE REVIEW The home alarm monitoring network was discussed to study about basic on the home alarm security. Studies were done on few type of system that available on the market to develop the home alarm monitoring network. Final studies were done to do simple research on the best method to implement in the project. 2.1 Existing Security System In daily life, people are getting worried when they try to leave their home. Although they install security system on their home but the system got some flaw that cannot 100% protect their safety and property [4]. Police and guard need some time for them to arrive to our home. Many things can happen during this period of time. Hence, there is needed to develop a home alarm monitoring system. There are several types of security system that can be referring for this project. Different types of system are due to the method of the signals transmit. There are wired home security system, WIFI home security system and GSM home security system [3].
7 2.1.1 Wire Home Security System Figure 2.1 show a model of wire security system. All the wire of this system is connect to main control panel. These systems function as usual security system that will trigger alarm that fix outside user house. However, it has few disadvantage of this system [3]. All wire that connect to control panel need to set up. It requires a lot man power and time to fix this system. It also cannot be reinstalled if owner move to other place. If the alarm failure to function it need lot of time to troubleshoot problem since there are lot of wire that need to check [2] as show on figure 2.1. Figure 2.2 show the wire fix on edge of the wall. Figure 2.1: Model of wire security system
8 Figure 2.2: Wire fix on edge of wall [2] 2.1.2 WIFI Home Security System WIFI home security is a surveillance system that could monitor user home. This is home security systems use webcam as monitoring device. It is using computer as monitoring unit that can access from everywhere to watch the configure camera. This system use software application of webcam that can detect motion on the remote location [4]. By configure desire sensitivity of the webcam, it will take snapshot when got movement on its location. It will notify user when it detect motion on the screen. This system can either send email or SMS message to user cell phone [5]. Such configuration needs to configure on the software application. Figure 2.3 show the startup wizard of the motion detector that use on webcam.
9 Figure 2.3: Startup wizard of motion detector [2] By wire up webcam at every remote location that want to monitor, it will become distributed surveillance system. Figure 2.4 show example of WIFI security system.
10 Figure 2.4: WIFI security system 2.1.3 GSM Home Security System GSM home security system install on most of the house in city. This system prefer by most of the people is due to is high efficiency of the system [5]. This system will automatically send SMS alert and dial to pre-set cell phone when any sensor had been triggered. At the same time, it also makes a call to police station that nearby user home to make a report. Police will go to monitor current situation when they receive call. Such automatically system can reduce some problem such as user currently busy that cannot make call in time. However there is not 100 percent intruder will be catching since police need some time to arrive to user house [1]. It is just an additional protection for user to feel more comfortable.
11 Figure 2.5: GSM module [5] 2.2 Simple Architecture of Home Security Systems Figure 2.6 illustrate simple architecture of home security system that does not contain any device for transmit and receive signal. It just includes few switches, alarm and batteries.
12 Figure 2.6: Simple architecture of home security system [3] This simple architecture can called as closed-circuit system. When the door s and windows are close, the attached switches are closed. Since all switches are in serial, any opening of the switch will breaks the loop and triggers the alarm. The alarm will continue goes on until batteries become exhausted or switch off the alarm by key. Figure 2.7 show the application of home security system. Figure 2.7: Simple application of home security system [3]
13 Base on this system, battery need to check and change from time to time [2]. It will be better if change this system to low power consumption device that has longer battery life. Microcontroller can be use and the internal feature of microcontroller can make the system become more intelligence. Wireless device can added to maximize the data transfer range and minimize time for construct wire to connect component. 2.3 Data Transfer Microcontroller need wireless device such as WIFI for data transmission. There are many wireless devices that available on market. Few simple and common data transmission technique will discuss on this section. 2.3.1 WIFI WIFI is a popular technology that allow electronic device to exchange data wirelessly by using radio waves [7]. It is popular use on entertainment device such as multiplayer handheld game consoles. A device that can use WIFI can connect to network resource such as the Internet via a wireless network. Such access point has a range about 20 meters indoor and 50 meters outdoor [6]. However, WIFI has fairly high power consumption compare to other standards. Battery life of the device must check for time to time. 2.3.2 Radio Frequency Radio frequency is a rate of oscillation in the range of about 3 khz to 300 GHz. An antenna must be used in order to receive radio signal. However, radio tuner is needed
14 to tune into particular frequency since the antenna can pick up to thousands of radio signal at a time. Radio frequency is an analogue signal, analog to digital converter is needed on microcontroller to convert incoming radio frequency to digital signal. 2.3.3 Bluetooth Bluetooth is a proprietary open wireless technology standard for exchanging data over short distance [8]. It can create personal area network with high level of security. Master Bluetooth device can communicate with a maximum of seven devices in one time, though not all devices reach this maximum. The distance of the transmission data is about 80 meters. Bluetooth is standard wire-replacement communication protocols primarily design for low power consumption. Figure 2.8 show a Bluetooth USB dongle with 100 meters range. Figure 2.8: Bluetooth USB dongle [1] 2.3.4 Global System for Mobile Communication (GSM) GSM is a standard that set to describe technologies for second generation digital cellular network. The coverage of GSM varies according to the implementation
15 environment [7]. Cell horizontal radius varies depending on antenna height, antenna gain and propagation conditions from couple of hundred meters to several tens of kilometers. The longest distance the GSM specification supports 35 km in practical. GSM have feature known as Subscriber Identity Module that commonly known as SIM card. The SIM is a detachable smart card that containing the user s subscription information and phone book. Alternately, security system takes advantage of this feature for efficiency and accuracy transmission data. Figure 2.9: show structure of GSM network. Figure 2.9: Structure of GSM network [4] 2.3.5 ZigBee ZigBee is a global wireless language that can conduct different devices to work together. ZigBee is design to be used on application that require low data rate, low cost and low power consumption [8]. The range of data transmission is depends on the ZigBee module that use on the application. ZigBee has an external feature that will enter into sleep mode that can lengthen the battery lifetime. Star, tree, and mesh network topologies can be realized with ZigBee module.
16 2.4 Comparison of Data Transmission Technologies Table 2.1 listed the comparison feature between ZigBee, WIFI, Bluetooth, Radio Frequency(RF) and GSM module. Among the data transmission technologies, feature such as power consumption and transmission range will be discussed to suit the design of home alarm monitoring system. ZigBee WIFI Bluetooth Radio GSM Frequency Range 10 100 50 100 10 100 Long range 35 km meters meters meters Digital/ Digital Digital Digital Analogue analogue Analogue signal Power Low Fairly high Medium Medium Low consumption Table 2.1: Comparison feature between ZigBee, WIFI, Bluetooth, Radio Frequency(RF) and GSM module Base on the table, ZigBee and GSM both are suitable for the design of home alarm monitoring network. Low power consumption of device is more concern on the designing of this project. Although both have different transmission signal, it can be solve due to internal feature of microcontroller that can convert analogue signal to digital signal. However, due to cost and simplicity, ZigBee is more prefer in the design. 2.5 ZigBee Module The ZigBee module that available on the can classify into two module that are X- Bee and X-Bee Pro. Both of the ZigBee modules have same footprint but different
17 internal feature. X-Bee module cannot communicate with X-Bee Pro module. Hence, selection of the module should base on application needed. Table 2.2 shows the specification of both ZigBee modules. Specification X-Bee X-Bee Pro (S2) X-Bee Pro (S2B) Indoor Range Up to 40m Up to 90m Up to 90m Outdoor Range Up to 120m Up to 3200m Up to 3500m Transmit Power 2mW (+3dBm) 50mW (+17dBm) 63mW (+18dBm) Output RF Data Rate 250k bps 250k bps 250k bps Serial Interface 1200 bps 1M bps 1200 bps 1M bps 1200 bps 1M bps Data Rate Supply Voltage 2.1 3.6V 3.0 3.4V 2.7 3.6V Supported Network Topologies Point-to-point, Point-to-multipoint, and Mesh Point-to-point, Point-to-multipoint, Peer-to-Peer, and Mesh Point-to-point, Point-to-multipoint, Peer-to-Peer, and Mesh Table 2.2: Specification of ZigBee Module The major difference on the ZigBee module was their transmission range. Transmission range can be influence by environment. It will be better if choosing larger transmission range for application design. 2.6 Summary Home alarm monitoring network will be design on taking reference on home security system. The data transmission will use X-Bee as wireless device to transmit and receive data. Mesh topology can transfer data although the transmission range is short. It can transmit data from one module to another module to by using Mesh topology. For