Security for homes and offices is an important aspect of today's world, engineers are continuously developing unique security systems that take advantage of today's technology. GSM based zone security system is one of these unique systems that provides security. This system basically works by sending a sms to a predetermined mobile unit within a GSM network when the security is breached. It can also be logged remotely through the internet to check the status of the security.
Background
In today's world various types of security systems are being used in homes, offices, cars etc. All of these systems particularly the ones used at homes mainly consist of a motion detector, a siren that triggers when it receives a signal from the motion detector, a battery, a control device and an electronic card. If there is a breach in security the motion detector sends a signal to the electronic card which in turn triggers the siren to provide the warning. This is a disadvantage as these type of warnings can only be heard if there are people present close to the source of the siren and even though some of the security systems provide a warning call to a pre-determined phone (police/security company) using the fixed land line, thieves usually disrupt the phone lines leading to the failure of such security systems.
Therefore it is important to remove the afore-mentioned drawbacks and provide a security system that is efficient, user friendly and have an affordable cost which can be achieved by taking advantage of the present technological infrastructure and hardware.
Project Aim and Objectives
The main aim of this project is to design and develop an efficient GSM based zone security system which takes advantage of the existing GSM infrastructure and hardware components that can be used at homes and offices.
The project will focus on the following specific objectives:-
To develop and enhance a security system that sends the user a sms when the security is breached.
To test the GSM based security system on a simulator.
To build a security system that is connected to a PC interface in a LAN format and can be monitored by a centralized station which can be accessed by using remote login through internet connection
To put forward a security system that cannot be breached by burglars.
To tell the benefits of the GSM based Zone security system compared to the other normal security system.
1.3
2.0 LITERATURE REVIEW
2.1Conceptual Literature
According to Phillips (2006) security systems provide important protection against burglary and robbery. They are being relied more and more in the world to prevent theft especially with the current high crime rate. Thomas (2007) stated that there are several types of security systems but the one that users today prefer to install at homes and businesses are wireless systems as they do not have the hassle of installing a lot of wires. They are also considered to be one of the easiest of all security alarm systems to operate.
Norman (2007) highlighted that the wireless security systems use radio waves to send signals from the sensors to the control panel in order to monitor the activity within the property. The latest wireless security systems also have the ability to send data to outside sources wirelessly by using GSM.
According to Fares (2003) GSM which stands for Global systems for mobile communications is basically a cellular network in which mobile phones connect to it by searching cell in the immediate vicinity. In today's world GSM has become one of the most essential items to us as it provides us with a communication channel that enables us to communicate with the world freely. With GSM came the implementation of SMS or text messaging as stated by Poole (2006).
Gast (2005) stated that the security systems that work with GSM infrastructure using GSM modem are known as GSM security system. In this system when there is an occurrence of security breach the user is sent a SMS notifying him/her of the security breach. It is a reliable security system but recently Nohl (2009) stated that there are fears that the GSM itself can be breached by cracking the algorithm that is responsible for the protection of the security of the GSM. This has been denied by the GSM association that represents the interests of the worldwide mobile communications industry. They have affirmed that the GSM cannot be breached and that it is not currently possible to crack the algorithm protecting the GSM.
According to Norman (2007) GSM security system consists of many other main components such as electromagnetic sensors, PIC microcontrollers, keypad etc. These components make together with the GSM modem make a very effective and reliable security system.
2.2 Related Projects
2.2.1 SMS based Home Appliance Control.
This project which was done Anand kumar 2007 is a GSM based project in which SMS is used to control home appliances. This is done by sending the instruction through SMS which would be received by the microcontroller which then decodes the instruction and after that executes the instruction by switching on the relays attached to its port to control the appliances. In this project 8051 microcontroller was used and for software Keil u-Vision 3.0 and PRO51 programmer software was used.
2.2.2 GSM based Voting Machine
This project was done by John Seymour (2009). It is a GSM based project in which registered voters can send their vote through SMS. This achieved by first registering the mobile number of the voter and during that registration they are given a password. So when the user is sending a SMS vote the microcontroller will read the instruction and will first run a check whether it is a registered voter or not, if it is a registered voter then it will ask for the password and verify it. If the password is correct it will accept the vote and send back an SMS acknowledgement to the voter. The microcontroller used is a 89S52 microcontroller.
2.2.3 GSM based Remote Energy Monitoring Meter
This project is a GSM based project which was done by Hussain Said (2009). This project uses GSM infrastructure to do remote monitoring and control of the energy meter located at domestic houses. This project is very useful to the Electricity Department as it would enable them to read the meter readings regularly without the need of personnel visiting each house. It basically works by the using a microcontroller unit that always monitors and records the meter readings in its memory location. Then these reading are sent to optimum location set by the Electricity Department. In this project 8051 microcontroller was used and for software Kiel u-Vision 3.0 and PRO51 programmer software was used
3. MATERIALS AND METHODS
3.1 Technical Proposal
This project is first started by researching the project and
3.2 Equipment/ Facilities/ Programs
The list of hardware used as below:
Breadboard: All testing and troubleshooting done on it before final prototype is developed
Printed circuit board (PCB): Final prototype is developed on PCB
Multimeter: For voltage measurement across two points
Basic electronic components like resistors and capacitors are used, voltage regulator, LCD and microcontroller PIC16F877 is used
Software:
EAGLE (Easily Applicable Graphical Layout Editor) software: For PCB drawing
MikroC: Place where C programming is written and compiled to get .HEX file
PIC Simulator Software: To test, by simulation, the programming code and show the result in LCD Module
Visual Basic: To create user interface layout
3.3 Technical Description
2 PIC Microcontroller
PIC microcontroller designed by Microchip Technology. The original name of this microcontroller is Peripheral Interface Controller, but it better known as PIC. The PIC has to calculate function and its memory thus being controlled by the software. The PIC becomes a favorite microcontroller in the embedded system because of several advantages such as:
Power consumption
PIC's have much lower power consumption at 5V. \
Clock
It has more accurate calibrated oscillators. It's precise timing make the design more efficient and stable.
Availability
The PIC has been significant shortage of released parts. There are so many types of PIC with its own built in peripherals which make it useful in different situation.
Programming
The PIC microcontroller can be re program. Rather than that, its useful feature is flexibility of programming using different type of language. It can be program using different type of language such as assembler or high level programmer such as C programming.
Pin direction
Most of the PIC microcontroller pins can be set as an input or and output. Its flexibility makes the design of the circuit easier.
Global System for Mobile Communication (GSM) is a widely deployed and growing technology supporting a number of new applications being used for it [6]. GSM also can be defined as digital cellular radio system which operates on two frequency bands 900 MHz and 1800 MHz [6]. GSM is European standard but now has been globally accepted that reduces the cost of manufacturing and increase the market target [6]. This system has higher operational boundaries where it been supporting numbers of new applications such as high level of security-preventing fraud, international roaming and intersystem roaming.
2.9.2 GSM System Architecture
The GSM network can be divided into three broad parts:
The Mobile Station
Carried by the subscriber.
The Base Station Subsystem
Controls the radio link with the Mobile Station.
The Network Subsystem
The main part of which is the Mobile services Switching Center (MSC), performs the switching of calls between the mobile users, and between mobile and fixed network users.
The Mobile Station and the Base Station Subsystem communicate across the Um interface, also known as the air interface or radio link [5]. The Base Station Subsystem communicates with the Mobile services Switching Center across the A interface [5]. Figure 2.18 shows the layout of a generic GSM networkH:\..\GSM & CDMA\Overview of the Global System for Mobile Communications_files\tarch.gif
Figure 2.18: Overview of the GSM architecture
Mobile Station
The mobile station (MS) consists of the mobile equipment (the terminal) and a smart card called the Subscriber Identity Module (SIM) [5]. The purpose of SIM card is for user access to subscribed services irrespective of a specific terminal. The SIM card contains the International Mobile Subscriber Identity (IMSI) used to identify the subscriber to the system, a secret key for authentication, and other information [5]. While the mobile equipment is recognize by International Mobile Equipment Identity (IMEI). By inserting the SIM card into another GSM terminal, the user is able to receive calls at that terminal, make calls from that terminal, and receive other subscribed services [5]. The IMEI and the IMSI are independent, thereby allowing personal mobility. Password or personal identity number can be created in the SIM card as a protection against unauthorized user.
Base Station Subsystem
The Base Station Subsystem is containing of two parts, the Base Transceiver Station (BTS) and the Base Station Controller (BSC). The BTS and BSC communicate across the standardized Abis interface. The main purpose of Base Transceiver Station is to houses the radio transceivers and handles the radio-link protocols with the Mobile Station. While the Base Station Controller used to manages the radio resources for one or more BTSs. The BSC is the connection between the mobile station and the Mobile service Switching Center (MSC).
Network Subsystem
The central component of the Network Subsystem is the Mobile services Switching Center (MSC). The MSC provides the connection to the fixed networks (such as the PSTN or ISDN) [5].Other than that the MSC provides all the functionality needed to handle a mobile subscriber, such as registration, authentication, location updating, handovers, and call routing to a roaming subscriber.
The Home Location Register (HLR) and Visitor Location Register (VLR), together with the MSC, provide the call-routing and roaming capabilities of GSM [5]. The HLR contains all the administrative information of each subscriber registered in the corresponding GSM network, along with the current location of the mobile [5].
The Visitor Location Register (VLR) contains selected administrative information from the HLR, necessary for call control and provision of the subscribed services, for each mobile currently located in the geographical area controlled by the VLR [5].
The Equipment Identity Register (EIR) and The Authentication Center (AuC) are used for authentication and security purposes. The Equipment Identity Register (EIR) is a database that contains a list of all valid mobile equipment on the network, where each mobile station is identified by its International Mobile Equipment Identity (IMEI) [5]. An IMEI is marked as invalid if it has been reported stolen or is not type approved. The Authentication Center (AuC) is a protected database that stores a copy of the secret key stored in each subscriber's SIM card [5].
2.10 GSM modem
A GSM modem is a wireless modem that works with a GSM wireless network [9].The behavior of wireless modem is same with dial up modem. The main differences between them is that a dial up modem sends and receives data through a fixed telephone line while a wireless modem sends and receive data through radio waves [9].Like GSM mobile phone, a GSM modem requires a SIM card in order to operate. The GSM modem available in 2 types [9]:
PC card/PCMCIA card
Design for use with a laptop computers. The card is inserted in its particular card slot in laptop computers
External wireless modem
It is connected to the computer or other embedded system through a serial cable or USB cable. Therefore a interface circuit or system is needed for communication in between the system for certain process.
Figure 2.19 shown the main blocks and communication principle of a wireless system using the SIEMEINS C35i GSM modem.
Figure 2.19: Main blocks in communication modem and the microcontroller.
2.11 AT command
An AT command is simply a instructions used to control a modem. AT is abbreviation of Attention. Every command line starts with "AT" or "at". Both GSM modems and dial up modems support a common set of standards AT commands. In addition to the standard AT commands, GSM modems support a extended set of AT commands[9].The standard AT command do not start with "+".For example ATD (dial command) and ATA (answer command) use to send and receive fax. Where else the extended command are AT command that start with "+".For example AT+CMGS (send command), AT+CMGR (read command), AT+CMGW (write command) and AT+CMGD (delete command) used to send, read, write and delete SMS message. By instructing the GSM modem with the extended AT command, the modem can execute thing like:
Reading, writing and deleting SMS message.
Sending SMS message
Monitoring the signal strength
2.12 SMS
SMS stands for Short Message Service [17].It is a technology used to receiving and sending message in between the mobile phone.SMS first appeared in Europe in 1992 where it was been a part of GSM (Global System for Mobile Communication) standards..The GSM and SMS were developed by ETSI (European Telecommunication Standard Institute) Now the 3GPP (Third Generation Partnership Project) is responsible for the development and maintenance of the GSM and SMS standard [17].
SMS is now the most successful source of wireless carrier. Some of the reasons of its success are discussed bellow.
SMS message can be sent and ready at any time.
SMS message are supported 100% GSM mobile phones and they can be exchanged between different wireless carriers.
SMS is a suitable technology for wireless application.
The application of SMS message are virtually unlimited in market to day.They are always been related with embedded system to increase its utilization limit. Some of common example of SMS application will be describe below.
Person-person text message
Delivery and notification message
Used in remote system monitoring application.
3.3.3 MikroC Software
MikroC is a software programming program which people use to program and compile microcontroller. Figure 3.3 is the programming written in MikroC. After the build button is pressed, program runs as in Figure 3.4. After finish compilation, the .HEX file is created. Figure 3.5 shows the used and available space of RAM and ROM
Figure 3.3: MikroC with C programming
Figure 3.4: Program running
Figure 3.5: After compilation successful
3.3.4 EAGLE
Easily Applicable Graphical Layout Editor (EAGLE) provides user to draw the schematic for Printed Circuit Board (PCB) layout. It can be obtained from EAGLE website and it has freeware for basic use. The reason EAGLE circuit drawing software is better than the other software such as PROTEL is because that the component library of EAGLE is very complete. There is less chance to create own component anymore unlike PROTEL. This will really saves up some time. The auto route function of EAGLE is also slightly better than the others.
Other extra features of EAGLE are as below:
EAGLE contains a schematic editor, for designing circuit diagrams and a PCB layout editor, which allows back annotation to the schematic.
EAGLE includes a basic but functional auto router, or alternatively manual routing can be performed.
PCBs designed in EAGLE are accepted by a large amount of PCB fabrication houses without the need to export.
EAGLE is very popular with hobbyists because both a basic free edition (with a lower feature set) and low cost (freeware)
To draw a schematic, click on File => New => Schematic. Figure 3.6 will display for schematic drawing window. Then click on Add button and browse through the components list. Choose any component that wanted as Figure 3.7 and click OK. Place the component anywhere in schematic window.
Figure 3.6: Schematic drawing window
Figure 3.7: Placing components
Repeat until all components are chosen as Figure 3.8. Then click the net button to wire up all the components. A complete schematic thus formed.
net
Figure 3.9: Wire up components
To create the PCB layout, click on Board button on schematic editor and click yes to create the board from the schematic. Figure 3.10 with packages of all components from schematics is prompted out. The next task will be rearranging the components inside the white rectangular borders. Click on the route button, the route toolbar will appear as Figure 3.11. Then route the signals (airlines) into an actual copper traces on some layer(s) of the board, and positioning that trace so that it doesn't short against other traces on the same layer of the board. Finally perform the Design Rule Check (DRC) so that confirm all the trace are within the rules.
Figure 3.10: Switch from schematic to board
Route toolbar
Figure 3.11: Routing toolbar
4 PROJECT DEVELOPMENT
4.1 Overall Circuit Diagram
Figure 3.01: The System Full Circuit Diagram
Figure 3.01 shows the overall schematic diagram of GSM home intruder system. The system hardware is divided into few parts for a better explanation. They are Power Supply module, Serial port communications, Liquid Crystal Display and Microcontroller (PIC16F877A).
3.1.1 PIC 16F877P
Figure 3.02: The microcontroller and LCD implementation
Microcontroller that used to control the design circuit will be PIC 16F877P a 40 pin, 8 bit 20MHz RISC device as seen in diagram above. Hence, it has been included with extras peripheral and functions such as 8k of program memory, an 8 channel 10-bit ADC (Analogue to Digital Converter), 2 channel 10bit PWM module, and a hardware USART (Universal Synchronous Asynchronous Receiver Transmitter) used for serial communication. The PIC16F877P was chosen because of its software support availability, low cost and high feature count.
The push button connected to MCLR# pin used as reset button incase of anything happen during the operation. Reset happens when the MCLR# pin is connected to ground when the PIC is ON.
The oscillator used is 4MHz, widely used in PIC circuits when timing and clocking are important. Capacitor C3 and C4 is used to filter the oscillator signal [10]. The resistor R11 is used for current limiting. For the rest of the pin allocation, please refer to the table 3.03.
PIN NUM.
PIN NAME
CONNECTION
1
MCLR
Connected to reset switch and Vcc (+5V)
2
RA0
ZONE 1
3
RA1
ZONE 2
4
RA2
ZONE 3
5
RA3
ZONE 4
6
RA4
< NOT USED >
7
RA5
< NOT USED >
8
RE0
Connected to Buzzer
9
RE1
Connected to Buzzer
10
RE2
< NOT USED >
11
VDD
Vcc (+5V)
12
GND
Ground
13
OSC1
Connected to 4MHz Oscillator
14
OSC2
Connected to 4MHz Oscillator
15
RC0
ZONE 5
16
RC1
ZONE 2
17
RC2
ZONE 7
18
RC3
ZONE 8
19
RD0
Connected to LCD pin 11
20
RD1
Connected to LCD pin 12
21
RD2
Connected to LCD pin 13
22
RD3
Connected to LCD pin 14
23
RC4
< NOT USED >
24
RC5
< NOT USED >
25
RC6
Connected to MAX 232
26
RC7
Connected to MAX 232
27
RD4
Connected to LCD pin 4
28
RD5
Connected to LCD pin 6
29
RD6
< NOT USED >
30
RD7
Connected to output
31
VSS
Connected to ground
32
VDD
Connected to VCC (+5V)
33
RB0
Connected to Keypad pin 1
34
RB1
Connected to Keypad pin 2
35
RB2
Connected to Keypad pin 3
36
RB3
Connected to Keypad pin 4
37
RB4
Connected to Keypad pin 5
38
RB5
Connected to Keypad pin 6
39
RB6
Connected to Keypad pin 7
40
RB7
Connected to Keypad pin 8
Table 3.03: The PIC16F877P pin allocation
3.1.2 Power supply module
Figure 3.04: Voltage regulator used in system
Designing a power supply module will be more complex and heavy as it consist of a step down transformer. By considering the fact, the required input voltage is supplied directly from a plug adaptor. The figure 3.04 is the voltage regulator LM 7805 used to regulate the 9V input voltage from the adaptor. The 9V voltage will be step down and regulate to 5V.The output obtain from this power supply circuit are 9V (V+) and 5V (Vcc) DC voltage. These voltages value are based on the requirement of each module especially PIC 16F877P.The capacitor 220µF is a bypass capacitor used for filtering the regulated voltage. The output voltage of this module will be supplied to PIC 16F877P, Liquid Crystal Display (LCD) and MAX 232.
3.1.3 Serial Port communication
Figure 3.05: The serial port communication component
In the serial port communication shown above, MAX 232 is connected in between modem and intruder circuit to work as buffer .It works by shifting the signal voltage level according to the requirement. The connection is figure above are base on the datasheet available at [21].The serial port pin 3(Tx) in RS 232 is connected with MAX 232 T1 OUTPUT which is pin 14.This connection is used to transmit data from modem to microcontroller. Hence the serial port pin 2(Rx) in RS 232 is connected with MAX 232 R1 IN input pin 13.The purpose of connection is for receiving data from microcontroller to modem.
The capacitors are chosen as 10µF and not 1µF as stated in datasheet because the value worked well when testing was done.
3.1.4 LCD
Figure 3.06: The LCD used in the system
The LCD is used to display the status of the Home Intruder System. The type of LCD used is a 16 character line length in two line version JHD162A series LCD, which conform to a standard interface specification. Pins 1 and 2 are the power supply lines, whereby pin 1 is connected to ground and pin 2 to Vcc (+5V). Pin 3 is a control pin, which is used to alter the contrast of the display. This pin is connected to a variable resistor to alter the contrast by altering the resistance value. Pin 4 is the register select (RS line) connected to pin 27 of PIC 16F877P .Pin5 which will be the Read/Write line is connected with pin 3 of LCD itself. Where else the pin 6 which function as enable line connected to pin 28 of PIC 16F877P.The data line pin 11 to 14 of LCD is connected with pin 19,pin20,pin21 and pin 22 of PIC 16F877P.
4.1.5 Relay
Figure 3.07: Relay used in the system
Relay are devices which allow low power circuits to control the high circuits or instruments. Figure 3.07 shows the basic relay driver circuits used in Home Intruder System. A 9V DC voltage been feed through the coil. A NPN BC547 transistor is being used to control the relay. The transistor is turn ON when the signal is feed through the pin 30 of PIC. Once the transistor turns ON it will turn ON the relay. A diode IN4148 is connected across the relay coil to protect the transistor.
4.1.6 Software Architecture
The PIC used in the system is programmed by using the C language. C language is one of the several programmer language commonly used to create a list of instruction to control the system. Figure 3.08 shows the flow of the constructed program in this project. As what has been discussed in chapter 2.3 the C language need to go through the compiling stage before being stored in the PIC. The MIKRO C compiler is used to compile the program of the system. Hence, the compiled program will be stored in PIC by using the PIC KIT 2 programmer. The compiling and storing process will be show in detail in appendices.
The PCB layout for the entire project was designed in a PCB software called EAGLE LAYOUT EDITOR which available for free in the web. The main advantage of this program is the Geometry size and leg separation of the virtual component displayed in the software is nearly same with the actual components. As a result it will reduce the time needed for completing the PCB design.
Figure 3.08: Flow of the program in the intruder system