GPS based Vehicle Tracking System Front Pages -...

55
i GPS based Vehicle Tracking System A project submitted in partial fulfilment of the requirement for the degree of Bachelor of Engineering (Electronics & Telecommunication) from Shri G.S Institute of Technology & Science, Indore Submitted by Guided by Amit Goyal (Enroll no: 0801EC081010) Prof.Anurag Srivastava Nirvesh Shakya(Enroll no:0801EC081050) Prof. Jaya Deeptilal Praveen Rathor(Enroll no:0801EC081055) Vinod Kurmi (Enroll no:0801EC081085) Electronics and Telecommunication Department SHRI G.S.INSTITUTE OF TECHNOLOGY & SCIENCE, INDORE Year 2011‐12

Transcript of GPS based Vehicle Tracking System Front Pages -...

i

i

GPS based Vehicle Tracking System

A project submitted in partial fulfilment of the requirement

for the degree of Bachelor of Engineering

(Electronics & Telecommunication) from

Shri G.S Institute of Technology & Science, Indore

Submitted by Guided by

Amit Goyal (Enroll no: 0801EC081010) Prof.Anurag Srivastava

Nirvesh Shakya(Enroll no:0801EC081050) Prof. Jaya Deeptilal

Praveen Rathor(Enroll no:0801EC081055)

Vinod Kurmi (Enroll no:0801EC081085)

Electronics and Telecommunication Department

SHRI G.S.INSTITUTE OF TECHNOLOGY & SCIENCE, INDORE

Year 2011‐12

ii

SHRI G.S.INSTITUTE OF TECHNOLOGY & SCIENCE

INDORE

CERTIFICATE

This is to certify that the project work “GPS Based Vehicle Tracking System”

submitted by “Amit Goyal, Nirvesh shakya, Praveen rathor , Vinod kurmi”, is

hereby approved as credible work carried out at this institute during the period July 2011

to May 2012 under our guidance and supervision.

Signature Internal Examiner

iii

Acknowledgement

It is a great pleasure to acknowledge our project guide Prof. Anurag Shrivastava,

Electronics & Telecommunication Department, SGSITS‐Indore,for his valuable guidance

and support throughout our work.

We are highly grateful to our teachers Prof. Jaya Deeptilal , Electronics &

Telecommunication Department, SGSITS‐Indore, and Prof. Amit Naik, Electronics &

Telecommunication Department, SGSITS‐Indore, for their constant help, encouragement

and valuable suggestions during the course of the project work, which has improved our

practical knowledge in the field.

We are highly thankful to Prof. (Mrs). S.V Charahate, Head, Electronics &

Telecommunication Department, SGSITS‐Indore, and Prof. (Dr.) Prakash Dattatraya

Vyavahare, Electronics & Telecommunication Department, SGSITS, Indore, for providing

valuable suggestion and encouragements.

We are also thankful to Dr. S. S. Bhadauriya , Director, SGSITS‐Indore,for providing

us an opportunity to work at this institute.

Last but not least, we are indebted to our class mates and our family for direct and

indirect helps and encouragements for executing this project work.

Name of the project members:

Amit Goyal (Enroll No: 0801EC081010)

Nirvesh Shakya (Enroll No:0801EC081050)

Praveen rathor (Enroll No:0801EC081055)

Vinod kurmi (Enroll No: 0801EC081085)

iv

Recently, there has been increasing interest within the potential user community of

Global Positioning System (GPS) for high precision navigation problems such as aircraft non

recision approach, river and harbor navigation, real‐time or kinematic surveying. In view of

more and more GPS applications, the reliability of GPS is at this issue.

The Global Positioning System (GPS) is a space‐based radio navigation system that

provides consistent positioning, navigation, and timing services to civilian users on a

continuous worldwide basis. The GPS system receiver provides exact location and time

information for an unlimited number of users in all weather, day and night, anywhere in the

world.

The work in this project will mainly focus on the demonstration of these

technologies for the vehicle tracking application. The project consists of a base station set‐

up and a mobile station. Base stations include a mobile phone interfaced to a personal

computer . The mobile station includes a GPS module and a GSM modem. GPS provides the

position information and GSM modem transmit this data to the base station. The base

station operator can request to the mobile station for the position information

through SMS. The return SMS received from the mobile station contains the position

information, so that the base station software can indicate the current

location of the mobile station by a flag on the Google map.

Abstract

v

List of Figures

1.1 Satellite positions ............................................................................................... 03

1.2 Position determination with two satellites (in a 2‐D world) .............................. 06

1.3 2D position determinations with 2 satellites and clock error .............................. 07

1.4 2D position determinations with 3 satellites and corrected clock error ............ 08

1.5 Latitude and Longitude ...................................................................................... 11

1.6 GSM Structure .................................................................................................... 18

1.7 Typical Mobile phone SIM card .......................................................................... 18

2.1 Set‐up at base station ......................................................................................... 22

2.2 Block diagram of on board unit .......................................................................... 22

3.1 Circuit diagram of On‐board unit ....................................................................... 25

4.1 GPS Receiver module ......................................................................................... 28

4.2 GSM Modem module or mobile phone.............................................................. 30

4.4 Pin diagram of AT89C51 ..................................................................................... 33

5.1 PC Front panel View ........................................................................................... 36

5.2 Flow chart of base station software ................................................................... 37

5.3 Flow chart of on‐board mobile station software ............................................... 38

vi

List of Tables

4.1 Pin details of GPS module........................................................................................ 30

vii

Table of Contents

Cover page ..................................................................................................................... i

Statement of submission .............................................................................................. ii

Certificate ...................................................................................................................... iii

Acknowledgement ........................................................................................................ iv

Abstract ......................................................................................................................... v

List of Figures ................................................................................................................. vi

List of Tables .................................................................................................................. vii

Table of Contents ........................................................................................................... viii

Chapter 1 –Introduction ................................................................................................ 01

1.1 Introduction ……………………………………………………….......................................…………. 02

1.2 Vehicle Tracking Concept ………………........................................……………………………. 02

1.3 Benefit of Vehicle Tracking ..………………………………………......................................… 02

1.4 Global Positioning System (GPS) ……………………………………..........................………… 03

1.4.1 Basic concepts of GPS ………………………………...................................…….... 03

1.4.2 GPS satellite orbit …………………………………………...................................….. 04

1.4.3 Position determination with GPS …………………………................................. 05

1.4.4 Transmitted GPS signal ……………………………………….................................. 09

1.4.5 Latitude & Longitude information…………………………................................ 11

1.5 Global System for Mobile Communication (GSM) …………………………...................... 12

1.5.1 GSM Services ............................................................................................ 13

1.5.2 GSM Carrier frequencies .......................................................................... 15

1.5.3 Frequency band and channel arrangement ............................................. 16

1.5.4 The structure of a GSM network .............................................................. 17

1.5.5 Subscriber Identity Module (SIM) ............................................................ 18

1.5.6 GSM Modem ............................................................................................ 19

Chapter 2 ‐ Block Diagram and Description ……………………………………........................... 21

2.1 Block diagram ……………………………………………………………........................................... 22

2.2 Description ………………………………………………………………….......................................... 22

8

Chapter 3 ‐ Circuit Diagram and Description …………………………………............................. 24

3.1 Circuit diagram …………………………………………………………............................................ 25

3.2 Description………………………………………………………………............................................. 26

Chapter 4 ‐ Hardware Descriptions ……………………………………………............................... 27

4.1 GPS Receiver module ……………………………………………................................................ 28

4.1.1 GPS Antenna ............................................................................................. 29

4.1.2 Features ……………………………………………………….......................................... 29

4.1.3 Pin Details ………………………………………………………........................................ 30

4.2 GSM Modem module or Mobile phone …………….................................................... 30

4.2.1 Nokia 6070 specification…………………………………………………………………………. ………………………………………………………………..................................

31

4.3 Microcontroller …………………………………………………………............................................ 31

4.3.1 Main Features of AT89C51 ………………………………….................................... 32

4.3.2 Pin Details ………………………………….............................................................. 33

4.4 Relay……………………………………………………………………………………………………………………… 34

Chapter 5 ‐ Software and Flowchart …………………………………………… .............................. 35

5.1 Base station Software …………………………………………………......................................... 36

5.1.1 Introduction to Visual basic …………………………………………………….................. 36

5.1.2 Flowchart ………………………………………………………........................................ 37

5.2 Microcontroller development ………………………………………........................................ 37

5.2.1 Keil Microvision 8051 Cross compiler ……………………................................. 37

5.2.2 Flow chart …………………………………………………….......................................... 38

Chapter 6 – Result and Future work ……………………………................................................ 39

6.1 Result ........................................................................................................................ 40

6.2 Future work ............................................................................................................... 40

9

i

References ………………………………………………………………………….......................................... 41

Appendices ..................................................................................................................... 42

Appendix A – Data Sheets .............................................................................................. 43

A‐1 P89C668 Micro‐controller ........................................................................... 46

A‐2 MAX232 Dual EIA‐232 Drivers/Receivers .................................................... 51

A ‐ 3 1 6 x 2 L C D D i s p l a y … … … … … … … … … … … … … … … … … … … … … … … . 55

A-4 7805 Regulator ic……………………………………………………………………………………….

56

Appendix B – C Source code for Micro‐controller .......................................................... 57

Appendix C – AT Commands for SMS based communication ........................................

61

10

Chapter 1

Introduction

1.1 Introduction: This project is demonstration of the vehicle tracking concept using GPS (Global

Positioning System) and GSM (Global System for Mobile Communication) technologies. Here

we have one base station where a GSM modem or mobile phone is connected to a personal

computer and an on‐board mobile station attached to the vehicle to be tracked. in

Base station computer, location of the vehicle is indicated as and when a request is send

to the on‐board mobile station. GSM technique is utilized for the communication between

the base station and on‐board mobile station. SMS based data communication of GSM is

used in this project.

On‐board mobile station consists of a GPS module, GSM modem and a micro‐

controller circuitry. Micro‐controller unit works as an intelligent unit for receiving the

11

longitude and latitude information of present location from GPS module and sending it to

the base station through the GSM module.

1.2 Vehicle tracking Concept:

A vehicle tracking system combines the installation of an electronic device in a

vehicle, or fleet of vehicles, with purpose‐designed computer software at least at one

operational base to enable the owner or a third party to track the vehicle's location,

collecting data in the process from the field and deliver it to the base of operation. Modern

vehicle tracking systems commonly use GPS or GLONASS technology for locating the vehicle,

but other types of automatic vehicle location technology can also be used. Vehicle

information can be viewed on electronic maps via the Internet or specialized software.

Urban public transit authorities are an increasingly common user of vehicle tracking

systems, particularly in large cities.

1.3 Benefits of Vehicle tracking:

Vehicle tracking system has several benefits, following are major ones.

1. Improve vehicle routing and make it more efficient

2. Decrease idle time of vehicles by Identifying misuse of vehicles

3. Prevent Loss of Goods and Services

4. Reduce fuel costs by monitoring speeds

5. Real time vehicle tracking on Google Maps and Google Earth

12

1.4 Global Positioning System (GPS):

Figure 1.1 Satellite positions

The Global Positioning System (GPS) is a space‐based global navigation satellite

system (GNSS) that provides reliable location and time information in all weather and at all

times and anywhere on or near the Earth when and where there is an unobstructed line of

sight to four or more GPS satellites. It is maintained by the United States government and is

freely accessible by anyone with a GPS receiver. The GPS project was developed in 1973 to

overcome the limitations of previous navigation systems, integrating ideas from several

predecessors, including a number of classified engineering design studies from the 1960s.

GPS was created and realized by the U.S. Department of Defence (USDoD) and was originally

run with 24 satellites. It became fully operational in 1994. The Global Positioning System

(GPS) is actually a constellation of 27 Earth‐orbiting satellites (24 in operation and three

extras in case one fails).

Each of these 3,000‐ to 4,000‐pound solar‐powered satellites circles the globe at

about 12,000 miles (19,300 km), making two complete rotations every day. The orbits are

arranged so that at anytime, anywhere on Earth, there are at least four satellites "visible" in

the sky.

1.4.1 Basic concept of GPS

A GPS receiver calculates its position by precisely timing the signals sent by GPS

satellites high above the Earth. Each satellite continually transmits messages that include

13

• the time the message was transmitted

• precise orbital information

• the general system health and rough orbits of all GPS satellites (the almanac).

The receiver uses the messages it receives to determine the transit time of each

message and computes the distance to each satellite. These distances along with the

satellites locations are used with the possible aid of trilateration, depending on which

algorithm is used, to compute the position of the receiver. This position is then displayed,

perhaps with a moving map display or latitude and longitude; elevation information may be

included. Many GPS units show derived information such as direction and speed, calculated

from position changes.

Three satellites might seem enough to solve for position since space has three

dimensions and a position near the Earth's surface can be assumed. However, even a very

small clock error multiplied by the very large speed of light— the speed at which satellite

signals propagate — results in a large positional error. Therefore receivers use four or more

satellites to solve for the receiver's location and time. The very accurately computed time is

effectively hidden by most GPS applications, which use only the location.

Although four satellites are required for normal operation, fewer apply in special

cases. If one variable is already known, a receiver can determine its position using only three

satellites. For example, a ship or aircraft may have known elevation. Some GPS receivers

may use additional clues or assumptions (such as reusing the last known altitude, dead

reckoning, inertial navigation, or including information from the vehicle computer) to give a

less accurate (degraded) position when fewer than four satellites are visible.

1.4.2 GPS Satellite Orbits:

The satellites orbit the earth with a speed of 3.9 km per second and have a

circulation time of 12 h sidereal time, corresponding to 11 h 58 min earth time. This means

that the same satellite reaches a certain position about 4 minutes earlier each day. The

mean distance from the middle of the earth is 26560 km. With a mean earth radius of 6360

km, the height of the orbits is then about 20200 km. Orbits in this height are referred to as

MEO – medium earth orbit. In comparison, geostationary satellites like ASTRA or Meteosat –

satellites orbit the earth at 42300 km, which is about twice the distance of GPS satellites.

The satellites are arranged on 6 planes, each of them containing at least 4 slots

14

where satellites can be arranged equidistantly. Today, typically more than 24 satellites orbit

the earth, improving the availability of the system. The inclination angle of the planes

towards the equator is 55°, the planes are rotated in the equatorial plane by 60° against

each other. This means that the orbits range from 55° north to 55° degrees south. Block I

satellites had an inclination of 63° against the equator.

By this arrangement of the orbits it is avoided that too many satellites are often over

the north and south pole (like it was the case in the TRANSIT system, where the satellites

ran on polar orbits). However the orbits run far enough to the north and south to guarantee

GPS availability in polar regions. Furthermore this arrangement leads to a rather stable

constellation, as orbit disturbing factors like solar winds and gravitation fields have about

the same influence on all of the satellites. The number and constellation of satellites

guarantees that the signals of at least four satellites can be received at any time all over the

world. The closer you get to the poles, the lower over the horizon the satellites are located.

They can still be received very well, but in no case they are directly above. This may lead to a

‐ typically insignificant ‐ loss of the precision of the position determination. This effect,

caused by the geometry of the satellite arrangement, happens from time to time on any

spot of the earth surface and can be forecasted.

1.4.3 Position determination with GPS:

In a considerably simplified approach, each satellite is sending out signals with the

following content: I am satellite X, my position is Y and this information was sent at time Z.

In addition to its own position, each satellite sends data about the position of other

satellites. These orbit data (ephemeris und almanac data) are stored by the GPS receiver for

later calculations.

For the determination of its position on earth, the GPS receiver compares the time

when the signal was sent by the satellite with the time the signal was received. From this

time difference the distance between receiver and satellite can be calculated. If data from

other satellites are taken into account, the present position can be calculated by

trilateration (meaning the determination of a distance from three points). This means that

at least three satellites are required to determine the position of the GPS receiver on the

earth surface. The calculation of a position from 3 satellite signals is called 2D‐position fix

15

(two‐dimensional position determination). It is only two dimensional because the receiver

has to assume that it is located on the earth surface (on a plane two‐dimensional surface).

By means of four or more satellites, an absolute position in a three dimensional space can

be determined. A 3D‐position fix also gives the height above the earth surface as a result.

In the following an explanation is given, how the position determination by GPS

works. For simplification, in the first step we assume that the earth is a two‐dimensional

disk. This allows us to do some understandable sketches for illustration. The principle can

then be transferred to the model of a three‐dimensional globe.

Figure 1.2 Position determination with two satellites (in a 2‐Dl world)

In the example on the left, the time needed by a signal to travel from the first of two

satellites to the receiver was determined to be 4 s. (In reality this value is far too high. As

the signals travel with the speed of light (299,792,458 m/s), the actual time span for signals

from the satellite to the receiver lies in the range of 0.07 s.). Based on this information, we

can at state that the receiver is positioned somewhere on a circle with a radius of 4 s around

the first satellite (left circle). If we perform the same procedure with a second satellite (right

circle), we get two points of intersection. On one of the two points the receiver must be

situated. Now we have used two satellites. But the process is called trilateration, not

dilateration so don't we need a third satellite? We may use a third satellite but we could

also assume that the receiver is located somewhere close to the earth's surface and not

deep in space, so we can neglect point B and know that the receiver must be found on point

A. The area in the picture above which shaded grey is the region in which GPS signals are

16

supposed to be “realistic”. Positions outside this area are discarded, so is point B. This

assumption replaces the third satellite which would in theory be required for the process of

trilateration. In this example an unequivocal position is obtained from only two satellites.

So we just need a third satellite for a third dimension and that's it? Well, in principle

yes. But the problem lies in the determination of the exact runtime of signals. As explained

above, satellites impose a sort of time stamp on each transmitted data package. We know

that all clocks of satellites are absolutely precise (they are atomic clocks after all) but the

problem is the clock in our GPS receiver. Atomic clocks being too expensive, our GPS

receivers are based on conventional quartz clocks which are comparatively inaccurate. What

does this mean in practice?

Figure 1.3 2D position determination with 2 satellites and clock error

Let's stick to our example and suppose the clock in our receiver is 0.5 seconds early

compared to the clock in the satellite. The runtime of the signal seems to be 0.5 s longer

than it actually is. This leads to the assumption that we are on point B instead of point A.

The circles that intersect in point B are called pseudo‐ranges. They are called “pseudo” as

long as no correction of the synchronisation errors (bias) of the clocks has been performed.

Depending on the accuracy of the clock in the GPS receiver, the determined position will be

more or less wrong. For the practice of GPS based navigation this would mean that no

determined position can ever be of any use, as the runtimes of the signals are so short, that

any clock error has an overwhelming influence on the result.

A clock error of 1/100 second, which is difficult to imagine but quite common from

car races or skiing races, would in GPS navigation lead to a mistake in the position of about

3000 km. To achieve an accuracy of 10 m of the position, the runtime of the signal must be

17

precise to 0.00000003 seconds. As atomic clocks are no option in GPS receivers, the

problem is solved in another and quite elegant way:

Figure 1.4 2D position determinations with 3 satellites and corrected clock error

If a third satellite is taken into account for the calculation of the position, another

intersection point is obtained, in case that all clocks are absolutely precise, point A would be

obtained, corresponding to the actual position of the receiver. In case of the receiver clock

being 0.5 s early, the three intersection points B are obtained. In this case the clock error

stands out immediately. If now the time of the receiver clock is shifted until the three

intersection points B merge to A, the clock error is corrected and the receiver clock is

synchronized with the atomic clocks in the satellites.

The GPS receiver can now be regarded as an atomic clock itself. The distances to the

satellites, formerly regarded as pseudo‐ranges, now correspond to the actual distances and

the determined position is accurate. In case of the example – a two dimensional disc world –

we therefore need three satellites for an unequivocal determination of our position. In the

real world which has one additional dimension, we would need a fourth satellite.

Well, then why is it always said that three satellites are enough? In practice you get

a two‐dimensional position determination (2D‐fix) with three satellites. The position is

bound to be located on the earth's surface. The fourth satellite is the geo‐centre; the

distance to the “fourth satellite” corresponds to 6360 km (the radius of the globe).

18

Therewith the fourth satellite necessary for the calculation is given, but the calculation is

restricted to locations on the earth surface. However the earth is not a perfect sphere. The

surface of the earth in this case means the earth geoid, corresponding to sea level. If the

receiver is located on a mountain, the determined position again is afflicted with an

inaccuracy, as the runtime of the satellite signals is wrong.

By constantly recalculating its position, the GPS receiver can additionally determine

the speed and direction of a movement (referred to as "ground speed" and "ground track").

Another possibility of determining the speed is by using the Doppler's effect which

occurs due to the movement of the receiver while receiving the signals. The principle is the

same as for a moving siren on a police car, the tune is higher when the car moves towards

the listener and it is lower when the car moves away.

1.4.4 Transmitted GPS Signal:

The principle of position determination by GPS and the accuracy of the positions

strongly depend on the nature of the signals. A variety of criteria was considered in the

development of a suitable signal structure. In consequence the GPS signal is quite complex

and offers the possibility of determining the following parameters, one‐way (passive)

position determination, exact distance and direction determination (Doppler effect),

transmission of navigation information, simultaneous receiving of several satellite signals,

provision of corrections for ionospheric delay of signals and insusceptibility against

interferences and multi path effects. In order to fulfil all these requirements, the signal

structure described below was developed.

To transport data signals, a suitable carrier frequency is required. The choice of the

carrier frequency is submitted to the following requirements:

• Frequencies should be chosen below 2 GHz, as frequencies above 2 GHz would

require beam antennae for the signal reception

• Ionospheric delays are enormous for frequency rages below 100 MHz and above 10

GHz

• The speed of propagation of electromagnetic waves in media like air deviates from

the speed of light (in vacuum) the more, the lower the frequency is. For low

frequencies the runtime is falsified.

19

• The PRN‐codes (explained below) require a high bandwidth for the code modulation

on the carrier frequency. Therefore a range of high frequencies with the possibility

of a high bandwidth has to be chosen.

• The chosen frequency should be in a range where the signal propagation is not

influenced by weather phenomena like, rain, snow or clouds.

Based on these considerations, the choice of two frequencies proved to be

advantageous. Each GPS satellite transmits two carrier signals in the microwave range,

designated as L1 and L2 (frequencies located in the L‐Band between 1000 and 2000 MHz).

Civil GPS receivers use the L1 frequency with 1575.42 MHz (wavelength 19.05 cm). The L1

frequency carries the navigation data as well as the SPS code (standard positioning code).

The L2 frequency (1227.60 MHz, wavelength 24.45 cm) only carries the P code and is only

used by receivers which are designed for PPS (precision positioning code). Mostly this can

be found in military receivers.

The carrier phases are modulated by three different binary codes: first there is the

C/A code (coarse acquisition). This code is a 1023 “chip” long code, being transmitted with a

frequency of 1.023 MHz. A “chip” is the same as a “bit”, and is described by the numbers

“one” or “zero”. The name “chip” is used instead of “bit” because no information is carried

by the signal. By this code the carrier signals are modulated and the bandwidth of the man

frequency band is spread from 2 MHz to 20 MHz (spread spectrum). Thus the interference

liability is reduced. The C/A code is a pseudo random code (PRN) which looks like a random

code but is clearly defined for each satellite. It is repeated every 1023 bits or every

millisecond. Therefore each second 1023000 chips are generated. Taking into account the

speed of light the length of one chip can be calculated to be 300 m.

The satellites are identified by the receiver by means of PRN‐numbers. Real GPS

satellites are numbered from 1 – 32. To WAAS/EGNOS satellites and other pseudo‐lites

higher numbers are assigned. These PRN‐numbers of the satellites appear on the satellite

view screens of many GPS receivers. For simplification of the satellite network 32 different

PRN‐numbers are available, although only 24 satellites were necessary and planned in the

beginning. For a couple of years, now more than 24 satellites are active, which optimizes the

availability, reliability and accuracy of the network.

20

The mentioned PRN‐codes are only pseudo random. If the codes were actually

random, 21023 possibilities would exist. Of these many codes only few are suitable for the

auto correlation or cross correlation which is necessary for the measurement of the signal

propagation time. The 37 suitable codes are referred to as GOLD‐codes (names after a

mathematician). For these GOLD‐codes the correlation among each other is particularly

weak, making an unequivocal identification possible.

The C/A code is the base for all civil GPS receivers. The P code (p = precise)

modulates the L1 as well as the L2 carrier frequency and is a very long 10.23 MHz pseudo

random code. The code would be 266 days long, but only 7 days are used. For protection

against interfering signals transmitted by a possible enemy, the P‐code can be transmitted

encrypted. During this anti‐spoofing (AS) mode the P‐code is encrypted in a Y‐code. The

encrypted code needs a special AS‐module for each receiving channel and is only accessible

for authorized personnel in possession of a special key. The P‐ and Y‐code are the base for

the precise (military) position determination. Since January 31, 1994 the AS‐system is

operating continuously and the P‐code is only transmitted as Y‐code.

1.4.5 Latitude & Longitude information:

Figure 1.5 Latitude and Longitude

Latitude (shown as a horizontal line) is the angular distance, in degrees, minutes, and

seconds of a point north or south of the Equator. Lines of latitude are often referred to as

parallels. Similarly longitude (shown as a vertical line) is the angular distance, in degrees,

21

minutes, and seconds, of a point east or west of the Prime (Greenwich) Meridian. Lines of

longitude are often referred to as meridians.

Distance between Lines If you divide the circumference of the earth (approximately

25,000 miles) by 360 degrees, the distance on the earth's surface for each one degree of

latitude or longitude is just over 69 miles, or 111 km. As you move north or south of the

equator, the distance between the lines of longitude gets shorter until they actually meet at

the poles. At 45 degrees N or S of the equator, one degree of longitude is about 49 miles.

Minutes and seconds for precision purposes, degrees of longitude and latitude have

been divided into minutes (') and seconds ("). There are 60 minutes in each degree. Each

minute is divided into 60 seconds. Seconds can be further divided into tenths, hundredths,

or even thousandths.

1.5 Global System for Mobile communication (GSM):

GSM (Global System for Mobile Communications, originally Group Special Mobile), is

a standard set developed by the European Telecommunications Standards Institute (ETSI) to

describe technologies for second generation (or "2G") digital cellular networks. Developed

as a replacement for first generation analogue cellular networks, the GSM standard

originally described a digital, circuit switched network optimized for full duplex voice

telephony. The standard was expanded over time to include first circuit switched data

transport, then packet data transport via GPRS. Packet data transmission speeds were later

increased via EDGE. The GSM standard is succeeded by the third generation (or "3G") UMTS

standard developed by the 3GPP. GSM networks will evolve further as they begin to

incorporate fourth generation (or "4G") LTE Advanced standards. "GSM" is a trademark

owned by the GSM Association.

The GSM Association estimates that technologies defined in the GSM standard serve

80% of the global mobile market, encompassing more than 1.5 billion people across more

than 212 countries and territories, making GSM the most ubiquitous of the many standards

for cellular networks.

GSM is a cellular network, which means that mobile phones connect to it by

searching for cells in the immediate vicinity. There are five different cell sizes in a GSM

network—macro, micro, pico, femto and umbrella cells. The coverage area of each cell

22

varies according to the implementation environment. Macro cells can be regarded as cells

where the base station antenna is installed on a mast or a building above average roof top

level. Micro cells are cells whose antenna height is under average roof top level; they are

typically used in urban areas. Picocells are small cells whose coverage diameter is a few

dozen metres; they are mainly used indoors. Femtocells are cells designed for use in

residential or small business environments and connect to the service provider’s network

via a broadband internet connection. Umbrella cells are used to cover shadowed regions of

smaller cells and fill in gaps in coverage between those cells.

Cell horizontal radius varies depending on antenna height, antenna gain and

propagation conditions from a couple of hundred meters to several tens of kilometres. The

longest distance the GSM specification supports in practical use is 35 kilometres (22 miles).

There are also several implementations of the concept of an extended cell, where the cell

radius could be double or even more, depending on the antenna system, the type of terrain

and the timing advance. Indoor coverage is also supported by GSM and may be achieved by

using an indoor picocell base station, or an indoor repeater with distributed indoor

antennas fed through power splitters, to deliver the radio signals from an antenna outdoors

to the separate indoor distributed antenna system. These are typically deployed when a lot

of call capacity is needed indoors; for example, in shopping centers or airports. However,

this is not a prerequisite, since indoor coverage is also provided by in‐building penetration

of the radio signals from any nearby cell.

The modulation used in GSM is Gaussian minimum‐shift keying (GMSK), a kind of

continuous‐phase frequency shift keying. In GMSK, the signal to be modulated onto the

carrier is first smoothed with a Gaussian low‐pass filter prior to being fed to a frequency

modulator, which greatly reduces the interference to neighbouring channels (adjacent‐

channel interference).

1.5.1 GSM services

GSM services are a standard collection of applications and features available to

mobile phone subscribers all over the world. The GSM standards are defined by the 3GPP

collaboration and implemented in hardware and software by equipment manufacturers and

mobile phone operators. The common standard makes it possible to use the same phones

with different companies' services, or even roam into different countries. GSM is the world's

23

most dominant mobile phone standard. The design of the service is moderately complex

because it must be able to locate a moving phone anywhere in the world, and

accommodate the relatively small battery capacity, limited input/output capabilities, and

weak radio transmitters on mobile devices. The major services are as follows:

Voice calls: Once a mobile phone has successfully attached to a GSM network, calls may be

made/receive from the phone to any other phone on the global Public Switched Telephone

Network.

Data transmission: The GSM standard also provides separate facilities for transmitting

digital data. This allows a mobile phone to act like any other computer on the Internet,

sending and receiving data via the Internet Protocol. In addition to general Internet access,

other special services may be provided by the mobile phone operator, such as SMS.

The mobile may also be connected to a desktop computer, laptop, or PDA, for use as

a network interface (just like a modem or Ethernet card, but using one of the GSM data

protocols described below instead of a PSTN‐compatible audio channel or an Ethernet link

to transmit data). Some GSM phones can also be controlled by a standardised Hayes AT

command set through a serial cable or a wireless link (using IRDA or Bluetooth). The AT

commands can control anything from ring tones to data compression algorithms.

• Circuit‐switched data protocols: A circuit‐switched data connection reserves a

certain amount of bandwidth between two points for the life of a connection, just as

a traditional phone call allocates an audio channel of a certain quality between two

phones for the duration of the call. Two circuit‐switched data protocols are defined

in the GSM standard: Circuit Switched Data (CSD) and High‐Speed Circuit‐Switched

Data (HSCSD). These types of connections are typically charged on a per‐second

basis, regardless of the amount of data sent over the link. This is because a certain

amount of bandwidth is dedicated to the connection regardless of whether or not it

is needed. Circuit‐switched connections do have the advantage of providing a

constant, guaranteed quality of service, which is useful for real‐time applications like

video conferencing.

• General Packet Radio Service (GPRS): The General Packet Radio Service (GPRS) is a

packet‐switched data transmission protocol, which was incorporated into the GSM

standard in 1997. It is backwards‐compatible with systems that use pre‐1997

24

versions of the standard. GPRS does this by sending packets to the local mobile

phone mast (BTS) on channels not being used by circuit‐switched voice calls or data

connections. Multiple GPRS users can share a single unused channel because each of

them uses it only for occasional short bursts. The advantage of packet‐switched

connections is that bandwidth is only used when there is actually data to transmit.

This type of connection is thus generally billed by the kilobyte instead of by the

second, and is usually a cheaper alternative for applications that only need to send

and receive data sporadically, like instant messaging. GPRS is usually described as a

2.5G technology.

• Short Message Service (SMS): Short Message Service (more commonly known as

text messaging) has become the most used data application on mobile phones, with

74% of all mobile phone users worldwide already as active users of SMS, or 2.4

billion people by the end of 2007. SMS text messages may be sent by mobile phone

users to other mobile users or external services that accept SMS. The messages are

usually sent from mobile devices via the Short Message Service Centre using the

MAP protocol. The SMSC is a central routing hubs for Short Messages. Many mobile

service operators use their SMSCs as gateways to external systems, including the

Internet, incoming SMS news feeds, and other mobile operators (often using the de

facto SMPP standard for SMS exchange). The SMS standard is also used outside of

the GSM system.

1.5.2 GSM carrier frequencies

GSM networks operate in a number of different carrier frequency ranges (separated

into GSM frequency ranges for 2G and UMTS frequency bands for 3G), with most 2G GSM

networks operating in the 900 MHz or 1800 MHz bands. Where these bands were already

allocated, the 850 MHz and 1900 MHz bands were used instead (for example in Canada and

the United States). In rare cases the 400 and 450 MHz frequency bands are assigned in some

countries because they were previously used for first‐generation systems. Most 3G

networks in Europe operate in the 2100 MHz frequency band.

Regardless of the frequency selected by an operator, it is divided into timeslots for

individual phones to use. This allows eight full‐rate or sixteen half‐rate speech channels per

radio frequency. These eight radio timeslots (or eight burst periods) are grouped into a

25

TDMA frame. Half rate channels use alternate frames in the same timeslot. The channel

data rate for all 8 channels is 270.833 kbit/s, and the frame duration is 4.615 ms. The

transmission power in the handset is limited to a maximum of 2 watts in GSM850/900 and 1

watt in GSM1800/1900.

GSM has used a variety of voice codecs to squeeze 3.1 kHz audio into between 5.6

and 13 kbit/s. Originally, two codecs, named after the types of data channel they were

allocated, were used, called Half Rate (5.6 kbit/s) and Full Rate (13 kbit/s). These used a

system based upon linear predictive coding (LPC). In addition to being efficient with bitrates,

these codecs also made it easier to identify more important parts of the audio, allowing the

air interface layer to prioritize and better protect these parts of the signal.

GSM was further enhanced in 1997 with the Enhanced Full Rate (EFR) codec, a

12.2 kbit/s codec that uses a full rate channel. Finally, with the development of UMTS, EFR

was re‐factored into a variable‐rate codec called AMR‐Narrowband, which is high quality

and robust against interference when used on full rate channels, and less robust but still

relatively high quality when used in good radio conditions on half‐rate channels.

1.5.3 Frequency bands and channel arrangement

GSM frequency bands are the radio spectrum frequencies designated by the ITU for

the operation of the GSM phones. There are four GSM bands: 850, 900, 1800, and 1900. The

most dominant bands in the United States are 850 and 1900, while the other two are used

more in the rest of the world. And another less common GSM version is GSM‐450. Different

sites are compatible with different GSM frequency bands. Example Vodafone INDIA uses

both 800 as well as 1800 Frequency Band for its Mobile Operation.

Standard or primary GSM 900 Band, P‐GSM:

• 890 ‐ 915 MHz: mobile transmit, base receive (Uplink or Reverse channel)

• 935 ‐ 960 MHz: base transmit, mobile receive (Downlink or Forward channel)

Extended GSM 900 Band, E‐GSM (includes Standard GSM 900 band):

• 880 ‐ 915 MHz: mobile transmit, base receive

• 925 ‐ 960 MHz: base transmit, mobile receive

Railways GSM 900 Band, R‐GSM (includes Standard and Extended GSM 900 Band);

• 876 ‐ 915 MHz: mobile transmit, base receive

• 921 ‐ 960 MHz: base transmit, mobile receive

26

DCS 1 800 Band:

• 1 710 ‐ 1 785 MHz: mobile transmit, base receive

• 1 805 ‐ 1 880 MHz: base transmit, mobile receive

Dual band: Dual band refers to the capability of GSM network infrastructure and handsets

to operate across two frequency bands e.g. 850/1900 MHz

Tri‐band: A Tri Band phone will operate on three different frequencies depending on the

available network. e.g. 850/1800/1900 MHz.

Quad‐band mobile: A quad‐band mobile phone is operational on any of the four GSM

frequencies ‐ e.g. 850/900/1800/1900 MHz.

Note:

1. The term GSM 900 is used for any GSM system which operates in any 900 MHz band.

2. The BTS may cover the complete band, or the BTS capabilities may be restricted to a

subset only, depending on the operator needs.

3. Uplink frequency is usually lower than down‐link frequency because the path loss is

directly proportional to frequency; hence transmitting station has to put more

power into it. The mobile station is battery operated, and to save power uplink

frequency is kept lower.

1.5.4 The structure of a GSM network

The network is structured into a number of discrete sections:

• The Base Station Subsystem (the base stations and their controllers).

• The Network and Switching Subsystem (the part of the network most similar to a

fixed network). This is sometimes also just called the core network.

• The GPRS Core Network (the optional part which allows packet based Internet

connections).

• The Operations support system (OSS) for maintenance of the network.

27

Figure 1.6 GSM Structure

1.5.5 Subscriber Identity Module (SIM)

One of the key features of GSM is the Subscriber Identity Module, commonly known

as a SIM card. The SIM is a detachable smart card containing the user's subscription

information and phone book. 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.

The SIM Card is a small microchip, approximately the size of a small postage stamp

and is usually placed underneath the battery in the rear of the mobile station (phone). The

SIM securely stores the service‐subscriber key (IMSI) used to identify a subscriber on mobile

telephony devices (such as mobile phones and computers). The SIM card allows users to

change phones by simply removing the SIM card from one mobile phone and inserting it

into another mobile phone or broadband telephony device.

Figure 1.7 Typical Mobile phone SIM card

28

A SIM card contains its unique serial number, internationally unique number of the

mobile user (IMSI), security authentication and ciphering information, temporary

information related to the local network, a list of the services the user has access to and two

passwords (PIN for usual use and PUK for unlocking). SIM cards are available in three

standard sizes. The first is the size of a credit card (85.60 mm × 53.98 mm x 0.76 mm). The

newer, most popular miniature version has the same thickness but a length of 25 mm and a

width of 15 mm, and has one of its corners truncated (chamfered) to prevent misinsertion.

The newest incarnation known as the 3FF or micro‐SIM has dimensions of 15 mm × 12 mm.

Most cards of the two smaller sizes are supplied as a full‐sized card with the smaller card

held in place by a few plastic links, it can easily be broken off to be used in a device that uses

the smaller SIM.

1.5.6 GSM modem

A GSM modem is a wireless modem that works with a GSM wireless network. A

wireless modem behaves like a dial‐up modem. The main difference between them is that a

dial‐up modem sends and receives data through a fixed telephone line while a wireless

modem sends and receives data through radio waves.

A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an

external GSM modem is connected to a computer through a serial cable or a USB cable. A

GSM modem in the form of a PC Card / PCMCIA Card is designed for use with a laptop

computer. It should be inserted into one of the PC Card / PCMCIA Card slots of a laptop

computer. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless

carrier in order to operate.

Computers use AT(Attention) commands to control modems. Both GSM modems

and dial‐up modems support a common set of standard AT commands

In addition to the standard AT commands, GSM modems support an extended set of AT

commands. These extended AT commands are defined in the GSM standards. With the

extended AT commands, you can do things like:

• Reading, writing and deleting SMS messages.

• Sending SMS messages.

• Monitoring the signal strength.

• Monitoring the charging status and charge level of the battery.

29

• Reading, writing and searching phone book entries.

The number of SMS messages that can be processed by a GSM modem per minute is very

low, about six to ten SMS messages per minute.

30

Chapter 2

Block Diagram and Descriptions

31

2.1 Block Diagrams:

32

2.2 Description:

In this project AT89C51 microcontroller is used for interfacing to various hardware

peripherals. The micro‐controller continuously monitors the GPS data of the current location

of the vehicle and report the status of the vehicle on demand. The AT89C51 microcontroller

is interfaced serially to a GSM Modem and GPS Receiver. A GSM modem isused to send the

position (Latitude and Longitude) of the vehicle from a remote place. The GPS modem will

continuously give the data i.e. the latitude and longitude indicating the position of the vehicle.

The GPS modem gives many parameters as the output, but only the recommended NMEA data

coming out is read and displayed on to the LCD. The same data is sent to the mobile at the base

station from where the position of the vehicle is demanded.

The hardware interfaces to microcontroller are LCD display, GSM modem and GPS

Receiver. The design uses RS232 protocol for serial communication between the modems and the

microcontroller.

When the request by user is sent to the number at the modem, the system

automatically sends a return reply to that mobile indicating the position of the vehicle in terms of

latitude and longitude.

Figure 2.1 shows the block diagram of the base station set‐up. A personal computer is

interfaced with GSM modem or a mobile phone. Base station computer provides the user interface

, so that operator can send the request to the on‐ board vehicle unit and get the location

information, this information is send to the Google map web browser . Then the Google map

indicates the real time location by a flag on the map.

Figure 2.2 shows the block diagram of the on‐board unit which is attached to the

vehicle to be tracked. In this unit a GPS receiver and a GSM modem module interfaced with a

microcontroller based intelligent circuitry. GPS modem continuously receives the

information from satellite and determines its position and sends it through its port,

microcontroller receives this information and filter out the required information and make it in to

the appropriate format and send it to the base station when the request is received. On‐board

unit has its own LCD display for showing the latitude and longitude information.

33

Chapter 3

Circuit Diagram and Description

34

3.1 Circuit Diagram:

Figure 3.1 Circuit diagram of On‐board unit

35

36

3.2 Description:

The project is vehicle positioning and navigation system we can locate the vehicle

around the globe with 8051 micro controller, GPS receiver, GSM modem .

Microcontroller used is 80C51. The code is written in the internal memory of

Microcontroller i.e. ROM. With help of instruction set, it processes the instructions and it

acts as interface between GSM and GPS with help of serial communication of micro‐

controller. GPS always transmits the data and GSM transmits and receive the data.

GPS pin TX is connected to microcontroller port pin. GSM pins TX and RX are

connected to microcontroller serial port pins. Microcontroller communicates with the help

of serial communication. First it takes the data from the GPS receiver and then sends the

information to the owner in the form of SMS with help of GSM modem.

GPS receiver works on 9600 baud rate is used to receive the data from space

Segment (from Satellites), the GPS values of different Satellites are sent to microcontroller

80C51, where these are processed and forwarded to GSM. At the time of processing GPS

receives $GPRMC values only. From these values microcontroller takes only latitude and

longitude values excluding time, altitude, name of the satellite, authentication etc. E.g. LAT:

1728:2470 LOG: 7843.3089 GSM modem with a baud rate 9600.GSM is a Global system for

mobile communication in this project it acts as a SMS Receiver and SMS sender.

The power is supplied to components like GSM, GPS and Micro control circuitry using

a 12V/3.2A battery .GSM requires 5V,GPS and microcontroller requires 5V .with the help of

regulators we regulate the power between three components. A MAX232 IC is used in this

project to generate RS232 protocol voltage levels to interface to personal computer. The

flash micro‐controller is programmed through this serial port. This helps in in‐system

programming by jumper selection. A multi jumper selection is provided for the debugging

purpose, so that individual modules can be directly connected to the personal computer for

ensuring the data flow.

The power supply to the circuit is indicated by an LED. And SMS receive LED indicator

and SMS send LED indicator are also incorporated.

37

Chapter 4

Hardware Description

38

4.1 GPS Receiver Module:

This is a high gain GPS Receiver (9V Serial) with 4‐pin 2.54mm pitch Berg strip.

Receiver is made with third generation POT (Patch Antenna On Top) GPS module. The built

in 3V3 to 9V level convertor enable us to interface with normal 5V Microcontrollers. Its low

pin count (4‐Pin) will make it easy to interface and it is bread board friendly (2.54 mm

connector). The 4 Pins are 9V, TX, RX, GND. Yes, there is no setting required, just plug in to

the power (9V), your data (NMEA 0183) is ready at TX pin! This is a standalone 9V GPS

Module and requires no external components. It has internal RTC Back up battery. It can be

directly connected to Microcontroller's USART.

This GPS engine provides a solution with high position and speed accuracy

performances as well as high sensitivity and tracking capabilities in urban conditions and it

provides standard NMEA0183 strings in “raw” mode for any microcontroller. The module

provides current time, date, latitude, longitude, speed, altitude and travel direction /

heading among other data, and can be used in a host of applications, including navigation,

tracking systems, fleet management, mapping and robotics.

The GPS chipsets inside the module are designed by MediaTek Inc.,which is the

world's leading digital media solution provider and largest fab‐less IC company in Taiwan.

The module can support up to 51 channels. The GPS solution enables small form factor

devices. They deliver major advancements in GPS performances, accuracy, integration,

computing power and flexibility. They are designed to simplify the embedded system

integration process.

Figure 4.1 GPS Receiver module

39

4.1.1 GPS Antenna:

This is basically a patch antenna placed on the top of the module. A patch antenna

(also known as a rectangular microstrip antenna) is a type of radio antenna with a low

profile, which can be mounted on a flat surface. It consists of a flat rectangular sheet or

"patch" of metal, mounted over a larger sheet of metal called a ground plane. The assembly

is usually contained inside a plastic radome (A radome (radar dome) is a structural,

weatherproof enclosure that protects a microwave or radar antenna., which protects the

antenna structure from damage). Patch antennas are simple to fabricate and easy to modify

and customize. They are the original type of microstrip antenna described by Howell; the

two metal sheets together form a resonant piece of microstrip transmission line with a

length of approximately one‐half wavelength of the radio waves. The radiation mechanism

arises from discontinuities at each truncated edge of the microstrip transmission line. The

radiation at the edges causes the antenna to act slightly larger electrically than its physical

dimensions, so in order for the antenna to be resonant, a length of microstrip transmission

line slightly shorter than one‐half a wavelength at the frequency is used. A patch antenna is

usually constructed on a dielectric substrate, using the same materials and lithography

processes used to make printed circuit boards.

4.1.2 Features:

• Single 5V DC supply @ 60 mA (typical)

• TTL asynchronous serial interface

• Data output Baud rate: 9600 bps(Default)

• Standard NMEA0183 output format

• Standard 4‐pin Berg strip interface (2.54mm Pitch).

• Module will be provided with two type berg strip (Normal & Right angled)

• Based on MediaTek Single Chip Architecture.

• Patch Antenna Size: 25mm x 25mm x 4mm

• Low Power Consumption: 50mA @ acquisition, 45mA @ tracking

• L1 Frequency, C/A code, 51‐channel

• High Sensitivity: Up to ‐158 dBm tracking, superior urban performances

• Position Accuracy: < 3m CEP (50%) without SA (horizontal)

• Cold Start is Under 36 seconds (Typical)

40

4.1.3 Pin Details:

PIN PIN NAME DETAILS

9V Power supply Power supply (9V)

RXD Receive Pin for Data Reception

TXD Transmit Pin for Data Transmission

GND Ground Ground Level of Power Supply

Table 4.1 Pin details of GPS module

4.2 GSM Modem Module OR Mobile :

The module is used in this project is rhydoLABZ's GSM/GPRS Modem. Which is

built with Tri‐band GSM/GPRS engine, works on frequencies EGSM 900 MHz, DCS 1800

MHz and PCS 1900 MHz. It is very compact in size and easy to use as plug in module .

The Modem is coming with 5V TTL interface,which allows you to connect directly to

5V microcontroller / Arduino. The baud rate is configurable from 9600‐115200

through AT command. The GSM/GPRS TTL Modem is having internal TCP/IP stack

to enable you to connect with internet via GPRS. It is suitable for SMS as well as

DATA transfer application in M2M interface.

You need only two wire( TX , RX ) except Power supply to interface with

microcontroller / Arduino . The built in Switching Power supply allows you to connect

wide range unregulated power supply . Using this modem , you can send SMS, data and

read SMS through simple AT command.

41

Figure 4.2 Nokia 6070

4.2.1 Nokia 6070 Specifications

Classic, enduring design Intuitive user interface with familiar function Excellent readability with large, brilliant 65,536 color display Integrated VGA camera for still pictures and videos Multimedia messaging (MMS) Triband phone with xHTML browser and email access Large keypad for easy messaging and dialing Fast downloads with EDGE FM stereo radio Downloadable user interface themes, MIDI and MP3 ringing tones, true tones,

screensavers, and games

GSM Triband GSM 900/1800/1900 Mhz

Automatic switching between band

Volume: 73 cc

Weight: 88 g

Length: 105.4 mm

Width: 44.3 mm

Thickness (max): 18.6 mm

42

4.3 Microcontroller:

The AT89C51 micro‐controller is used for this project; this is an In‐System‐

Programmable microcontroller, which means no extra programmer is required

for programming this micro‐controller. The AT89C51 is a low‐power, high‐performance

CMOS 8‐ bit microcontroller with 4Kbytes of in‐system programmable Flash memory.

This device is a

Single‐Chip 8‐Bit Microcontroller manufactured in advanced CMOS process and is aderivative of the 80C51 microcontroller family. The instruction set is 100% executing and timing compatible with the AT89C51 instruction set.

By combining a versatile 8‐bit CPU with in‐system programmable Flash on

a monolithic chip, the Philips AT89C51 is a powerful microcontroller which provides a

highly‐ flexible and cost‐effective solution to many embedded control applications.

The At89C51 provides the following standard features: 4 K bytes of Flash, 128 bytes of

RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16‐bit timer/counters,

a six‐vector two‐level interrupt architecture, a full duplex serial port, on‐chip

oscillator, and clock circuitry. In addition, the P89C668 is designed with static logic for

operation down to zero frequency and supports two software selectable power saving

modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial

port, and interrupt system to continue functioning. The Power‐down mode saves the

RAM contents but freezes the oscillator, disabling all other chip functions until the next

43

interrupt or hardware reset.

4.3.1 Main Features of AT89C51

• 80C51 Central Processing Unit

• Compatible with MCS-51™ Products • 4K Bytes of In-System Reprogrammable Flash Memory- Endurance: 1,000 Write/Erase Cycles • Fully Static Operation: 0 Hz to 24 MHz • Three-level Program Memory Lock • 128 x 8-bit Internal RAM • 32 Programmable I/O Lines • Two 16-bit Timer/Counters • Six Interrupt Sources • Low-power Idle and Power-down Modes

4.3.2 Pin details

Figure 4.4 Pin diagram of AT89C51

44

A detailed pin details ofAT89C51 is provided in the Appendix A

4.4 Relay

1. DIL Pitch Terminals High Sensitivity.

2. Conforms to FCC Part 68 1.5kV Surge and Dielectric

1,000VAC.

3. Fully sealed (immersion cleanable).

4. High Reliability bifurcated Contact.

Application :

Application for Telecommunication Equipment, Office

Equipment, Security Alarm Systems, Measuring

instruments, Medical Monitoring Equipment, Audio

Visual Equipment, Flight Simulator, Sensor Control.

45

46

Chapter 5

Software and Flowcharts

47

5.1 Base station Software

5.1.1 Introduction

This article shall describe a very simple approach to working with a GPS device within the

context of a Visual Basic 2005 application. This article does not address how the GPS device

works or everything that can be gleaned from the NEMA 0183 string outputted from most

GPS devices; rather, the article is intended for those just interested in getting the present

position from a GPS and using that point to do something interesting like show you where

you are on a map.

Nothing exotic or expensive was used in this project; the GPS source was provided by my

Garmin eTrex Legend handheld GPS purchased for about $100.00 (a nice little GPS but not

the high end to be sure). Since my laptop provides no male serial ports, in order to connect

the device I needed an adapter; for this I opted to purchase a Belkin Serial Port to USB

adapter (an F5U109) which works great; the cable used to connect the device to a computer

was provided with the device.

Figure 1: Getting the present position from the GPS.

To make matters more interesting than just outputting the present position, I provided the

means to map the point directly into Google Maps using the query string accepted on that

site populated with the current latitude and longitude of the device. I had published

48

something similar on VB.NET Heaven a while back but without the GPS interface provided.

Interestingly enough (but not surprising), if you compare the present position of the device

as shown on the map versus the physical address when plotted on Google Maps, you will

likely note that the GPS position is more accurate than the geocoded physical address.

NOTE: In order to retrieve the present position from the GPS device.

49

5.1.2 Flow chart:

Figure 5.2 Flow chart of base station software

5.2 Microcontroller development

Development of microcontroller software is accomplished using Keil Microvision

8051 cross compiler platform.

5.2.1 Keil Microvision 8051 Cross compiler:

The µVision IDE from Keil combines project management, make facilities, source

code editing, program debugging, and complete simulation in one powerful environment.

The µVision development platform is easy‐to‐use and helping you quickly create embedded

programs that work. The µVision editor and debugger are integrated in a single application

that provides a seamless embedded project development environment.

50

5.2.2 Flow chart:

Figure 5.3 Flow chart of on‐board mobile station software

51

Chapter 6

Result and Future work

52

6.1 Result:

This project has been successfully completed and demonstrated. In the

demonstration, we fixed the on‐board mobile station in a bike and base station was set‐up

in the SGSITS lab. Then we send request SMS for the current location of the moving bike.

On board unit promptly replied in a return SMS by giving the location information in form

of latitude and longitude. It also provides the atomic clock calibrated time information.

We could get an approximate accuracy of 1 meter about the location of the bike.

6.2 Future Work:

The project can be extended to a full‐fledged device by providing the following extension:

1. A graphical display interface in the on‐board mobile station and a database

digital map provides the directional information to the vehicle driver.

2. At base station software by slight modification can provides address of the

location along with the flag indicator.

This developmental activity can be further modified for various logistical and security

applications in day‐to‐day life.

53

References

[1] Maru O Duham, “System design and the 8051”, 2nd Edition, Techno press, Tulsa,

ISBN:0‐9719324‐6‐8, Year 2004.

[2] Theodore S Rappaport, “Wireless communications, Principles and practice”, 2nd

Ed,Pearson Education, ISBN:81‐7808‐648‐4, Year 2004.

[4] Philips Semiconductor, “80C51 family architecture”, Year 1995.

[5] “GSM (Global System for Mobile Communications)”,

http://en.wikipedia.org/wiki/GSM

[6] “How GPS Receivers Work”,

http://electronics.howstuffworks.com/gadgets/travel/ gps.htm

[7] “GPS Receiver with Antenna”,

http://www.rhydolabz.com/index.php?main_page=product_info&cPath=122&produ

cts_id=475.

[8] “GSM/GPRS Modem”,

http://www.rhydolabz.com/index.php?main_page=product_info&cPath=122&produ

cts_id=559.

[9] “AT Commands Set” SIM300D_ATC_V1.06, Shanghai SIMCom Ltd.

liv

Appendices

lv

Appendix A ‐ Data sheets

1. A T 89C51 Micro‐controller ................................................................................... 44

2. MAX232 Dual EIA‐232 Drivers/Receivers ............................................................ 48

3. 16X2 LCD…… ......................................................................................................... 52 4 7805 Regulator IC……………………………………………………………………………………………… 53