Sunteți pe pagina 1din 41

TABLE OF CONTENTS

1. 2. 3. 4. 5. 6. 7. 8. 9. SMS Based Security System Objective & Overview Circuit Diagram System Description: Microcontroller Microcontroller Contd.. MAX232A RS232 GSM Modem Subscriber Identity Module (SIM)

10. GSM Security 11. AT Commands 12. Power Supply Design 13. Relay Driving Circuit 14. Serial Communication 15. Software 16. Security Threats 17. SMS Encryption 18. Results & Conclusions

1.1

Introduction

Home security has been a major issue where crime is increasing and everybody wants to take proper measures to prevent intrusion. In addition, there is need to automate home so that the user can take the advantage of technological advancement. This project presents a model that will provide security to their home, office or cabin etc via SMS using GSM technology.

Keeping in view the rapid growth of wireless communication we are inspired to work on this project. The idea behind this project is to meet the upcoming challenges of the modern practical applications of wireless communication and to facilitate our successors with such splendid ideas that should clear their concept about wireless communication and control system.

The applications of SMS/GSM Based security system are quite diverse. There are many real life situations that require control of different devices remotely and to provide security. There will be instances where a wired connection between a remote appliance/device and the control unit might not be feasible due to structural problems. In such cases a wireless connection is a better option.

Basic Idea of our project is to provide GSM Based security even if the owner is away from the restricted areas. For this we adopted wireless mode of transmission using GSM. Beside this there are many

methods of wireless communication but we selected GSM in our project because as compared to other techniques, this is an efficient and cheap solution also, we are much familiar with GSM technology and it is easily available.

This project is designed to provide ubiquitous access to the system for the security using extensive GSM technology for communication purposes andmicrocontroller for device control. The highlights of our system are the long range of communication and password security. The security is provided by sending a message to our access number, controlling and acknowledgement is done through SMS code between our access number and the authenticated user.

This system consists of a GSM modem for sending and receiving the SMS, Intel 89S52 microcontroller which is controlling the entire system, LCD for the display purpose , keypad for entering the password and supporting circuitries like rectifier for ac to dc conversion. It can be installed at any desired location e.g., office (to protect important files and document), banks (to protect cash in locker) etc.

In this system, the authorized person will have the entire control and he will decide which people will be allowed in that restricted area. Those person who can have access to that area, will have a password in advance. If any one wants to enter in that restricted area in the absence of authorized person, then that person will enter the password on the keypad. If the password will be correct, then a message containing the details like name, address and designation etc. of that person will be forwarded to authorized person via GSM Modem. Now the authorized person will send a coded reply to the microcontroller via GSM Modem. Depending upon the response from the authorized person, microcontroller will decide whether to permit or not. If the approval will be positive then the controller will turn on the relay connected to the door and the authenticated user will be in a position to have access to that area else the request will be rejected and the door will not open. The GSM modem provides the communication mechanism between the user and the microcontroller system by means of SMS messages.

The microcontroller is an exiting, challenging, and growing field; it will pervade industry for decades to come. To meet the challenges of this growing technology, we will have to conversant with the programmable aspect of the microcontroller. Programming is a process of problem solving and communicating in a strange language of mnemonics. The projects could be developed significantly faster and much easily using a microcontroller.

The purpose of this project is to implement the various concepts of microcontroller and embedded designing environment. An embedded microcontroller is a chip which has a computer processor with all its support functions (clock & reset), memory (both program and data), and I/O (including bus interface)

built into the device. These built in functions minimize the need for external circuits and devices to be designed in the final application.

This Project is a very good example of embedded system as all its operations are controlled by intelligent software inside the microcontroller.

The aim of this project is to provide security to the restricted area even if the owner is anywhere in the world. For this purpose user can use any type of Mobile. This way it overcomes the limited range of infrared and radio remote controls.

Short Message Service (SMS) is defined as a text-based service that enables up to 160 characters to be sent from one mobile phone to another. In a similar vein to email, messages are stored and forwarded at an SMS centre, allowing messages to be retrieved later if you are not immediately available to receive them. Unlike voice calls, SMS messages travel over the mobile networks low-speed control channel.

"Texting", as its also known, is a fast and convenient way of communicating. In fact, SMS has taken on a life of its own, spawning a whole new shorthand language thats rapidly being adopted as the norm.

Technology Used: As microcontrollers are the core of the todays digital circuit design in industry, this system uses it for the centralized operation and digital processing. The technology used here is embedded technology which is the future of todays modern electronics.

Here we have used a very high speed Microcontroller i.e. 89S52. This runs on 6-clk cycle period instead of 12-clk cycle. This makes the communication rate faster at 115200kbps. Since we are using F-Bus protocol with the mobile, a full duplex communication with the above baud rate is required.

Features:
The following are the prominent features of SMS based security system Can provide security to 8-devices, User-programmable plain text message control, Communicate from any other mobile, Password protected, Can be controlled from anywhere, anytime, In-system programmable i.e. we can modify the code of the Controller at anytime depending upon our requirement without taking out the controller from the board.

What contributions would the project make? If this system is installed in an office cabin where all important files (share paper, tender files or other files) are kept and the owner is in away from the place (e.g., London) attending a meeting and at the same day he is supposed to submit a tender. In this case he can allow any of his trustworthy employees and get the work done. In this way he will be saved from the bearing a heavy loss. This system can be used for home automation too with desired changes in the program and by some additional hardware. If you need to turn pumps, lights etc. on remotely or need to remotely monitor equipment alarms then this project is for you. There are thousands of uses, like turning on remote pumps, lights, monitoring cool room temperatures, open doors etc.

1.2

Objectives

The main objectives behind this project are as follows: To provide security to the restricted area from a remote place. To make the system much more user friendly.

1.3

Development Stages & Process

The complete development of this system can be divided into the following stages 1.3.2 Problem definition stage This is the very first stage to develop any project. It actually defines the aim and the concept of the project. The aim of Remote Process Control Using Mobile Phone is to design a top class access control system that can be controlled from anywhere in the world. Problem definition stage Designing block diagram Implementing circuits and components Developing flowchart for software Writing actual code for Microcontroller Compiling the code Burning the hex file into microcontroller with programmer Testing Running Documentation

1.3.2

Designing block diagram

At this stage we have categorized the whole system into different individual modules. These modules (block diagrams) will be helpful in understanding the concept and working of the integrated system.

1.3.3

Implementing circuits and components

This is the actual implementation of circuit of each block. At this stage we have actually designed each block separately and finally integrated them into the complete working system.

1.3.4

Developing Flowchart for software

To get the logical flow of the software, the development of flowchart is having a prominent role. So that we have analyzed the complete system and organized the flowchart in such a manner that one can understand the complete working of the software.

1.3.5

Writing actual code for Microcontroller

After the development of the algorithm and flowchart we have actually translated them in C language for P89S52 Microcontroller so that it can understand the instructions and run as per our requirement. The instructions are in ANSI C Language.

1.3.6

Compiling the code

The hand written code on paper was then transferred into computer. For that we have used Keil preinstall on PC. The Keil is a Computer Aided Program to simulate the working of Microcontroller in real time without burning the software into actual IC. We simulated and compiled our program for error checking. After removing several compiling errors the program was converted into machine language i.e. Intel hex format.

1.3.7

Burning the hex file into microcontroller with Programmer

In this stage the compiled hex format file was downloaded or burned into Philips P89S51 flash Microcontroller. This was done by using the Philips in-system programming software provided by the manufacturer itself.

1.3.8

Testing

This time we tested our project for actual working, after loading the software into the microcontroller. Any errors found were removed successfully.

1.3.9

Running

This is the last and final stage of development of our project. In this stage a user flowchart was made so that any one can use this system without any difficulty.

1.4

Specifications Power supply : 0-9V,0.5A Input : 230V,50Hz AC supply Output : Four potential free outputs (i.e. relay output) Operating temp range : 0 to70C Maximum 5 Amp load can be sensed. Display indication : 16*2 alpha numeric LCD Size : 1 foot * foot. Weight : 800 Gms GSM Technology

1.5 1.5.1

Technical Specifications

Microcontroller (89S52) 89S52 Central Processing Unit On-chip Flash Program Memory with In-System Programming In-System Programming(ISP) and In-Application Programming (IAP) capability Boot ROM contains low level Flash programming routines for downloading via the UART 6/12 clocks per machine cycle operation (standard/optional) Speed up to 20 MHz with 6 clock cycles per machine cycle (40 MHz equivalent performance); up to 33 MHz with 12 clocks per machine cycle

RAM expandable externally to 64 kB 4 level priority interrupt 8 interrupt sources Four 8-bit I/O ports Full-duplex enhanced UART(Framing error detection & Automatic address recognition) Power control modes( idle & power down mode) Programmable clock out Asynchronous port reset

1.5.2

Relay 12V sugar cube relay. Relay coil resistance: 60 ohm Relay current resistance: 40mA

1.5.3

MAX 232A Operate from Single +5V Power Supply. Low-Power Receive Mode in Shutdown. Meet All EIA/TIA-232E and V.28 Specifications. Multiple Drivers and Receivers. 3-State Driver and Receiver Outputs.

1.5.5

REGULATOR ICs (7805) . Input voltage: . Output voltage: 10V 5V

Circuit Diagram:

CHAPTER 2 SYSTEM DESCRIPTION 2.1 Block Diagram

2.2

Microcontroller

Refer Microcontroller Tutorial

2.2.3

Microcontroller (89S52) ATMEL 89S52 is the heart of the circuit. This device is a Single-Chip 8-Bit Microcontroller manufactured is a derivative of the 80S52 microcontroller family.

The device has four 8-bit I/O ports, three 16-bit timer/event counters, a multi-source, four-priority-level, nested interrupt structure, an enhanced UART and on-chip oscillator and timing circuits.

The 89S52 device contains a non-volatile 4kB Flash program memory that is both parallel programmable and serial In-System and In-Application Programmable. In-

System Programming (ISP) allows the user to download new code while the microcontroller sits in the application. In-Application Programming (IAP) help the microcontroller to fetch new program code and reprograms itself while in the system. This allows for remote programming over a modem link. The instruction set is 100% compatible with the 80S52 instruction set.

A default serial loader (boot loader) program in ROM allows serial In-System programming of the Flash memory via the UART without the need for a loader in the Flash code. For In-Application Programming, the user program erases and reprograms the Flash memory by use of standard routines contained in ROM. This device executes one machine cycle in 6 clock cycles, hence providing twice the speed of a conventional 80S52.

2.2.4

Pin Diagram

Pin Diagram of 89S52 is as shown below:

Pin Description: VCC - Supply voltage. GND - Ground. Port 0

Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. Whens 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pull-ups are required during program verification.

Port 1 Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and verification.

Port 2 Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and

during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.

Port 3 Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source Current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89S51 as listed below:

Table 2.1: Functions of AT89S52 served by Port 3 Port Pin P 3.0 P 3.1 P 3.2 Alternate Functions RxD (Serial Input Port) TxD (Serial Output Port)
INT0

(External Interrupt 0)

P 3.3

INT1

(External Interrupt 1)

P 3.4 P 3.5 P 3.6


WR

T0 (Timer 0 External Input) T1 (Timer 1 External Input)

(External Data Memory Write Strobe)

P 3.7

RD

(External Data Memory Read Strobe)

Port

also

receive

some

control

signals

for

Flash

programming

and

verification. RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during

Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN Program Store Enable is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2

Output from the inverting oscillator amplifier. 2.3 IC MAX 232A For serial communication, MAX232A is used. This IC is basically a voltage level converter. Since RS232 is not compatible with microcontroller, we need a line driver (voltage converter) to convert the RS232s signal to TTL voltage levels that will be acceptable to the 89S51s TxD and RxD. It receives the data stream and sends it through RS232 cable.

The MAX232 is a dual driver / receiver that include a capacitive voltage generator to supply TIA/EIA-232-F voltage levels from a single 5-v supply. Each receiver converts TIA/EIA-232-F inputs to 5-V-TTL/CMOS levels. These receivers have a typical threshold of 1.3V, a typical hysteresis of 0.5 V and can accept 30V inputs. Each driver converts TTL/CMOS input levels into TIA/EIA-232-F levels. The driver, receiver, and voltagegenerator functions are available as cells in the Texas Instruments LinASIC library.

The MAX232 was the first IC which in one package contains the necessary drivers (two) and receivers (also two), to adapt the RS-232 signal voltage levels to TTL logic. It became popular, because it just needs one voltage (+5V) and generates the necessary RS-232 voltage levels (approx. -10V and +10V) internally. This greatly simplified the design of circuitry. The MAX232 has a successor, the MAX232A. It should be noted that the MAX232 (A) is just a driver/receiver. It does not generate the necessary RS-232 sequence of marks and spaces with the right timing, it does not decode the RS-232 signal, it does not provide a serial/parallel conversion. All it does is to convert signal voltage levels. Generating serial data with the right timing and decoding serial data has to be done by additional circuitry.

The original manufacturer offers a large series of similar ICs, with different numbers of receivers and drivers, voltages, built-in or external capacitors, etc. E.g. The MAX232 and MAX232A need external capacitors for the internal voltage pump, while the MAX233 has these capacitors built-in.

2.3.1

Features Operates from a single 5V power supply with 1.0F c harge pump capacitors. Operates up to 120kbit/s. Two Drivers and two Receivers. 30V input levels.

Meets or Exceeds TIA/EIA-232-F and ITU Recommendation V.28 2.4 RS 232 RS232 serial communication uses fixed voltage values and generally allows you to connect to only one device such as controller. These fixed state signals are more easily affected by noise and distance problems than are the differential signals of RS485 serial communication, but with appropriate cabling, you can run a cable 10 feet or more. Our RS 232 interface also includes a protocol capability so that information can be sent to and received from the attached device.

Almost all digital devices which we use require either TTL or CMOS logic levels. Therefore the first step to connecting a device to the RS-232 port is to transform the RS-232 levels back into 0 and 5 Volts. As we have already covered, this is done by RS232 Level Converters. Two common RS-232 Level Converters are the 1488 RS-232 Driver and the 1489 RS-232 Receiver. Each package contains 4 inverters of the one type, either Drivers or Receivers. The driver requires two supply rails, +7.5 to +15v and -7.5 to -15v. As you could imagine this may pose a problem in many instances where only a single supply of +5V is present. However the advantages of these IC's are they are cheap.

2.5

GSM Modem

The GSM modem is slightly different from the conventional modem. This utilizes the GSM standard for cellular technology. Here, one end being a wired connection, receives and transmits data. The other end is connected to a RF antenna. The GSM modem acts like a cellular phone and transmits text and voice data. It communicates with the GSM network via the SIM (Subscribers Identity Module) card.

The Global System for Mobile Communications (GSM: originally from Groupe Spcial Mobile) is the most popular standard for mobile phones in the world. GSM service is used by over 2 billion people across more than 212 countries and territories. The ubiquity of the GSM standard makes international roaming very common between mobile phone operators, enabling subscribers to use their phones in many parts of the world. GSM differs significantly from its predecessors in that both signaling and speech channels are Digital call quality, which means that it is considered a second generation (2G) mobile phone system. This fact has also meant that data communication was built into the system from the 3rd Generation Partnership Project (3GPP).

From the point of view of the consumers, the key advantage of GSM systems has been higher digital voice quality and low cost alternatives to making calls such as text messaging. The advantage for network operators has been the ability to deploy equipment from different vendors because the open standard allows easy interoperability. Like other cellular standards GSM allows network operators to offer roaming

services which mean subscribers can use their phones all over the world.As the GSM standard continued to develop, it retained backward compatibility with the original GSM phones; for example, packet data capabilities were added in the Release '97 version of the standard, by means of GPRS. Higher speed data transmission has also been introduced withEDGE in the Release '99 version of the standard.

It is used as a medium for transmitting and receiving SMS. An SMS from the user contains the information of actions to be performed. At controller-side the modem receives the SMS, sends it to the microcontroller through RS232 cable and then the microcontroller executes the required actions.

2.5.1

Subscriber Identity Module (SIM)

One of the key features of GSM is the Subscriber Identity Module (SIM), commonly known as a SIM card. The SIM is a detachable smart card containing the user's subscription information and phonebook. This allows the user to retain his or her information after switching handsets. Alternatively, the user can also change operators while retaining the handset simply by changing the SIM. Some operators will block this by allowing the phone to use only a single SIM, or only a SIM issued by them; this practice is known as SIM locking, and is illegal in some countries.

In the United States, Canada, Europe and Australia, many operators lock the mobiles they sell. This is done because the price of the mobile phone is typically subsidized with

revenue from subscriptions and operators want to try to avoid subsidizing competitor's mobiles. A subscriber can usually contact the provider to remove the lock for a fee, utilize private services to remove the lock, or make use of ample software and websites available on the Internet to unlock the handset themselves. While most web sites offer the unlocking for a fee, some do it for free. The locking applies to the handset, identified by its International Mobile Equipment Identity (IMEI) number, not to the account (which is identified by the SIM card). It is always possible to switch to another (non-locked) handset if such other handset is available.

Some providers will unlock the phone for free if the customer has held an account for a certain period. Third party unlocking services exist that are often quicker and lower cost than that of the operator. In most countries removing the lock is legal. Cingular and TMobile provide free unlock services to their customers after 3 months of subscription.

In countries like India, Pakistan, Indonesia, Belgium, etc., all phones are sold unlocked. However, in Belgium, it is unlawful for operators there to offer any form of subsidy on the phone's price.

2.5.2

GSM Security

GSM was designed with a moderate level of security. The system was designed to authenticate the subscriber using shared-secret cryptography. Communications between the subscriber and the base station can be encrypted. The development of UMTS introduces an optional USIM, that uses a longer authentication key to give greater security, as well as mutually authenticating the network and the user - whereas GSM only authenticated the user to the network (and not vice versa). The security model therefore offers confidentiality and authentication, but limited authorization capabilities, and no non-repudiation.

GSM uses several cryptographic algorithms for security. The A5/1 and A5/2 stream ciphers are used for ensuring over-the-air voice privacy. A5/1 was developed first and is used in other countries. A large security advantage of GSM over earlier systems is that the Key, the crypto variable stored on the SIM card that is the key to any GSM ciphering algorithm, is never sent over the air interface. Serious weaknesses have been found in both algorithms, and it is possible to break A5/2 in real-time in a cipher text-only attack. The system supports multiple algorithms so operators may replace that cipher with a stronger one.

2.5.3

Advantages of GSM

1. GSM uses radio frequency efficiently. 2. It tolerates inter-cell disturbances.

3. Quality of speech is better than in analog phones. 4. It supports Data Transmission. 5. It allows the data to be encrypted i.e. data is secure. 6. It also supports new services such as ISDN. 7. It provider services such as national roaming and international roaming. 8. Telephony. 9. Distinction between user and device identification. 10. Asynchronous and synchronous data services. 11. Access to packet data network (X.25). 12. Telematic services (SMS, fax, videotext, etc.). 13. Many value added features (call forwarding, caller ID, voice mailbox). 14. E-mail and Internet connections.

2.6

AT Commands

The AT commands are used to control the operation of the modem. They are called AT commands because the characters AT must precede each command to get the ATtention of the modem.

AT commands can be issued only when the modem is in command mode or online command mode. The modem is in command mode whenever it is not connected to another modem. The modem is in data mode whenever it is connected to another

modem and ready to exchange data. Online command mode is a temporary state in which one can issue commands to the modem while connected to another modem.

Table 2.2: SMS Commands Command AT+CREG AT+CSQ AT+CMGR AT+CMGS AT+CMGD AT+CMGL AT+CSCA

Description Network Registration Signal Quality Read message Send message Delete message List message Service center address

2.7

Power Supply Design

We need a constant low voltage regulated power supply of +5V, providing input voltages to the microcontroller P89C51RD2, RS232, LM311 and LCD display which requires 5 volts supply.

2.7.1

Selection of Transformer

The step down transformer of 0-9 volts is used to step down the AC line voltage of 220 volts to 9 volts. We select the transformer of 0-9 volts considering the reduction due to various losses.

Output of transformer = 9 Volt, 500 mA Therefore total current flowing through the circuit V1 / V2 = N1 / N2 = I2 / I1 Here, I1 = 2 A

I2 = 500 mA V1 = 230 Volts V2 = 9 Volts Therefore, 230 / 9 = N1 / 50

N1 = (230 * 50) / 9 N1 = 1277 Turns.

2.7.2

Selection of Diodes

The step down 9 volts AC is converted to DC voltage using a 4 diodes bridge rectifier circuit. 1N4007 rectifier diodes have been used. These diodes have a voltage drop of 0.9 volts across them and maximum rating 5 V/ 1 A. It also gives better rectified output compared to other rectifier diodes.

Input to bridge rectifier is 9V. So, we get 9?2 = 12.72 V and 600mA at the output.

2.7.3

Selection of Capacitor

Capacitors are used as a filtering component. They filter out the AC ripple present in the output of full wave rectifier. We use standard electrolytic capacitors of rating 100F/25V and 1000 F/25V for this purpose.

We require 1 F for 1 mA, Therefore, for 500mA we will require 500 F. Hence we use 1000 F (standard) filter capacitor an d 100 F (standard) ripple capacitors.

2.7.4

Low Voltage regulator IC 7805

Since we require a constant 5 V DC supply voltage for the entire circuitry, we have to regulate the output from the bridge rectifier circuit. Voltage regulator IC 7805 is used for this purpose to obtain a constant regulated output voltage. It gives +5 V regulated output.

2.7.4.1 Features Output current up to 1A. Output voltage of 5, 6, 8, 9, 10, 12, 15, 18, 24V. Thermal overload protection. Short circuit protection. Output transistor safe operating area protection.

The MC78XX/LM78XX/MC78XXA SERIES OF THREE TERMINAL positive regulators are available in the TO-220/D-PAK package and with several fixed output voltages,

making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltage and currents. 2.8 Relay Driving Circuit There are four relays in our circuit which are used for device control .i.e. to turn ON or OFF the devices. Figure below shows connection between a single relay and microcontroller.

We are using 12V sugar cube relay for changing the state of the devices. Current at the base of transistor is approximately 5V. And drop is 0.7 V and current is 2mA. So the resistor value of the relay driver can be calculated as, I = (V voltage drop) / R Therefore, = 4.3 / (2*10-3) = 2.15*103 ohm = 2.2 Kohm (std.) 2.2 Kohm is known as the base limiting resistor. To drive the relay we use BC547 general purpose switching transistor. It requires small (2mA) base drive voltage and has a high gain (50 to 100). Hence it is preferred over TIPs. Serial Communication R = (5-0.7)/ (2*10-3)

To allow compatibility among data communication equipment made by various manufactures, an interfacing standard called RS232 is used. Since RS232 is not compatible with microcontroller, we need a line driver (voltage converter) to convert the

RS232s signal to TTL voltage levels that will be acceptable to the 89S51s TxD and RxD. Another advantage is that with a single +5 V power source we can power both the microcontroller ant MAX232, with no need for the dual power supplies.

The MAX232 has two sets of line drivers for transferring and receiving data. MAX232 requires four capacitors of range 0.1 F. Th e 0.1 F disc capacitors are used for charge storing and are known as charge pump capacitors or decoupling capacitors. When TTL output is 5 V ten the output of MAX232 is -10v & when 0 V its output is +10V.

Serial communication is a very common protocol for device communication that is standard on almost every PC. Most computers include two RS232 based serial ports

.the serial port sends and receive bytes of information one bit at a time .although this is a slower than parallel communication which allows the transmission of entire byte at once it is simpler and can be used over longer distances. Typically, serial communication is used to transmit ASII data. Communication is completed using three transmission lines. 1. 2. 3. Ground Transmit Receive

Since serial communication is asynchronous the port is available to transmit data on one line while receiving data on another line. The important serial characteristics are baud rate, data bits, stop bits and parity. For two ports to communicate these parameters should match.

2.10

LCD Interfacing

Refer LCD interfacing with 8051 CHAPTER 3 SOFTWARE 3.1 1. 2. 3. 4. 5. Start Initialize the microcontroller. Initialize the GSM modem. Initialize the LCD display and Keypad. Check if response is given from modem, if yes then ENETR PASSWORD, else GSM modem is faulty and replace it. 6. 7. Check the validity of password If password is correct then send message to the authorized person, else ask to enter the correct password. 8. 9. 10. Wait for the response from the authorized person. If the response is positive then open the door otherwise keep it closed. Return. Algorithm

3.2

Flowchart

CHAPTER 4 SMS-BASED SECURITY THREATS 4.1 SMS Security Threat

SMS or Short Message Services have quickly become an integral part of our life. SMS are nowadays used by anyone and for almost anything (servers sending SNMP alerts, banks sending info on account transaction, simple conversation...). Now that we have started taking steps to make email secure and encrypted, it's also high time that we realized that Sniffing (capturing) or Spoofing (forging) SMSs is even simpler than Sniffing and Spoofing emails. In this story we will try to identify the threats to the SMS world.

4.2

How Real is SMS Spoofing

It is very real. All we require is a PDA which runs Palm OS. Yes, we know Palm has stopped shipping PalmO, so somebody with an old Palm PDA would be able to do spoofing. All it should have is the capability of spoofing SMS over an IR link. The next thing that's require is a GSM phone with IR and modem support.

Now all you have to do is download freely available opensource software called SMSSpoof from http://freshmeat.net/projects/smsspoof/. Once you have downloaded it, unzip and install the .prc file into your PDA using HotSync or whatever way you would like to install.

Start the application after you've installed it. You will be asked to fill in: the number of Spoofed senders, number of recipients, actual message, and the number of an SMS Center or SMSC which supports EMI/UCP-compatible. This capability is nothing but the capability of sending SMS over GSM dialup. Now here's the good news: none of the SMSC in India today have this vulnerable capability.

We tried sending Spoofed SMSs from multiple SMSCs of Vodafone, Airtel, and BPL but none worked. Now the bad news: you can use any SMSC across the globe which supports EMI/UCP for sending spoofed SMSs.

The method which we just mentioned to send Spoofed SMS looks pretty geeky and you will require quite a few things to be able to do so. There are many websites on the Internet which let you send spoofed SMS without the need of any technical knowhow. We won't of course delve into the details of such sites, because that's not the intent. What we want to tell you is that sending spoofed SMSs is easier than spoofing emails, and could become a potential security threat in the future, so you need to be more careful. In the remaining article, we'll focus on how to protect yourself against SMS based security threats.

4.3

Prevention: SMS Encryption

Till date there is no system that can protect you against Spoofed SMS and tell you whether the SMS you are receiving is from a legitimate sender or not. So to protect against such threats the only solution is to use SMS encryption. There are quite a few apps available for quite a few smart phones. A simple Google search with keywords such as 'SMS + encryption + your-phone-vendor-name'can give you a list of apps which you can use to encrypt SMS.

But the drawback with such systems is that both ends (the sender and the receiver of the SMS) should have the same software running to encrypt and decrypt the SMS, which also means that both should have a similar phone or phones which support the same application.

So you can't actually send a standard encrypted SMS which can be decrypted on any or all phone models. Some well-known software for SMS encryption for different smart phones are as follows:

4.3.1 SMSProtector: http://www.mobile-mir.com/en/SmsProtector.php

4.3.2MumSMS: http://mysymbian.com/7650/applications/applications.php?fldAuto=940&faq=2

4.3.3 Fortress SMS: http://my-ymbian.com/7650/applications/applications.php? fldAuto=503&faq=2

4.4

Prevention: SMS Spam filter

The next most important application that one would like to install first on his/her mobile is a SMSSpam filter. Well, these SPAMFilters are not so sophisticated and can only work in a few ways such as, like defining a list of numbers you want to ban or create a white list of numbers you want to allow. The latter will allow all numbers in your phone book. The third form of filter is word or phrase blocking, where you can define a few keywords which if found in the SMS will be blocked and sent to vault. We are yet to see SMSSpam filters that can use a global black or white list and content filter.

CHAPTER 5 RESULT The below table shows sequence of operations performed. Firstly, when the system kit is turned ON, messages are displayed on the LCD WELCOME TO SMS BASED SECURITY After that the password is typed by the user wishing to access the security area. If the password is correct then a message containing password along with his details is sent to the owner.

When the owner receives message along with the details of the person who wants to enter the office or the restricted area, then the owner will reply in a coded manner, if reply is positive, the door will open otherwise remains closed.

When the device is turned ON the system acknowledges the user about the status of the device. Table 5.1: Result OPERATIONS SYSTEM KIT TURNED ON

MESSAGE SENT BY SYSTEM

OUTPUT MESSAGE DISPLAYED ON LCD 1. WELCOME TO SMS SECURITY 2. SIM REGISTRATION STATUS 3. SIGNAL QUALITY 4.INITIALIZATION OF LCD 5.INTIALIZATION OF KEYPAD 6.ENTER PASSWORD DETAILS OF THE REQUESTING USER APPROVAL REJECTION REQUEST OR OF

REPLY OF THE OWNER

CHAPTER 6
CONCLUSION Hence, from the above result we conclude that this is the one of the best option for the security purpose. Since all the component or device which we are using in our project is very easily available and affordable to common people, and using the current resources of communication system, this model is developed. Hence, this makes it very attractive and also very efficient in operation and cost effective, so that a common people can easily afford it and very easy in operation also.

S-ar putea să vă placă și