GSM – BASED SECURITY SYSTEM

NURHAYATI BINTI SO’AIB 51211109271

Report Submitted to Fulfill the Partial Requirements for the Bachelor of Engineering Technology (Hons) in Electronic Universiti Kuala Lumpur

MAY 2011

i

DECLARATION

I declare that this entitle GSM – based Security System is the results of my own research expects as cited in the references. The report has not been accepted for any degree and is not concurrently submitted in candidature of any other degree.

Signature Name Date

: ………………………………………….. : ………………………………………….. : …………………………………………..

ii

APPROVAL

We have examined this report and verify that it meets the program and University requirement for the Bachelor of ………………………………………………………………………………

Date: …../.…./………

Signature: …………………………………………….. Supervisor‟s Name: …………………………………… Official Stamp:

Date: …../.…./………

Signature: ……………………………………………. Co-Supervisor‟s Name: ……………………………… Official Stamp:

iii

ACKNOWLEDGMENT Firstly. The sources given by him are useful indeed. My fellow course mates should also be recognized for their support. Ismail Bin Adam as my co-supervisor. I am very grateful to get the guidance and advice from Mr. iv . Their views and tips are useful indeed. My sincere appreciation also extends to all my friends and others who have provided assistance at various occasions. Thank you for all. He always help to improve my knowledge about the Programming C and troubleshoot the circuit. advice and assistance throughout the process of fulfillment of this final year project. thank to Allah with His blessing I‟m finishing for my GSM-based Security System project. Mr Ahmad Basri bin Zainal for his guidance. I would also like to take this opportunity to thank my beloved parents and siblings for always mentally and financially supporting me while completing this project till the end. I would like to express my sincere appreciation to my supervisor.

The objective of this project is to build a security system by using GSM modem. This project consists of two main parts. it also interfaces the microcontroller with computer using UC00A USB to UART converter. the main goal of this project is to establish a security system with send system service via Short Message Service (SMS). House is very important need of living nowadays. keypad and GSM Wavecom modem. Liquid Crystal Display (LCD). Since many years ago. It became important due the increase number of crime in Malaysia every year. security system has been an essential part of home management system. Thus. Proteus 7. it is need to do testing for reliability and it also can applied in the practical life because it just a simple and affordable system for home to apply security system right now. While for the software implementation. It based on the application of PIC 16F877A microcontroller.ABSTRACT This project is designed to improve the security system. Besides. This project successfully achieved the main objective which is user was able to get the message using SMS and it definitely can inform the user if have the criminal at home. For hardware part. the security system is controlled by a microcontroller PIC 16F877A. hardware and software. So. v . It also can protect house by using password door system.2 for PIC has been used for simulation.

1 1.3 1.TABLE OF CONTENT CHAPTER TITLE PAGE TITLE PAGE DECLARATION APPROVAL ACKNOWLEDGEMENTS ABSTRACT TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES LIST OF SYMBOLS TABLE OF APPENDICES i ii iii iv v vi x xi xiii xiv 1 INTRODUCTION 1.2 1.4 1.5 Introduction Project Background Problem Statement Objective Scope of Study vi 1 2 2 3 4 .

2 Example Application of SMS 2.6.4.1 2.2 Wireless Door Alarm 7 8 9 2.6.1 Maxtrigger Security System 2.1 System Overview 2.8 Liquid Crystal Display (LCD) 2.6 1.3.2 General Syntax of Ext AT Commands 2.7 Sensor 2.1.6 AT Command 2.8 Project Expectation Report Structure Summary 4 5 6 2 LITERATURE REVIEW 2.1 Introduction 2.9 Keypad 2.2 The Security System in Market 2.1 Wavecom Fabstack Supreme 10 10 12 13 14 2.1 Short Message Service 2.5.7 1.4 PIC 16F877A Microcontroller 2.1 Basic and Extended Commands 2.10 Pin Connection Summary vii .9.4.2 Special Features of Microcontroller 2.3 GSM Modem 2.2.2.3 Operating Mode 15 16 17 17 18 18 2.1 2.2 PIR Sensor Limit Switch 21 22 23 24 26 27 29 2.7.8.7.5 Handphone 2.1 The PIC Architectures 2.5.5.

5.1.3.4.5 Keypad 40 41 42 43 45 45 46 47 36 36 38 39 40 3.5.4.2 PIC Circuit Design 3.4.2 3.4.4 LCD 3.3.1 Schematic Diagram 3.3 Switching 3.55 Compiler 48 53 54 58 3.4.3 Basic AT Command Software Flow Chart Programming Tool 3.4.5.5.6 Summary viii .3.3.5.1 List of Component 3.1 Push Button 3.3 Board Layout 3.2 PCB Layout 3.2 UIC00A PIC Programmer 51 3.4.1 3.4 Hardware Development 3.2 3.1 Schematic Diagram 3.2 Limit Switch 3.1 3.4.3 METHODOLOGY 3.4.4.3.3.5 Software Development 3.4.4.3 Introduction Design Flow Project Architecture 3.2.2.3.5.1 3.1 Controller Unit Design 3.5.3.1 CCS Compiler 3.4 PICkit 2 v2.2 Flow Chart Block Diagram 30 31 33 35 3.

2 4.1 4.6 Introduction Hardware Result Explanation Problem Software Result The Fully Result Summary 59 59 60 63 65 67 5 CONCLUSION 5.3 4.5 4.2 5.4 4.3 Introduction Conclusion Suggestion for Further Work 68 68 69 71 74 76 77 78 REFERENCES APPENDIX A APPENDIX B APPENDIX C APPENDIX D ix .1 5.4 RESULT AND ANALYSIS 4.

3.1 3.1(c) 3.1.3 4.5.1 3.4.LIST OF TABLES TABLE NO.1(a) 2.2 Pin of LCD and its function Parallel LCD Protocol LCD Command Bit function and value PIC Application List of Component PIC Circuit Limit Switch Functional Board Function Serial port Pin 24 25 37 30 39 42 54 62 x .1(b) 2.4.2.8.4.8.3.2 3. TITLE PAGE 2.8.

2.1 2.7.4.1 3.2 2.1 2.1.2 3.9 ` 2.9.1 (a) 2.4.8 (a) 2.1 3. TITLE PAGE 2.2 2.8 (b) 2.2.2.4(b) 2.4.LIST OF FIGURES FIGURE NO.3.2 3.9.3.1 Maxtrigger Security System Wireless Door Alarm Wavecom GSM Modem PIC microcontroller PIC 16F877A ports PIR Sensor Limit Switch LCD Sample Source Code of LCD Keypad Pin Connection Pin Connection of Keypad Block Diagram of Flow Project Flow Chart of Program Flow Chart of Project Block Diagram of Project Schematic Diagram of Project Circuit for PIC 16F877A Application and Interfacing PCB layout of PIC Push Button Diagram xi 8 9 10 12 13 21 22 23 23 27 28 28 31 32 34 35 37 38 40 40 .2 3.3.7.4. NO.1 3.4(a) 2.2 3.1 2.1 (b) 3.3.

5.0 Programmer PICkit Programmer Application Select Device Family Write Successful Status Write Error Status Select Device Dialog Complete Hardware Project Home Prototype DB9 and MAX232 System before ON System after ON The Information display on LCD 41 43 44 45 46 47 49 51 53 54 55 56 57 57 57 60 60 61 65 66 66 xii .4.5 3.5 (a) 4.3.3 3.5.2 (b) 4.5.4.4.5.4.2 (a) 4.5.5 3.5.3.1 (a) 3.3.3.5 (b) 4.3 4.2 3.3.2 3.4 (b) 3.4 (d) 3.3.3.3.5.4.2 3.4 (e) 3.4 (f) 4.1 (b) 3.5.1 3.3.5.3.3.4 (c) 3.5 (c) Limit Switch Basic LCD Program Simulation of LCD Keypad Operation Basic Program AT Command Programming Flow Chart of System CCS Compiler UIC00A PIC Programmer Board Layout PICkit 2.5.4 (a) 3.4.

TABLE OF SYMBOLS PIC SMS PIR LED LCD - Peripheral Interface Controller Short Message service Passive Infra-Red Light Emitting Diode Liquid Crystal Display Electrically Erasable Programmable Read-Only Memory Complimentary Metal-Oxide Semiconductor Code Division Multiple Access Time Division Multiple Access 3rd Generation Partnership Project Multimedia Messaging Service Wireless Application Protocol Protocol Data Unit Printed Circuit Board Input Output Random Access Memory Read-Only Memory Global System for Mobile Communication EEPROM CMOS CDMA TDMA 3GPP MMS WAP PDU PCB I/O RAM ROM GSM - xiii .

TABLE OF APPENDICES APPENDIX TITLE PAGE A B C D Datasheet of Resistor Array Datasheet of LCD Datasheet of Keypad Datasheet of PIC 16F877A 74 76 77 78 xiv .

xv .

xvi .

xvii .

xviii .

There are hardware and software components. and Proteus 7. and solution of environment. keypad. This technology was introduces in communication rapidly. software components are using CCS Compiler. PIC 16F877A microcontroller circuit and sensor. The main component of this system divides by two parts.1 Introduction Nowadays. PICkit 2. sensor. Meanwhile.2. 1 . The GSM technology now can apply for many field of life. The examples are access control. The main hardware is LCD. also study how to improve the application and reduce the cost.CHAPTER 1 INTRODUCTION 1. While. This final year project is to study and understand about the GSM technology in home security system. All components are combined together to make one security system that can be applied for our life. the GSM technology applied in most our life widely.0.

1. By using Microcontroller-based interface. the government is focused on the safety of people in each district. 2 . Recently. The microcontroller will use as main controller to communicate between device and user. Security system in the market is so widespread is required in every home or office. two ways communication can be implemented. Application of GSM technology Analyze and reduce cost. windows or gate at the house or any residential users. Liquid Crystal Display (LCD) and will make this system more reliable. This project will go through part by part where: i) ii) iii) Choose the microcontroller and programming.2 Project Background GSM-based Security System is a security system that is capable to monitoring house and its compound. 1. the government urged the police take care of each high-risk crime areas. Additional supportive devices such as push button. Program C (CCS compiler) is use to develop the specify structure of the security system. sensor. Security guards also are needed to ensure the safety of all the public areas.3 Problem Statement At present. This system will monitor doors. The user can control device by communicate with controller by using GSM technology. Even the government requires the installation of CCTV cameras in every corner of the highrisk areas.

Consumers will be more responsible in his area. 4. Through this project. 1. To develop the security system that must work effectively. C language is use for developing program and system optimization. Every day there are only the cases occurred in which all the people blaming each other.However. This project will also reduce the burden on the police to take care of their civil rights.4 Objective There are some objectives need to be achieved in order to accomplish this project. 3. The most interesting. To develop security system for standard house. we will improve our weaknesses. office or residential area. These objectives will act as a guide and will restrict the system to be implemented for certain situations: 1. 3 . 2. This means that the security system in Malaysia is still a lot of weaknesses. particularly the security system that is already on the market. To use GSM as a medium to receive the message from sensor. without depending on hope the police or security guards. many more thefts and robberies occur in residential areas and officials even if the security is in good condition. The project will also provide a great convenience to the user to ensure the safety of his own. while many more cases pending to be solved. this project gives facilities for users to connect directly to the fire when emergency assistance is not only the police immediately.

Programming knowledge is important in optimizing the source code for this project.5 Scope Of Study The scopes of this project are to design and fabricate a security monitoring system.6 Project Expectation Mainly this system will protect our resident such as home or office by sending message to user that informs them the level of security. 1. Serial data knowledge will be an important part in developing this project. C language is a good tool to use for this project because it can be done a lot of functions and compatible to PIC microcontroller. The project need an understanding about the data communication and will be a platform for that security application.2 is an engineering circuit design and drawing software for electronic circuit designing for PIC 16F877A. 4 . The user can get the information based on message sent. The controller unit will send the information to user via short message service (SMS) by through GSM modem. This software aids us in showing the reality before do it practically. The system should design with standard components that available at market.1. Proteus 7. The project needs an understanding about the way of the connection between PIC microcontroller to GSM monitoring system.

From this programming. sensor device. this device can be extending by adding some features like put the wireless system and display via PC. The hardware part is focus on to develop and design the circuit. and equipment and send message to handpone. sensor device. At part 1. 5 .For earlier stage. This introduction gives a confident about purpose of developing my project. controller unit. 1. this system will use to monitor doors and windows at our homes. The chapter more covering about project background. so that the controller unit can communicate with GSM modem. This project is divided into two parts. scope and finally about projects expectations.7 Report Structure Chapter One: This chapter will tell us more detail about the introduction to my project. it will cover about the hardware and the part 2 will cover the software. it will connect with hardware. Chapter Two: This chapter will give scope of studies and research done in understanding it more on the project. Then the software part is on to write the programming for hardware part. For future planning. equipment and GSM modem.

These two parts was important for each other to develop the project.Chapter Three: This chapter will discuss the methods that use throughout the phases. let the user can get the correct data control the equipment or device via short message service (SMS). 6 . Chapter Five: This chapter is conclusion part. It includes the image of the project. It content the types of hardware and software part used. Besides. It gives the explanation to the reader about overall of the project. The result will show in two part that software and hardware. Chapter Four: This chapter show the result when the project was function.8 Summary The overall of this project is to study and explore the application of the microcontroller in security system and communication with GSM modem. 1. There is some solution or suggestion of upgrade the system. This application will give the student for the new knowledge.

There are PIC microcontroller. There are still have product more cheper but sometime it not be safe and limitation monitoring.CHAPTER 2 LITERATURE REVIEW 2. For this chapter. The product designed with intelligent and integrated but hte cost is expensive and need a contract to sign. There are a lot of products currently available in the market. 7 . it will dicuss the security system that existed in market and review all the component are used for this project. sensor. GSM Modem. This topic will also discuss about the component that will be used in developing this systems.1 Introduction This chapter reviews about previous system that has been developed and has similarities with the remote control of a moving vehicle. AT Command and Handphone / Personal Computer.

hence save your valuables and life. This concept is called: PREVENTION.2. within a radius of 30 meters ( 100 feet).2. However. even through concrete and brick walls.[1] The step to use this security system is: 1) 2) 3) Plug to wall socket and switch ON the Main Unit. its powerful 90dB high pitch siren will awaken you while the intruder panics and run for his life. Press Remote button 1 second and release for activation. Your house will be protected from intruders.2 The Security System in Market 2. it still new in market and the ordering only used online market. It applies with wireless system and burglar alarm system. It also has remote control to setting up this security for anytime. Main Unit is able to receive its sensor signal.1: Maxtrigger Security System MAXTRIGGER™ security system is a Malaysian made product and is designed to be wireless with high pitch siren capable to deter away burglar.1 Maxtrigger Security System Figure 2. It used burglar sensor to detect the unknown person.2. Although MAXTRIGGER is simple and easy to use product. The product operates at DC 12 V and has backup rechargeable battery. 8 .

use as your personal security companion . apartment.2 Wireless Door Alarm Figure 2. It uses for secure your doors. It uses a magnetic sensor to detect the opening of a protected door or window. attach the main sensor on the door/window and attach the stick adjacent the main sensor on the door/window frame. Test the setup by switching on the system of the main unit and see whether the alarm can be triggered by opening the door/windows. window. 3) Install surveillance cameras The operation instruction is.2. and sounds a super loud alarm to alert you. Locker. Medicine cabinet. door. Gun cabinet and so on.2. Here are 3 steps you can take to prevent a Break in: 1) Install a security system. cabinets (anything with a door). office. Refrigerator. 2) Post signs to warn criminals that your home is protected. Switch the alarm ON in case of emergency [2]. RV from Intruders and makes a great protection device for yourself. 9 . Besides. windows. It can also be used to alert you of an opening of a Sliding glass door.2: Wireless Door Alarm This is the fastest way to protect your home.slip one in your bag.2. feel off the double sides adhesive tape.

3 GSM Modem The GSM modem is a wireless modem that works with a GSM wireless network. Figure 2. a GSM modem requires a SIM card from a wireless carrier in order to operate. Like a GSM mobile phone. The main difference between them is that a dial-up modem send and receives data through radio waves.2.3. The figure 2.3. This modem is built to withstand the toughest environments. A wireless modem behaves like a dial-up modem.1: Wavecom GSM Modem 10 . 2.1 is shown the product features.1 Wavecom Fabstack Supreme 10 The Wavecom Fabstack Supreme 10 modem delivers all the power of WISMO® technology in one unit[3].3.

By using this command. we need to use AT command. the user can communicate either by computer or PIC controller. From this knowledge. Both GSM modem and dial-up modem support a common set of standard AT command. These extended AT commands are defined in the GSM standard.To communicate with GSM modem. the user can do things like: 11 .

4(a): PIC microcontroller 12 . Reading. wide availability. large user base. availability of low cost or free development tools. iv. Monitoring the signal strength. PIC are popular with developers and hobbyists alike due to their low cost. iii. writing and deleting SMS messages. but shortly thereafter was renamed "Programmable Intelligent Computer"[4]. Reading. extensive collection of application notes. Sending SMS message. Figure 2. v. Monitoring the charging status and charge level of the battery. 2. writing and searching phone book entries.i. and serial programming (and re-programming with flash memory) capability. ii.4 PIC 16F877A Microcontroller The name PIC initially referred to "Programmable Interface Controller".

33 input/output (I/O) pins.4(b): PIC 16F877A ports PIC 16F877 (Microchip Technology.) 8-bit microcontroller will be used for the controller. Operations and registers are not orthogonal. some instructions can address Random Access Memory (RAM) and/or immediate constants. This microcontroller has a 25 MHz processor (the current compiler runs the processor at 20 MHz).4. Inc. (256*8bytes) of data EEPROM [5].1 The PIC architectures have several limitations:   A small instruction set. while others can only use the accumulator. (8K*14words) of Enhanced FLASH program memory. 13 . The PIC does not have an operating system and simply runs the program in its memory when it is turned on.Figure 2. I was chosen to detect any switch triggered and generate the DTMF tones according to the predetermined handphone number. (368*8bytes) of RAM. 2.

from automotive industries and controlling home appliances to industrial instruments.000. remote sensors.SV) Programmable code protection Power saving sleep mode Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation (v) (vi) (vii) (viii) (ix) (x) (xi) (xii) Self-reprogrammable under software control Single supply 5V in-circuit serial programming Up to 8K x 14 words of FLASH program memory Up to 368 x 8 bytes of data memory (RAM) Up to 256 x 8 bytes of EEPROM data memory Only 35 single word instruction Timer 0:8-bit timr/counter with 8-bit prescaler.000 erase or write cycle enhanced FLASH program memory and has 1. The PIC 16F877A provides the following feathers [6]: (i) (ii) (iii) (iv) Wide operating voltage rage (2.PIC microcontroller perfectly fits many uses.0V-S. Timer 1:16-bit timer/counter with prescaler can be increment during SLEEP via external crystal or c 14 .000 rase or write cycle data EEPROM memory typical. It also has 100. electrical door locks and safety devices. 2.2 Special Features of Microcontroller PIC 16F877A is a low power.4. It is also ideal for smart cards as well as for battery supplied devices because of its low consumption. high speed FLASH?EEPROM using CMOS technology.

SMS first appeared in Europe in 1992. One major advantage of SMS is that it is supported by 100% GSM mobile phones. Later it was ported to wireless technologies like CDMA and TDMA. mobile technologies such as WAP and mobile Java are not supported on many old mobile phone models. wallpapers.5. Almost all subscription plans provide by wireless carriers include inexpensive SMS messaging service.2. business card and WAP configurations to a mobile phone with SMS messages. pictures operator logos. One SMS message can contain at most 140 bytes (1120 bits) of data [7].5 Handphone The cell phone is the key player in wireless technology in today. It is possible to send ringtones. 2. animations. SMS text messaging supports languabe internationally.1 Short Message Service (SMS) This is a technology that enables the sending and receiving of message between mobile phone. 15 . SMS messages can also carry binary data. Unlike SMS. It works fine with all language supported by Unicode. It was include in the GSM (Global System for Mobile Communication) standard right at the beginning. The technology make the possessing of a mobile a basic commodity and the trends in wireless technology is changing from day-to-day.

This is different from the “pull” model where a device has to poll the server regularly in order to check whether there is any new information. a program (spmetimes with the help of a group of sensor) is constantly monitoring the status of the remote system [8]. There are two reasons: (i) A mobile phone is a device that carried by its owner most of the time. You can check what the SMS text message contains immediately. a program may be written to “ping” a server regularly. The “pull” model is less suitable for alert and notification applications. (ii) In a remote system monitoring application.2 Example Application of SMS SMS is a technology for delivering alerts and notification of important events. For example. the program will send a text message to the system administrator to notify him/her of the situation. the program can send an SMS alert to the system administrator to notify him/her that the may be hanged. Is a certain condition is satisfid. the mobile phone will notify you by giving out a sound or by vibrating.2. 16 .5. Wherenever an SMS text message is received. since it wastes bandwidth and increases server load. If no response is received from the server. SMS technology allows the “push” of information.

low consumption.).3 Operating Mode: SMS Text and SMS PDU The SMS specification has defined two modes in which a GSM/GPRS modem or mobile phone can operate. coprocessor applications. etc.) [10]. receiver frequencies. interface replacement in larger systems.6 AT Command Electrically Erasable Programmable Read-Only Memory (EEPROM) memory makes it easier to apply microcontrollers to devices where permanent storage of various parameters is needed (codes for transmitters.5. 17 . Following are the AT commands affected: (i) (ii) (iii) (iv) (v) (vi) (vii) +CMGS (Send Message) +CMSS (Send Message from Storage) +CMGR (Read Message) +CMGL (List Message) +CMGW (Write Message to Memory) +CNMA (New Message Acknoledgement to ME/TA) +CMGC (Send Command) 2. Low cost. etc. motor speed. The mode that a GSM/GPRS modem or mobile phone is operating in determines the syntax of some SMS AT commands and the format of the responses returned after execution [9].2. They are called SMS text mode and SMS PDU mode (PDU stands for Protocol Data Unit). easy handling and flexibility make PIC applicable even in areas where microcontrollers had not previously been considered (example: timer functions.

2. +CMGL (List SMS messages) and +CMGR (Read SMS messages) are extended commands [11].In System Programmability of this chip (along with using only two pins in data transfer) makes possible the flexibility of a product. For example. All GSM AT commands are extended commands. A(Answer).2 General Syntax of Extended AT commands The general syntax of extended AT commands is straightforward.6. The syntax of basic AT commands is slightly different [12].1 Basic Commands and Extended Commands There are two types of AT commands: basic commands and extended commands. or it can be used to improve programs on finished products. to store calibration data available only after final testing. For example. This capability can be used to create assembly-line production. The syntax rules are provided below. 2. +CMSS (Send SMS message from storage). Extended commands are AT commands that start with “+”. Basic commands are AT commands that do not start with “+”. 18 . D(Dial).6. after assembling and testing have been completed. H(Hook control) and O(Return to online data state) are basic commands. +CMGS (Send SMS message).

(<CR> represents a carriage return character). then the extended AT command “+CMGL”. like this: AT+CMGL<CR> Syntax rule 2: A command line can contain more than one AT command. assign the string “ALL” to the extend AT command +CMGL: AT+CMGL=”ALL”<CR> 19 .Syntax rule 1: All command lines must start with “AT” and end with a carriage return character. followed by a semicolon and the next extended AT command “+CGMI”: AT+CMGL. Only the first AT command should be prefixed with “AT”. user can press the Enter key on the keyboard to output a carriage return character. Example: To read all SMS messages from message storage in SMS text mode. +CGMI<CR> An error will occur if both AT commands are prefixed with “AT”: AT+CMGL. then the extended AT command “+CMGL”. type “AT”. Example: To list all unread inbound SMS message storage area and obtain the manufacturer name of the mobile device. AT commands in the same command-line string should be separated with semicolons. and finally a carriage return character. AT+CGMI<CR> Syntax rule 3: A string is enclosed between double quotes. Example: To list all unread inbound SMS message stored in the message storage area. In a terminal program like Hyperterminal of Microsoft Windows. type “AT”.

it moves the cursor to the beginning of the current line. When a terminal program such as HyperTerminal of Microsoft Windows sees a carriage return character.Syntax rule 4: Information responses and result codes (including both final result codes and unsolicited result codes) always start and end with a carriage return character and a linefeed character. Hence. When it sees a linefeed character. The “<CR>” and “<LF>” represent a carriage return character and a linefeed character are respectively. the command line “AT+CGMI<CR>” that you entered and the corresponding response will be displayed like this in a terminal program such as HyperTerminal of Microsoft Windows: AT+CGMI OK 20 . Example: After sending the command line “AT+CMGI<CR>” to the GSM modem. the GSM modem should return a response similar to this: <CR><LF><OK><CR><LF> The first line is the information response of the AT command +CMGI and the second line is the final result code. The final result code “OK” marks the end of the response. it moves the cursor to the same position on the next line. It indicates no more data will be sent from the mobile device to the computer or PC.

7 Sensor 2. Cytron Technologies uploaded this project with the aim to assist hobbyist and students to pick up embedded system application and development [13]. It demonstrates the method to interface PIR sensor with microcontroller.7. 21 . It can further be modified to become alarm system.2.1 PIR Sensor Figure 2.7.1: PIR sensor This PIC microcontroller based project uses PIC16F876A to interface PIR sensor and read its status for alarm system. PIR can be used to detect human motion.

2: Limit Switch A limit switch is used to limit the activation of an electrical circuit. This switch tracks the location of a specific item and opens or closes when that item reaches a specific location. When the switch is “open. a light inside a car often turns on when one of the doors is opened. 22 .” the switch is disengaged and no electrical power will pass through it. or lack thereof. When a circuit is “closed. The switch is activated by physical contact.7. For example.” it allows the flow of electrical current through the switch to pass to the device being powered.7. The most common type of limit switch is a mechanical limit switch.2 Limit Switch Figure 2.2. Whether the limit switch is open or closed is generally determined either by the position of a device being powered or by a set amount of time a device requires completing a specific task.

8 Liquid Crystal Display (LCD) Figure 2. schematic and detail description [14].2. By using the SK40C. user is able to complete the circuit for this project easily. Information which is includes sample source code.8(a): LCD 2x16 character LCD is the most common message display device used to display ASCII character. Figure 2.8(b): Sample source code of LCD 23 .

LCD breakout pin and its function are shown below. select instruction or data register 5 6 7 8 9 10 11 12 13 14 15 16 RW E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 LED+ LEDSelect read or write Start data read or write Data bus pin Data bus pin Data bus pin Data bus pin Data bus pin Data bus pin Data bus pin Data bus pin Backlight positive input Backlight negative input GND (always write) RB5 RD0 RD1 RD2 RD3 RD4 RD5 RD6 RD7 5V Connect to JP8 RB4 Table 2.1 System Overview In this project.2.8. It has the same pin configuration with Hitachi HD 44780.8. Pin 1 2 3 Name VSS VCC VEE Pin Function Ground Positive Supply for LCD Contrast adjust Connection GND 5V Connected to a preset to adjust contrast 4 RS Select register.1(a): Pin of LCD and its function 24 . a JHD 162A (with black light) 2x16 character LCD will be used.

RS and E are connected to RB4 and RB5 of PIC reactively.8. depend on the I/O pin available. Pin 15 and 16 of LCD are for backlight which is optional by connect or disconnect JP8. Users need both tables to initiate LCD display. Table 2. while the RW (read/write) pin is connected to the ground which indicates the LCD is in write mode. there should be no problem using the 8-bit interface which much easier for software development. Before display any ASCII character. DB0-DB7 (8-bits) is connected directly to RD0-RD7 of PIC [15].1(b): Parallel LCD Protocol 25 . The Table 1 below is LCD protocol or function and table 2 LCD command bit function and the value.This LCD may be interfaced in either 8 pins (8-bit interface) or 4 pins (4-bit interface). LCD needs to be initialized. Switching on LCD backlight will consume more energy and further dry up the battery faster. For PIC 16F877A which has 33 I/O pins. For data communication pins. The third pin (VEE) needs to be connected to a variable resistor to control the LCD contrast.

2.9 Keypad Keypad is an array of switch. when button „1‟ is pressed. There will be 2 wires connected each time a button is pressed.8.Table 2. LCD will need to be initialized in PIC program according the table [16]. pin 1 and pin 5 is connected. RS must be sent to logic 0 (Low) to indicate the data send trough data pin (8-bit) is command. They are many types of keypad. User is advised to check pin before use [17]. And it maybe as different pin connection. 26 . For example. The buttons make it connect.1(c): LCD Command Bit function and value To initiate LCD. There is no connection between rows and also columns. Different types of keypad sometimes come from different manufactures. RS is set to logic 1 (High) to write an ASCII character to LCD.

27 . it consists of 8 pins.9: Keypad The keypad‟s pins need to be pulled up or pulled down to avoid floating case.1 Pin Connection The figure below shows the internal structure of the 4x3 keypad. Pull up normally connect to 5V and pull down is connect to ground. When button 3 is pressed. 4x3 Keypad pin can directly connect to microcontroller or keypad decoder IC. For this kind of keypad. 2. Different brand or manufacturer of keypad has different architecture and number of pin. the pin C4 and pin R2 will short while the others are open [18].Figure 2.9.

Figure 2.9.1(a): Pin Connection

The figure below shows the internal structure of 4x3 keypad from other manufacturer. For this kind of keypad, it consists of 8 pins and only 7 pins are used. Pin 8 is unused. When button 3 is pressed, the pin C3 and pin R1 will short while the others are open.

Figure 2.9.1(b): Pin Connection for Keypad

28

2.10

Summary

The main components of the project are described in this chapter. There are have two functional in this security system. First, the system can detect unknown person when the user activated this system. PIC Microcontroller will read the data when the sensor activated. Then, the GSM get data from PIC Microcontroller to send message for user by using handphone. To communicate between GSM modem and hand phone, AT Command is a basic command need to be study and learning. It is important to apply this project. Because of that, the GSM modem just only understands AT Command declaration. From this, it can communicate with hand phone, computer and PIC board. To accomplish for this project, the entire component must be work effectively based on objective. The GSM as a medium to receive the message from PIC microcontroller is the same application with handphone. Programming C is used for PIC board application to develop program and system optimization. In the simple application, this security system can be used for our life whether in the house, office or residential area.

29

CHAPTER 3

METHODOLOGY

3.1

Introduction

This chapter will give an explanation about the method that used in this project. It will be including the description of the design flow, design architecture and detail explanations for the software development (compiling process, assign pin location and run programmer) as well as hardware development Liquid Crystal Display (LCD), sensors, push button and PICKits downloaded cable. Figure 3.1 shows a phases and project flow for this project. There are five phases to complete this project:

30

31 .1: Block Diagram of flow project. the programming needs to be done correctly.2 Design Flow Based on the requirement. software development and hardware development. the design is divided into two developments. 3.Figure 3. In order to confirm the system is working.

2: Flow Chart of program 32 .2 shows the complete process that will be covered.Figure 3.0 RUN Optimize the source code Modified to meet the standard requirement for security system Troubleshoot and repair hardware or software OK END Figure 3. START Learn about PIC Microcontroller device and GSM module how it work Design the Circuit are related Writing the programming C with it source code Compile and download source code using Proteus or MPLAB v7.

the next step is to modify to meet the standard requirement for security system.The GSM-based Security System need do a lot of studying.3 shows the project architecture. The circuit and program have to compile and download the source code using Proteus 7. we can troubleshoot the circuit to get the best result.3. knowledge about PIC Microcontroller and GSM modem must be studying for the basic function. It has shown the overall process flow for the software and hardware development. In this project. If the program getting error. the source code have to optimized and then try to running again until successful. 33 . the hand phone/PC as the output for this project.1 Flow Chart Figure 3. The programming C must be writing in CCS Compiler for interface. It become with some source code. There must have some circuit to be design. If the entire program is no error.2. researching and troubleshooting. When the program can be running.3 Project Architecture 3. Meanwhile. 3. The troubleshoot will repair the hardware and software component better. The first step. push button and sensor are the input of microcontroller.

1: Flow Chart of project After studying about programming. The program from CCS Compiler was running in Proteus to see whether the hardware functions or not. After that. combine it with PIC 16F877A Microcontroller to see the result. 34 . Then.Program Design Compiling Process Assign Pin Location Run Program Push Button Sensor PIC 16F 877A Microcontroller GSM Modem Figure 3. all the hardware connected to GSM Modem.2. Every program related are compiled in CCS Compiler. For final process. I need to design some program related to this system.3. The pin location placed for each component in Proteus 7. develop the circuit based on simulation by adding the push button and sensor.

The PIC 16F877A is a core of this project.3. the door is not open. This is for door security system.2 Block Diagram Description of Block Diagram as followed below. when the limit switch activate. Limit Switch Keypad GSM PIC 16F877A Micro controller Buzzer Handphone / PC LCD Figure 3. However. Second operation is when the password entered. when the user enter for the wrong password.3. The handphone/PC as the output will get the message from GSM modem.3. The limit switch and keypad is the input. the PIC contoller will get the data and the door will be open. The entire program will be control through the microcontroller. 35 . The data from PIC will send to GSM. The message will display in LCD as the output. will give the signal for PIC.2: Block Diagram of project There are two function in this program. First.

3. This simulation is the basic program to show how PIC 16F877A communicate with sensor as switching and LED. it will give information to handphone/PC through the GSM modem.1. 36 . The hardware developments include PIC microcontroller. PIC 16F877A microcontroller.3. and 3 LEDs represent as output.4.4. 3. application device. keypad. The architecture outlined the inputs and outputs of the system. sensors.1 Schematic Diagram The hardware part are sensor (switch). GSM modem and handphone.1 Controller Unit Design This hardware is a part of interfacing in between input sensor. This represent from input signal send to process and respond to output signal. LCD and push button. The controller unit will be process in the input signal and turn ON/OFF/RESET the application needed and at the same time.4 Hardware Development The hardware development for this project mainly referred to the project architecture block diagram that has been visualized in the beginning of this chapter.

1.1. 12 VDC 1A. The I/O ports at PIC were used as shown below.4.Figure 3. Output response for Switch 2 LED. Output response for Switch 3 Push Button for Switch 1 Push Button for Switch 2 Push Button for Switch 3 Table 3. I/O Port C0 C1 C2 A0 A1 A2 Application LED.1: Schematic Diagram of Project The PIC 16F877A is powered by adaptor power supply.4. Output response for Switch 1 LED.1: PIC Application 37 .

and serial port communication. The PIC circuit have the power supply regulator for 12V DC.3.4. The design PCB layout is shown in figure below. Figure 3.2 PIC Circuit Design The circuit is using PIC 16F877A and interfacing in Proteus.2: Circuit for PIC 16F877A Application and Interfacing 38 .4.

1 List of Component PIC circuit No 1 2 3 4 5 6 7 8 9 10 11 12 13 Component IC 16F877A IC 7805 IC MAX 232 20Mhz Crystal Oscillator Capasitor 470 uF Capasitor 1 uF Capasitor 100 uF Capasitor 8 pF Capasitor 100 nF Resistor 10kΩ Resistor 1.3.2.5kΩ LED Serial Port Connector DB9F Table 3.1: List of Component Quantity 1 1 1 1 1 4 1 2 3 2 4 1 1 39 .2.4.4.

3.2: PCB layout for PIC 16F877A application 3.3.4.2.3 Part List for Switching 3.4.1: Push button diagram 40 .4.1 Push Button Figure 3.2.4.3.4.2 PCB Layout Design Figure 3.

4.3. 41 .1 shows push button criteria. When the push button are depressed.” the switch is disengaged and no electrical power will pass through it.2.3.Figure 3.2 Limit Switch Figure 3.2: Limit Switch A limit switch is used to limit the activation of an electrical circuit. port A0 will receive input „0‟. When push button are on release mode. Whether the limit switch is open or closed is generally determined either by the position of a device being powered or by a set amount of time a device requires completing a specific task. program can be made by refer to the input came from push button. 3. From these criteria.” it allows the flow of electrical current through the switch to pass to the device being powered.4.3. which is „1‟ or „0‟. When the switch is “open. When a circuit is “closed. the receive input at port A0 is „1‟ because of there are current flow at the moment.

there are a few which don't. While most Parallel Ports have internal pull-up resistors. Therefore by incorporating the two 10K external pull up resistors. a light inside home often turns on when one of the doors is opened.4. The switch is activated by physical contact. 42 .3. the circuit is more portable for a wider range of computers.The most common type of limit switch is a mechanical limit switch. Part3 Limit Switch 1 Limit Switch 2 Limit Switch 3 Application “The door 1 is open” “The door 2 is open” “The door 3 is open” Table 3.2: Limit Switch Functional 3. The Control Port is an open collector / open drain output. For example. This switch tracks the location of a specific item and opens or closes when that item reaches a specific location.4.4 LCD The LCD panel's Enable and Register Select is connected to the Control Port. some of which may have no internal pull up resistors. or lack thereof.

It makes no effort to place the Data bus into reverse direction. This will cause no bus conflicts on the data lines. This problem is overcome by inserting known delays into the program.1 Schematic Circuit of the LCD Figure 3. Remember a few de-coupling capacitors. especially if you have trouble with the circuit working properly.4. As a result it cannot read back the LCD's internal Busy Flag which tells us if the LCD has accepted and finished processing the last instruction. into write mode. I can use a bench power supply set to 5v or use a onboard +5 regulator. So. I've left the power supply out.4. The 10k Potentiometer controls the contrast of the LCD panel.4.4. As with all the examples. 3. Nothing fancy here.1(a): Basic LCD program 43 . Therefore it is hard wire the R/W line of the LCD panel.

Figure 3.4.1(a) shown the simulation for basic LCD and the Figure 3. When the program running. 44 .1(b): Simulation in LCD and Virtual Terminal This figure shown the schematic of the LCD based on Simulation.1(b) shown the simulation with AT command.4.4.4. The figure 3. It also shown in Virtual Terminal at RS 232.4.4. the result will dispay in LCD.

5 Software Development The flow chart for the system main program is shown in figure 3. PIC will send the message to handphone according which sensor is activated. When the system is ready.3. The system will continue to check and check again.4.5: Keypad Operation 3. the PIC 16F877A will initialize the modem until the system is ready.00.4. When the system in ON. 45 . This step will repeat since the sensor activated. PIC board will send the SMS to hand phone with message. Then the PIC will check whether the sensor is activated or not. If it activated.5 Keypad Figure 3.

3.5.5: Example of basic program 46 .1 Basic AT Command AT OK AT+CMGF=1 OK AT+CMGS=“phone number”<CR> Message to send <CTRL>&<Z> SEND SMS FROM STORAGE AT+CMSS //test GSM //response // define text format // response //OK //+CMGS: 7 Figure 3.

START Initialize the system System is Ready: GSM.5.2: Programming Flow Chart for the system 47 .based Security System NO Sensor Activated? Password Activated? NO YES Send SMS: The door is OPEN YES Door Open: PASS END Figure 3.3.2 Software Flow Chart The flow chart at Figure show complete program of this project.5.

It support the PIC 10.3. 48 . The CCS create this software is to provide the simplest and most efficient solutions for Microchip PIC® MCU development needs. 3.1 CCS Compiler CCS Compiler is a powerful. These tools of programming are selected based on the chip products that are used during this project. PIC 12 PIC 14.5. feature rich development tool for PIC microchip provide by CCS.5. PIC 24 microcontrollers and dsPIC® DSCs. PIC 16.3. PIC 18. Inc.3 Programming Tool Programming tools are used to implement the task between hardware and software. Your development productivity levels will easily exceed all other compilers available [19]. The CCS Compiler has a generous library of useful routines and ready-to-run example programs for hardware peripherals. this software offers a wide variety of C Embedded Development Tools for Windows or Linux.

and C.3. prized for its efficiency. broad set of the hardware libraries. ANSI compliant compiler. Formatted printf allows easy formatting and display in HEX or decimal. I2C. microC provide a successful match featuring highly advanced IDE. Serial I/O functions allow standard functions such as GETC() and PRINTF() to be used for RS-232 like I/O.5. discrete I/O and precision delays. used in a wide variety of applications. 49 . is the natural choice for developing embedded systems. and plenty of read-to-run examples.1: CCS Compiler for PIC PIC and C programming are fit together well: PIC is the most popular 8-bit chip in the world. comprehensive documentation. CCS Compiler for PIC features are:    Built-in libraries that work with all chips for RS-232 serial I/O.Figure 3.

X10.    Multiple I2C and RS232 ports may be easily defined. Simple functions like READ_ADC() to read a value from A/D converter. Hardware tranceiver used when possible. digital pots. I/O expander and much more. DS2223 and PCF8570. Microcontroller clock speed may be specified in a PRAGMA to permit built-in functions to delay for a given number of microseconds or milliseconds. Dallas touch memory devices.  133 ready-to-run programs included. LTC1298 and PCF8591 A/D converters. but for all other occasions the compiler generates a software serial transceiver. 24xx and 94xx serial EEPROM. CCS Compiler allows quick development and deployment of complex applications: 50 . Compiler directives determine if tri-state registers are refreshed on every I/O or if the I/O is as fast as possible. keypads. temperature sensors. #use rs232() offers options to specify a maximum wait time for getc.     Functions such as INPUT() and OUTPUT_HIGH() properly maintain the tri-state registers. Source code drivers included for LCD modules. DS1302 and NJU6355 real time clocks.

This programmer is ideal for field and general usage. It is designed to program popular Flash PIC MCU. UIC00A offers reliable. On board ICSPTM (In Circuit Serial Programming) connector offers flexible method to load program.3. thus NO external power supply is required. making it a truly portable programmer. This also allow user to quickly program and debug the source code while the target PIC is on the development board. high speed programming and free windows interface software [20].2 UIC00A PIC Programmer Figure 3. hobbyist and students.3. This programmer obtained it power directly from USB connection. It is design with capabilities and features of: 51 .2: UIC00A PIC Programmer UIC00A offer low cost yet reliable and user friendly PIC USB programmer solution for developer. It supports on board programming which eliminate the frustration of plug-in and plug-out PIC MCU.3.5. Since USB port have become a popular and widely used on Laptop and Desktop PC.5. UIC00A is designed to be plug and play with USB connection.

Powers directly from USB port. Every component is soldered properly and programmer is tested before it is shipped to customer. Optional external power to target PIC should be +5V Small size of 5cmx2. 28 pins and 40 pins PIC microcontroller.               USB Plug and Play function IDC box header for ICSP connection. Windows XP compatible software Compatible with Windows Vista Auto load program capability Compatible with Microchip‟s PICkit 2. 52 .5cm. No external power required for UIC00A to function USB 2. an IDC cable is included for external on board programming.  Industrial grade PCB with surface mount component to offer small size yet reliable and quality product.0 Low cost yet reliable solution Suitable for Laptop and Desktop PC Optional socket (UIC-S) to program 18 pins.

3. 4.5.3 Board Layout 1.3. Please connect one end of programming cable to this header. Red LED at “D” is used to indicate busy function such as UIC00A is in program mode or is alerting that a function is in progress. it should ON once USB connection from UIC00A to computer or laptop is ready. 5. Switch at “B” is a push button which may used to initiate the write device function when programmer> write on PICkit button is checked. while the other end to target board.3 Board Layout Figure 3.3. Mini USB port socket “A” is for USB connection to PC desktop or laptop. 53 . Green LED at “C” is used to indicate the main power supply of UIC00A.5. 2. IDC box header at “E” is for programming cable.3.

3. following section illustrates the steps using UIC00A shown at figure 3.4(a): PICkit 2 Programmer Connector Pinout 54 .3.4 PICkit 2 v2. With the help of pictures and some simple instruction.4.5.5. This section gives instruction on how to get started with UIC00A [21]. Figure 3.55 for PIC Compiler PICkit 2 v2.Label A B C D E Function Mini USB port socket Switch to initiate write device programming Main power supply indicator LED (green) Busy indicator LED (red) IDC Box Header for programming connector Table 3.5.5.3.3.3: Board Function 3.55 Compiler is ready to be used with PICkit 2 programming software.

55 .1.3. Figure 3. Launch PICkit 2 programming software by selecting Start> Program> Microchip> PICkit 2.18 below.   The following programming interface appears and notifies that the PICkit 2 and target device found and connected.5. Connect the UIC00A as shown in section 5 (hardware installation).4(b): PICkit Programmer Application  To connect to the target device once the application software is already running.  If device is successfully detected. The programmer is able to automatically detect PIC from connected target and display it in the Device Configuration window. 2. the model name will appeared at “Device Configuration” area. select Device Family as shown in Figure 3.

Now the PIC is ready to use. Go to File and select Import Hex. After Hex file has been successfully imported.5.3. the “VDD target” will automatically be 5.Figure 3. 56 . The operation status will display on the Status Bar and the status bar will turn to GREEN if writing is successful shown as Figure. UIC00A can supply power to the target device. For UIC00A.0. 5. Browse for the Hex file location and open to start import the Hex file. However. user should powered +5V to the target PIC. users are advised to power the target device externally to prevent this programmer exceed from 150mA current unit. The PIC will be erased and programmed with the new Hex code imported.4(c): Select Device Family 3. the target device can be programmed by clicking on Write. 4.

3.4 (f): Select Device Dialog 57 .4(e): Write Error Status Figure 3.4(d): Write Successful Status Figure 3.3.3.5.Figure 3.5.5.

6 Summary In this chapter it shown the methodology process for to hardware development and software development to make the project is successful. The software development more focuses on creates programming software that will transfers or load into PIC microcontroller. Hyperterminal code can be applied to this software for stored data at GSM modem.3. office and residential area. This is for achieving the objective that develop the simple security system at home. C language is to develop the program and system by using CCS Compiler source code. 58 . GSM modem as a medium to send message can be program the source code at CCS Compiler. It shown the step start with program flow chart and design the program using C language and compile into HEX file format and then load into PIC 16F877A by using PICkit 2 software and UIC00A PIC Programmer device to achieve the objective of project effectively. The hardware development more focuses on circuitry that will use according to sensor device and microcontroller.

It shows that the GSM-based Security System was developed. All problems were solved.2 Hardware Result The GSM-based Security System has been successfully implemented.CHAPTER 4 RESULT 4. 4. This chapter also discusses the major problem structured. tests have been carried out to verify the circuit correctly. For hardware construction and interfacing. The figure has shown the hardware that has been development.1 Introduction This chapter discusses the result of the project. 59 .

2 1 5 4 3 Figure 4. 3. Limit Switch / Sensor – activated system 4. LCD – display instruction 2. Controller Unit (in casing) – stored data 5. Keypad – press password and phone number.2(a): Complete Hardware Project 1. GSM Modem (in casing) – receive and send message Home Model – Detect the unknown person at door Figure 4.2 (b): Home Prototype 60 . It also can changed any information related.

I have problem with serial port controller unit using MAX 232 [22]. There are no problem when to construct the limit switch and sensor.4. the system cannot detect the PIR sensor properly even this sensor is function. The solution is to do some modification at the circuit. This serial port is used to communicate with GSM modem. Then pin 1. Female Male Figure 4. So. The main problem on this hardware is the GSM Modem (Wavecom model) cannot be function. Pin 5 of DB 9 connector connect to ground. Pin 14 (T1 out) and pin 13 (R1 in) of MAX232 are connect to pin 2 (Rx) and pin 3 (Tx) of DB9 connector (female).3 Explanation Problem The hardware starts with ON the power supply and all the information display at LCD. it is not working at all.4. Besides. the message cannot be send to user. 61 .3: DB9 and MAX 232 The pin 25 (Transmitter) and pin 26 (Receiver) of PIC are connect to pin 11 (T1 in) and pin 12 (R1 out) of MAX232 respectively. 8 also need be shorted. Mostly.6 of DB9 connector need to shorted each other and pin 7. However.

The step 1 and 2 are make DTR and RTS will be enabled high (10V) for GSM modem.The problem are solving in three step: (1) Short pin 4 and 7 of the DB9 connector and connect to pin 7 of Max 232 IC. This will ensure that the status of PC‟s connector pins match with the controller connector. the PIC and GSM modem can communicate successfully.2: Serial Port Pin After the modification. (2) Connect pin 10 of MAX232 to ground. 62 . (3) Connect pin 8 of MAX232 to VCC through 1K resistor. Pin Number 1 2 3 4 5 6 7 8 9 Description CD – Carrier Detect RXD – Receive Data TXD – Transmit Data DTR – Data Terminal Ready GND – Signal Ground DSR – Data Set Ready RTS – Request To Send CTS – Clear To Send R1 – Ring Indicator Table 4. Step 3 is for (Rx) gate is not left open.

it must do some troubleshooting and checking error. There was a problem when I try to transfer data to Visual Basic for upgrade. Here. Solution: After transfer program into PIC at the controller unit.4. During the simulation. Then the same step is followed by replace the controller unit with GSM modem. 63 . The hardware in Proteus cannot get the result based on programming done. For solving with these three problems. the problem may cause by the main program. the data is connecting to PC and communicate using hyperterminal to verify connection on serial port. So.4 Software Result There was having some problems when do the simulation in Proteus. Problem 1: The GSM Modem cannot detect the data from PIC. the user cannot get the message if the system is activated. there need to do initialize the GSM modem first before can send SMS to handphone/ PC. The result also shows “OK”. The result shows that the connection is “OK”. The system cannot function when it connect with VB. The other problem is. I faced main problem for LCD and keypad. the GSM Modem cannot detect the data from PIC. It is difficult to compare with actual hardware.

Finally. After that. For this solution. I need to study a lot with this program.Problem 2: The PIC cannot process the SMS when received. It must do a lot of reading and study. In my system. Problem 3: The system cannot function in Visual Basic. I found the solution. Solution: This problem is because the GSM cannot be read with PIC data. I just do some program in Visual Basic without do as my system. I will upgrade this system myself and tell the next student to try this application. so the PIC circuit cannot be communicate with larger value. From the reading some information about AT command. Solution: I‟m still new in Visual Basic knowledge. bound rate of GSM is 115200. However. I want to upgrade this system to PC. I changed the GSM modem with lower value that 9600. the data successfully can be sent. I have to find the error in programming. for the future plan. The system is now can function for handphone. 64 . So. there were the problem when transfer data to VB.

Figure 4. The system placed in casing and the application used in home model. The result will show based on picture and explanation. Figure 4.5(a): System before ON The system is already finished by using prototype.5(b):System after ON 65 . there will display and show how the system is function.5 The Result in Fully Function In this part.4.

the LCD were display “ENTER PASSWORD”. When the door is open.System is activated Enter the password System is ON The door is open User get message SYSTEM ON: PRESS # Example password ENTER PASSWORD: 123456 SECURITY: ENABLE Example message WARNING. The limit switch is closed the door. pressed „*‟ to change the LCD with “SECURITY ENABLE”. There is having 3 doors to be detected from the system. Lastly. the GSM will send the message to phone number that entered. The user will get the message “WARNING! Someone is in your home. For adding information. When press „#‟. the LCD will display “PRESS: #. It will send the data to PIC 16F877A for storing. The PIC will send the data to GSM Modem. Door 2 is Open. the user can get message if all three doors is open. It means that. SECURITY OFF”. 66 . Door 3 is Open”. When the password entered is true. the LCD will display “SECURITY DISABLE”. When keypad presses „#‟. Press the „*‟ button. someone in your home. we enter the phone number for sending the message. Door 1 is Open”. the limit switch will be activated. For example. The password must be entered in 6 digits. the system will send the message “Door 1 is Open. Door 1 is Open Figure 4. The system has been activated. the LCD shows “SECURITY ON”. Then. it will show “PHONE NUMBER”.5 (c): The information that display in LCD When the push button ON.

First. The entire core problems have been successful fixed. when user activated this system. the user can activated the password when they want to leave the house. The switching is to ON the sensor. Besides. this system can be development follow the planning. I faced many time of problem when to develop the circuit for each component. After do trying and error. After finished the system. They just press keypad button for activated password. problem happened and action taken. It is take some time to understand properly. However. I was changed the boundrate of GSM with lower value to get the ideal result. 67 . I applied this system for handphone and not to PC. I try to upgrade the system for PC application. The operations for this system have two main functions. I have to study about the communication knowledge besides electronic.4. PIC microcontroller and GSM modem stored data before send message to handphone. For problem solving. the sensor will activate. The information to user‟s handphone received when the sensor detect unknown person. This is important how to troubleshoot any problem existed.6 Summary This chapter show the fully result of the project development. To upgrade the system. The problems faced in both of part that hardware and software. The password can changed for anytime time same goes with the user‟s phone number. it is not enough to learn more about Visual Basic. it will give take advantages for me to know more about the project and operation‟s system. Lastly. The main solution I taken to solve the problem is to trying and error the GSM modem connection between PIC microcontroller and Hyperterminal. This operation including three main hardware that GSM modem. it cannot to be done because of limitation time. Second. It is more effectively for user when they felt not secure with older password setting. For limitation issues are. Second application is. I have to research more how to connect PIC with GSM. PIC microcontroller and switch.

There are some solution needs to discuss about it weakness in this project and how to solve it later. offices or shops as long as they have the handphone or PC.1 Introduction This chapter will discuss the conclusion of the project. this security can be applied at any houses. low-cost PIC Microcontroller and sensor circuit. office and residential area.2 Conclusion In conclusion. it can be claimed that the project of GSM to handphone provide benefits in developing the security system for standard house. 5. The suggestion of further work to upgrade the system is also for this chapter. 68 .CHAPTER 5 CONCLUSION 5. This is used GSM modem as a medium to receive the message from sensor detection. By only power supply 12 V.

we have not yet any security information for them to secure our home. we can see that the technology very rapidly change and develop.3 Suggestion for Further Work This GSM-based Security System has been successfully function and developed with the basic application. It is because in Malaysia. Hopefully. For example this security system can be applied to police station and fire bridget. 5. the application by using program C is very useful for developing program and system optimization. We do not need calling to police when the robber entered our home. this project must have better application in the next stage of research.This system are work effectively in simple function but practical. 69 . there are several suggestions can be continued in my project: i. Lastly. However. this system can be upgrade with new component and application. For example. At present. It means that the user can send the message back after he/she get the message. this project can be commercialized for new application. ii. Instead of security system using GSM modem can apply with several user number phones to send the message in one application. It takes time than we create a system to tell them via GSM system. he can send the message to close the door immediately. Add this project with send and reply message. For future improvement. Then.

iv. Make the system can communicate with the PC by using Visual Basic or Web Server. Add another sensor for the system like smoke sensor. It also can add any sensor that can apply in home security. temperature sensor and burglar alarm system.iii. Upgrade the system with placed the CCTV and recorded the situation in several time. It can inform the user in another place or used for police and fire bridget. the video can send the user for information. v. 70 . After that.

2007. Microchip Technology Inc. the sample of project by using GSM modem http://www. CCS Compiler – View topic.REFERENCE [1] Home Security System. Microcontroller Programming.my/Wafecom/Supreme10. Wireless Alarm System http://www. How to use PIC.html [5] Julio Sanchez.com/forum/view topic. [6] Yashavant P. Problem with PIC16F877A. 2004.com/manual/pic16f877a 71 ..maxtrigger. http://www.html [4] Martin Bates.ccsinfo. Let Us C Fifth Edition.mobitek.microchip. Richard Barnett. http://www.com/ [2] GSM project.shahrulnizam. Embeded C Programming and the Microchip PIC.com.com/piclesson/ PIC 16F877A Manual Datasheet. PIC lesson. CRC Press. http://www. Thomson Delmar Learning. Elsevier 2006. Larry O‟Cull and Sarah Cox. 2004.epemay. Kanetkar. Interfacing PIC Microcontroller: Embeded Design by Interactive Simulation. Kicit. http://www.com/ [3] GSM modem – Wavecom Fastrack Supreme 10.

edaboard.edaboard.com.com [19] CCS Compiler IDE.comfiletech.com /howToUseHyperTerminal. Communication between GSM modem and PIC microcontroller. Liquid Crystal Display Operation and the function.[7] Forum. Datasheet and how it work. http://www. Character Codes (DDRAM) and Character Patterns (CGRAM Data) Initializing the LCD by Instruction http://www.03. Second Edition.com [12] [13] Password Access.htm [10] [11] Wavecom Fabstrack 20 GSM Modem http://www. Elsevier. http://www.com 72 .ch/microchip/datasheets/lcd/lcd_data_sheets. http://www. http://www. [9] How To Use HyperTerminal.pdf http://www.asp. http://www. 2004.my/usr_attachment/SIM300_ATC_V1.pdf [15] LCD Application. Hyperterminal in using for GSM.com/download/etc/keypad. PIC 16F877A with keypad. Relationship between CGRAM Addresses. Custom Customer Service Inc.com/gsm+pic/forum [8] Stuart R.cytron.html [14] [16] LCD. Analog Interfacing Embeded microprocessor: Real World Design.html [17] [18] Keypad.com/thread168002. http://www. Ball PE.electronicengineering.cubloc.ccsinfo. developershome.messaging4education.

http://www. http://www. Bhd.my/datasheet/Programmer/UIC00A_&_UICS_Users_Manual [21] PICkit 2.[20] UIC00A USB ICSP PIC Programmer. Cytron Technologies Sdn.pickit.com.0 Programmer/Debugger User‟s Manual http://www.pctel.cytron.com/ [22] Pctel.ATCommand Guide – MAX 232.com/guide 73 .

APPENDIX A 74 .

75 .

APPENDIX B

76

APPENDIX C

77

78

APPENDIX D 79 .

80 .

Sign up to vote on this title
UsefulNot useful