67
ABSTRACT A vehicle tracking system combines the installation of an electronic device in a vehicle, or fleet of vehicles, with purpose-designed computer software to enable the owner or a third party to track the vehicle's location, collecting data in the process. Modern vehicle tracking systems commonly use Global Positioning System (GPS) 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. In the main they are easy to steal, and the average motorist has very little knowledge of what it is all about. To avoid this kind of steal we are going to implement a system it provides more security to the vehicle. Existing System: In the previous system security lock and alarm is implemented in a car. If a burglar can break open the lock, then it becomes easy for the burglar to steal the car. And in old security system if the car is stolen then it is out of the owner control. User doesn’t have any awareness about the current location of the vehicle. The Proposed System: The RF transmitter is attached with the vehicle which has its own identification. This data will be continuously transmitted to the RF receiver connected to the microcontroller. This GPS will be location the position of vehicle and transmit that data to the microcontroller. Suppose the RF receiver not receiving signal from the transmitting unit, receiver unit send the signal to the microcontroller, from that we can identify the

Gps

Embed Size (px)

DESCRIPTION

• Developing Automatic Vehicle Location system using GPS for positioning information and GSM/GPRS or information transmission with following features:• Acquisition of vehicle’s location information (latitude longitude) after specified time interval.• Transmission of vehicle’s location and other information (including ignition status, door open/close status) to the monitoring station/Tracking server after specified interval of time.• Developing a web based software to display all transmitted information to end user along with displaying location of vehicle on a map.The objective of the project is to build an additional feature to the present security system that will warn the owner of the vehicle by sending SMS when there has been an intrusion into the vehicle.• To provide a solution to avoid car stolen in the lower cost than advance security car system. (GPS)

Citation preview

ABSTRACT A vehicle tracking system combines the installation of an electronic device in a vehicle, or fleet of vehicles, with purpose-designed computer software to enable the owner or a third party to track the vehicle's location, collecting data in the process. Modern vehicle tracking systems commonly use Global Positioning System (GPS) 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. In the main they are easy to steal, and the average motorist has very little knowledge of what it is all about. To avoid this kind of steal we are going to implement a system it provides more security to the vehicle. Existing System: In the previous system security lock and alarm is implemented in a car. If a burglar can break open the lock, then it becomes easy for the burglar to steal the car. And in old security system if the car is stolen then it is out of the owner control. User doesnt have any awareness about the current location of the vehicle. The Proposed System: The RF transmitter is attached with the vehicle which has its own identification. This data will be continuously transmitted to the RF receiver connected to the microcontroller. This GPS will be location the position of vehicle and transmit that data to the microcontroller. Suppose the RF receiver not receiving signal from the transmitting unit, receiver unit send the signal to the microcontroller, from that we can identify the theft. If the vehicle is theft it automatically sends location of the vehicle to its owner as a SMS through GSM modem. This will be a much simpler and low costtechnique compared to others. If a password like SMS is sent by the owner, it automatically stops the vehicle

This proposed work is an attempt to design a tracking unit that uses the global positioning system to determine the precise location of a object, person or other asset to which it is attached and using GSM modem this information can be transmit to remote user. It can provide tele-monitoring system for inter-cities transportation vehicles such as taxis and buses. This system contains single-board embedded system that is equipped with GPS and GSM modems along with ARM processor that is installed in the vehicle. During object motion, its location can be reported by SMS message. A software package is developed to read, process, analyze and store the incoming SMS messages. The use of GSM and GPS technologies allows the system to track object and provides the most up-to-date information about ongoing trips. If a password like SMS is sent by the owner, it automatically stops the vehicle or we can use it for different other work, it can provide real time control. This system finds its application in real time traffic surveillance. It could be used as a valuable tool for real time traveler. The current system can be able to provide monitoring process from anywhere. The purpose of this system is to design and integrate anew system which is integrated with GPS- GSM to provide following feature: a) Location information, b) Real time tracking using SMS, c) track bus driver activity d) Communication is instantaneous therefore we can receive running report quickly.

It is completely integrated so that once it is implemented in all vehicles, then it is easy to track vehicles any time.Keywords: Global Positioning System (GPS), RF receiver and transmitter, operations and maintenance center (OMC) and Gaussian minimum shift keying (GMSK)

I. INTRODUCTION

In the last few decades, India has progressed at such an enormous rate that many companies have strongly established themselves here. These companies bring a huge amount of workforce with them. Arranging transportation to such a huge mass is a cumbersome task in -volving many intricacies. Generally, this transport is arranged through the local transport vend -ors on a yearly contract basis, recently happen mishaps such as burglary, rape cases etc. The development of satellite communication technology is easy to identify the vehicle locations. Vehicle tracking systems have brought this technology to the day-to-day life of the common person. Today GPS used in cars, ambulances, fleets and police vehicles are common sights on the roads of developed countries. All the existing technology support tracking the vehicle place and status . The GPS/GSM Based System is one of the most important systems, which integrate both GSM and GPS technologies. It is necessary due to the many of applications of both GSM and GPS systems and the wide usage of them by millions of people throughout the world . This system designed for users in land construction and transport business, provides real-time information such as location, speed and expected arrival time of the user is moving vehicles in a concise and easy-to-read format. This system may also useful for communication process among the two points. Currently GPS vehicle tracking ensures their safety as travelling. This vehicle tracking system found in clients vehicles as a theft prevention and rescue device. Vehicle owner or Police follow the signal emitted by the tracking system to locate a robbed vehicle in parallel the stolen vehicle engine speed going to decreased and pushed to off. After switch of the engine, motor cannot restart without permission of password. This system installed for the four wheelers, Vehicle tracking usually used in navy operators for navy management functions, routing, send off, on board information and security. The applications include monitoring driving performance of a parent with a teen driver. Vehicle tracking systems accepted in consumer vehicles as a theft prevention and retrieval device. If the theft identified, the system sends the SMS to the vehicle owner. After that vehicle owner sends the SMS to the controller, issue the necessary signals to stop the motor.

1.1 Objective:

Exploring GPS based tracking systems

Developing Automatic Vehicle Location system using GPS for positioning information and GSM/GPRS or information transmission with following features: Acquisition of vehicles location information (latitude longitude) after specified time interval. Transmission of vehicles location and other information (including ignition status, door open/close status) to the monitoring station/Tracking server after specified interval of time. Developing a web based software to display all transmitted information to end user along with displaying location of vehicle on a map.The objective of the project is to build an additional feature to the present security system that will warn the owner of the vehicle by sending SMS when there has been an intrusion into the vehicle. To provide a solution to avoid car stolen in the lower cost than advance security car system. (GPS)For the purpose of details of the block diagram refer fig

This vehicle tracking provides,the modules as Anti theft system Position tracking Security such as while locking the cars, confirmation whether the doors are open or closed.Overall system is partitioned into two major design units.In-Vehicle unitTracking Server / Monitoring Station.

1.2 Vehicle Tracking System:

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. Vehicle tracking systems are also popular in consumer vehicles as a theft prevention and retrieval device. Police can simply follow the signal emitted by the tracking system and locate the stolen vehicle. When used as a security system, a Vehicle Tracking System may serve as either an addition to or replacement for a traditional Car alarm. Some vehicle tracking systems make it possible to control vehicle remotely, including block doors or engine in case of emergency. The existence of vehicle tracking device then can be used to reduce the insurance cost.

1.3 GSM Overview:

Global System for Mobile Communications or GSM (originally from Groupe Spcial Mobile), is the world's most popular standard for mobile telephone systems. The GSM Association estimates that 80% of the global mobile market uses the standard.[1] GSM is used by over 1.5 billion people[2] across more than 212 countries and territories.[3] This ubiquity means that subscribers can use their phones throughout the world, enabled by international roaming arrangements between mobile network operators. GSM differs from its predecessor technologies in that both signaling and speech channels are digital, and thus GSM is considered a second generation (2G) mobile phone system. The GSM standard has been an advantage to both consumers, who may benefit from the ability to roam and switch carriers without replacing phones, and also to network operators, who can choose equipment from many GSM equipment vendors.

1.4 GPS Overview: 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 started 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 Defense (USDOD) and was originally run with 24 satellites. It became fully operational in 1994.

II. EVOLUTION OF GPS

The technology evolved from, Mr. Marconis transmission of radio waves. This was applied for society during the 1920's by the establishment of radio stations, for which you only needed a receiver. The same applies for GPS- you only need a rather special radio receiver. Significant advances in radio were bolstered by large sums of money during and after the Second World War, and were even more advanced by the need for communications with early satellites and rockets, and general space exploration. The technology to receive radio signals in a small hand-held, from 20,000kms away, is indeed amazing. Throughout the 1960s the U.S. Navy and Air Force worked on a number of systems that would provide navigation capability for a variety of applications In 1973 finally, the U.S. Department of Defense decided that the military had to have a super precise form of worldwide positioning. And fortunately they had the kind of money ($12 billion!) it took to build something really good. In short, development of the GPS satellite navigation system was begun in the 1970s by the US Department of Defense. The basis for the new system was atomic clocks carried on satellites, a concept successfully tested in an earlier Navy program called TIMATION. The Air Force operated the new system, which it called the Navstar Global Positioning System. It has since come to be known simply as GPS. The first GPS satellite was launched in 1978 and a second-generation set of satellites ("Block II") was launched beginning in 1989. Today's GPS constellation consists of at least 24 Block II satellites. A full constellation of 24 satellites was achieved in 1994. GPS was originally intended for military applications, but in the 1980s, the government made the system available for civilian use. After the downing of Korean Flight 007 in 1983 -a tragedy that might have been prevented if its crew had access to better navigational tools- President Ronald Reagan issued a directive that guaranteed that GPS signals would be available at no charge to the world. That directive helped open up a commercial market. Deployment of GPS continued at a steady pace through the 1990s, with growing numbers of civilian and military users. GPS burst into public awareness during the Persian Gulf War in 1991. GPS was used extensively during that conflict, so much so that not enough military-equipped GPS receivers were available.

2.1 WHAT IS GPS? The Global Positioning System (GPS) is a satellite-based navigation system made up of a network of 24 satellites placed into orbit by the U.S. Department of Defence that continuously transmit coded information, which makes it possible to precisely identify locations on earth by measuring the distance from the satellites. The satellites transmit very low power specially coded radio signals that can be processed in a GPS receiver, enabling the receiver to compute position, velocity and time thus allowing anyone one with a GPS receiver to determine their location on earth. Four GPS satellite signals are used to compute positions in three dimensions and the time offset in the receiver clock. The system was designed so that receivers did not require atomic clocks, and so could be made small and inexpensively. The GPS system consists of three pieces. There are the satellites that transmit the position information, there are the ground stations that are used to control the satellites and update the information, and finally there is the receiver that you purchased. It is the receiver that collects data from the satellites and computes its location anywhere in the world based on information it gets from the satellites. There is a popular misconception that a gps receiver somehow sends information to the satellites but this is not true, it only receives data.

III. TRACKING OF THE SYSTEM3.1 GPS TRACKING GPS tracking unit is a device that uses the Global Positioning System to determine the precise location of a vehicle, person, or other asset to which it is attached and to record the position of the asset at regular intervals. The recorded location data can be stored within the tracking unit, or it may be transmitted to a central location data base, or internet-connected computer, using a cellular (GPRS, SMS), radio, or satellite modem embedded in the unit. This allows the asset's location to be displayed against a map backdrop either in real time or when analyzing the track later, using customized software.It is a fitted on the vehicle (car, bus, truck).The whole controlling of the device is done by the mobile phone which provide wireless connection between the VTS device and the user. The VTS device has a sim slot in which a GSM SIM is fitted to receive and transmit SMS. The user can sending a SMS through its mobile phone, know the position of its vehicle and the system also provide the facility to protect the vehicle. So for the understanding the whole operation of VTS device, we can divide the whole working in the two part1.Tracking the location of vehicle2. To provide protection of vehicleThe VTS consist of GPS receiver which provide real time location of vehicle. This real time datais store in MMC after a set time interval by the MCU. GSM module directly connected to the MCU which is use to send and receive the SMS. GSM module take the data from the MMC and send this data to the user mobile phone. This data consist of longitude, latitude, altitude, speed over ground, course over ground, real time and date. By using Google maps we can find the exact location of vehicle.The VTS also has another special feature which provides not only the location of vehicle but also protection of vehicle. To know the location of vehicle, it is important to stop the vehicle as soon as possible. For the recovery of vehicle, we are using to relays in the circuit in which one are connected to the buzzer and other is connected to the power supply of the engine of vehicle. User can simply by sending a SMS from mobile, disable the engine of vehicle and we can recover the vehicle very soon.

3.2 BLOCK DIAGRAM OF VEHICLE TRACKING SYSTEM

CIRCUIT DIAGRAM

3.3 Working Of Vehicle Tracking System In this Project it is proposed to design an embedded system which is used for tracking and positioning of any vehicle by using Global Positioning System (GPS) and Global system for mobile communication (GSM).In this project PIC series microcontroller is used for interfacing to various hardware peripherals. The current design is an embedded application, which will continuously monitor a moving Vehicle and report the status of the Vehicle on demand. For doing so an PIC series18F452 microcontroller is interfaced serially to a GSM Modem and GPS Receiver. A GSM modem is used 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. The same data is sent to the mobile at the other end from where the position of the vehicle is demanded. An EEPROM is used to store the mobile number. 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.The project is vehicle positioning and navigation system we can locate the vehicle around the globe with micro controller, GPS receiver, GSM modem, EEPROM. Microcontroller used is PIC18F452. 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 microcontroller. GPS always transmits the data and GSM transmits and receive the data. GPS pin TX is connected to microcontroller via connector. GSM pins TX and RX are connected to microcontroller serial ports.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 18F452, where these are processed and forwarded to GSM. 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 57600 .GSM is a Global system for mobile communication in this project it acts as a SMS Receiver and SMS sender. EEPROM is an Electrically Erasable read only memory which stores is used to store the mobile number. The power is supplied to components like GSM, GPS and Micro control circuitry using a 12V/3.2A battery .GSM requires 12v,GPS and microcontroller requires 5v .with the help of regulators we regulate the power between three components. As shown in circuit diagram the microcontroller is the key part of VTS, Crystal oscillator is used in the circuit to initiate the microcontroller with the frequency of 10Mhz.A microcontroller use for providing proper interfacing between the GPS & GSM module. A common voltage of 4 voltage is given to all component of the circuit. Here AC to DC converter circuit is used which comprises of an IC-LN2576. It changes 12V DC supply to 4 V. Circuit diagram uses many LEDs(Light Emitting Diode) for indication purpose. When we switch on of our circuit network LED blink fastly for searching network. When it get network its blinking time period increases. After network is found , Now gsm module LED start blinking to search ,after that gps module LED start blinking, after that mmc LED start blinking i.e. data started to being logged in the mmc card ,after that sms LED start blinking and the circuit send message to the registeres mobile number which send latitude and longitude to the registered mobile number. Now as shown in the circuit some relays are used, there are two relays used in the circuit that works on +12v. It can support up to 50watt i.e. we can attached a device to it which can work safely within 50watt. On relay two LED are placed which is used to show the status of the relay ,i.e. when relay LED is glowing then relay is in working position , If LED is not glowing then relay is not working i.e. device attached to the device will not work. Now according to the circuit diagram microcontroller pin number 4 is used to initiate GSM module to pin number 12 There are certain command which are used by the subscriber for receiving the location of position and for changing the setting. The EEPROM is used to store the commands sends by a subscriber. Commons sends by mobile are received by GPS. These data are reached to the EEPROM by the help of microcontroller. At the time of changing the commands the old data are erased and new one save. As shown in fig. microcontroller pin no.5 ic connected to the GSM module serially, to the power key of the GSM module. And microcontroller is connected to GPS module by pin no.7. Register is used in this circuit for voltage drop and capcitor is used for blocking of AC current..When GSM is initiate it firstly check the status of the module, now after that GSM transmitter ,receiver serially interfaced with microcontroller transmitter ,receiver. In GSM DCE is used as a client and DTE is used as a terminal, DCE-DTE are connected to the following signal.There are two ports used,1. Serial port 12. Serial port 2GSM and GPS module is used here can be switched off due to the insufficient supply of voltages so for that in GPS V-BAT pin is used,and in GSM BACK_UP key is used. The four pins of microcontroller RB5,RB4,RB7,RA0,RA1, represent four LED which glows during the working of the circuit. The first LED represents MMC LED if it is glowing data is stored in MMC card. second LED represent GPS data .If it is blinking fastly then GPS module searching for its service, third LED represent SMS SEND LED. Its blinking shows SMS is sent by GSM module to the registered mobile number and GPRS SEND LED blinking represents that GSM module is searching for its service provider. With GSM module SIM is interface with pin number 6,7,8,9.With pin number 9 VSIM which means power is supplied to the SIM card.GSM module pins SIM_RESET,SIM_CLOCK,SIM_DATA is interfaced with same SIM pins and one pin of the SIM is ground. Resistors are used between GSM module and SIM to block the excess current.With microcontroller MMC card is also interfaced. Pin number 44,43 represents data in and dataout pin which serially interfaced MMC data out and data in pins. MMC data out pin with also connected with EEPROM which is used to store commands. The difference between MMC card and EEPROM is that in MMC card latitude ,longitude which is sent by GSM module is stored while in EEPROM commands are saved.

RESULT

3.4 GSM AND GPS BASED VECHICLE LOCATION AND TRACKING SYSTEM

DescriptionPresent project is designed using 8051 microcontroller in this Project it is proposed to design an embedded system which is used for tracking and positioning of any vehicle by using Global Positioning System (GPS) and Global system for mobile communication (GSM). In this project AT89S52 microcontroller is used for interfacing to various hardware peripherals. The current design is an embedded application, which will continuously monitor a moving Vehicle and report the status of the Vehicle on demand. For doing so an AT89S52 microcontroller is interfaced serially to a GSM Modem and GPS Receiver. A GSM modem is used 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 NMEA data coming out is read and displayed on to the LCD. The same data is sent to the mobile at the other end from where the position of the vehicle is demanded. An EEPROM is used to store the mobile number. The hardware interfaces to microcontroller are LCD display, GSM modem and GPS Receiver. The design uses RS-232 protocol for serial communication between the modems and the microcontroller. A serial driver IC is used for converting TTL voltage levels to RS-232 voltage levels .In the main they are easy to steal, and the average motorist has very little knowledge of what it is all about. To avoid this kind of steal we are going to implement this project which provides more security to the vehicle. 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 from this information we can track our vehicles.

3.5 APPLICATIONS AND ADVANTAGES

APPLICATIONS Stolen vehicle recovery . Field sevice management. It is used for food delivery and car rental companies.

ADVANTAGES: It provides more security than other system. From the remote place we can access the system. By this we can position the vehicle in exact place.

IV. TECHNOLOGY

4.1 GPS Technology The Global Positioning System (GPS) is a satellite-based navigation system consists of a network of 24 satellites located into orbit. The system provides essential information to military, civil and commercial users around the world and which is freely accessible to anyone with a GPS receiver. GPS works in any weather circumstances at anywhere in the world. Normally no subscription fees or system charges to utilize GPS. A GPS receiver must be locked on to the signal of at least three satellites to estimate 2D position (latitude and longitude) and track movement. With four or more satellites in sight, the receiver can determine the user's 3D position (latitude, longitude and altitude). Once the vehicle position has been determined, the GPS unit can determine other information like, speed, distance to destination, time and other. GPS receiver is used for this research work to detect the vehicle location and provide information to responsible person through GSM technology.

GSM MODULE

4.2 GSM MODEM

The GSM modem is a specialized type of modem which accepts a SIM card operates on a subscribers mobile number over a network, just like a cellular phone. It is a cell phone without display. Modem sim300 is a triband GSM/GPRS engine that works on EGSM900MHz, DCS1800MHz and PCS1900MHz frequencies.GSM Modem is RS232-logic level compatible, i.e., it takes-3v to -15v as logic high and +3v to +15 as logic low.MAX232 is used to convert TTL into RS232 logic level converter used between the microcontroller and the GSM board. The signal at pin 11 of the microcontroller is sent to the GSM modem through pin 11 of max232.this signal is received at pin2 (RX) of the GSM modem. The GSM modem transmits the signal from pin3 (TX) to the microcontroller through MAX232, which is received at pin 10 of IC1 [9].

Features of GSM Single supply voltage 3.2v-4.5v Typical power consumption in SLEEP Mode: 2.5mA. SIM300 tri-band MT,MO,CB, text and PDU mode, SMS storage: SIM card Supported SIM Card :1.8V,3V

GSM MODEM CIRCUIT DIAGRAM

4.3 THE GSM NETWORK:

GSM provides recommendations, not requirements. The GSM specifications define the functions and interface requirements in detail but do not address the hardware. The reason for this is to limit the designers as little as possible but still to make it possible for the operators to buy equipment from different suppliers. The GSM network is divided into three major systems: the switching system (SS), the base station system (BSS), and the operation and support system (OSS).

Fig 3.GSM Network Elements

The operations and maintenance center (OMC) is connected to all equipment in the switching system and to the BSC. The implementation of OMC is called the operation and support system (OSS). The OSS is the functional entity from which the network operator monitors and controls the system. The purpose of OSS is to offer the customer cost-effective support for centralized, regional, and local operational and maintenance activities that are required for a GSM network. An important function of OSS is to provide a network overview and support the maintenance activities of different operation and maintenance organizations

SPECIFICATIONS AND CHARACTERISTICS FOR GSM

The specifications and characteristics for GSM Frequency bandThe frequency range specified for GSM is 1,850 to 1,990 MHz (mobile station to base station). Duplex distanceThe duplex distance is 80 MHz. Duplex distance is the distance between the uplink and downlink frequencies. A channel has two frequencies, 80 MHz apart. Channel separationThe separation between adjacent carrier frequencies. In GSM, this is 200 kHz. ModulationModulation is the process of sending a signal by changing the characteristics of a carrier frequency. This is done in GSM via Gaussian minimum shift keying (GMSK). Transmission rateGSM is a digital system with an over-the-air bit rate of 270 kbps.

4.4 Debugging and Testing Process A microcontroller-based system is a complex activity that involves hardware and software interfacing with the external world. Doing well design of a microcontroller-based system requires skills to use the variety of debugging and testing tools available. The debugging and testing of microcontroller-based systems divided into two groups: software-only tools and software-hardware tools. Software-only tools come as monitors and simulators, which are independent of the hardware under development. Software-hardware tools are usually hardware dependent, more expensive and range from in-circuit emulators and in-circuit simulators to in-circuit debuggers. In general, the higher the level of integration with the target hardware, the greater the benefit of a tool, resulting in a shorter development time, but the greater the cost as well. The factors to consider when choosing a debugging tool are cost, ease of use and the features offered during the debugging process. A software simulator is a computer program running on an independent hardware and it simulates the CPU, the instruction set and the I/O of the target microcontroller. Simulators offer the lowest-cost development tools for microcontroller-based systems and most companies offer their simulator programs free of charge. The user program operated in a simulated environment where the user can insert breakpoints within the code to stop the code and then analyze the internal registers and memory, display and change the values of program variables and so on. Incorrect logic or errors in computations can analyze by stepping through the code in simulation. Simulators run at speeds 100 to 1000 times slower than the actual micro controller hardware and, thus, long time delays should avoid when simulating a program. Micro controller-based systems usually have interfaces to various external devices such as motors, I/O ports, timers, A/D converters, displays, push buttons, sensors and signal generators, which are usually difficult to simulate. Some advanced simulators, such as the Proteus from Labcenter Electronics allow the simulation of various peripheral devices such as motors, LCDs, 7-segment displays and keyboards, and users can create new peripheral devices. Inputs to the simulator can come from files that may store complex digital I/O signals and waveforms. Outputs can be as form of digital data or waveforms, usually stored in a file, or displayed on a screen. Some simulators accept only the assembly language of the target microcontroller. Most of the microcontroller software has written a high-level language such as C, Pascal or Basic, and it has become necessary to simulate a program has written in a high-level language. The software program has written in c or assembly language and compiled using Keil software. After compiler operation, the hex code generated and stored in the computer. The hex code of the program should be loaded into the AT89C52 by using Top win Universal programmer.

V. DESIGN OF IN-VEHICLE UNIT

In-Vehicle unit is designed using OEM module Telit GM862-GPS GSM/GPRS modem and microcontroller PIC18F248 manufactured by Microchip. Figure 1 shows the block diagram of In-Vehicle unit

Fig. 1 Vehicle Unit Block diagram.GPS antenna receives signals from GPS satellites and it must face towards sky for correct computation of the current location by GPS receiver. Location data is transferred to microcontroller through serial interface. After processing of the data provided by GPS receiver, microcontroller transmits this information to remote location using GSM/GPRS modem. Microcontroller controls the operation of GSM/GPRS modem through serial interface using ATcommands. External GSM antenna is required by the GSM/GPRS modem for reliable transmission and receiving of data. When modem receives any command sent by tracking server, it passes this information to microcontroller which analyses received information and performs action accordingly (i.e. turns on/off ignition of vehicle, transmits current location, restarts GPS receiver, restarts whole system etc). Some of microcontroller I/O ports are connected to vehicle ignition on/off circuitry and door status output of vehicle. Information packet sent to server also contains status information of these I/O ports.

5.1 GM862-GPS Interface Board DesignFirst step in circuit design of In-Vehicle unit is to design interfacing circuit for Telit GM862-GPS so that it can be interfaced with microcontroller. Telit GM862-GPS is provided of the following interfaces: GSM Antenna Connector Board to Board Interface Connector SIM Card Reader GPS Antenna ConnectorGSM, GPS antennas and SIM card are not important from design point of view as they can be just installed into connectors. Only important is board to board interface connector which provides interface for external devices to the modem.

5.2Vehicle UnitThis is major part of the system and it will be installed into the vehicle. It is responsible for capturing the following information for the vehicle Current location of vehicle Speed of vehicle Door open/close status Ignition on/off statusIn-vehicle unit is also responsible for transmitting this information to Tracking Server located anywhere in the world. To achieve all these functionalities In-Vehicle unit uses following modules.GPS Receiver

In-Vehicle unit uses GPS receiver to capture the current location and vehicle speed. Location and speed data provided by GPS is not in human understandable format. This raw data needs to be processed to convert it into useful information that can be displayed by a beacon on the map. CPU is required to process this raw data. SiRF Star III single-chip GPS receiver is used which comes integrated with GM862- GPS which is GSM/GPRS modem used for data transmission. GPS receiver can also provide information of altitude, time of GPS fix, status of GPS fix, and number of satellite used to compute current location information along with location and speed. GPS fix means last reported location. For tracking purpose only location and speed data is required for transmission. Other data provided by GPS receiver is used to determine the validity of location information.

5.3 Central Processing UnitThe raw data provided by the GPS receiver is captured by the CPU and processed to extract the required location and speed information CPU is also responsible for monitoring the door/open close status of vehicle and controlling the ignition on/off status of the vehicle. CPU holds all the required information that is to be transmitted to remote server. It also controls data transmission module to exchange information with remote server. It actually acts as a bridge between GPS receiver, vehicle and remote server. It receives commands sent by server through data transmission/receiving module and performs corresponding action required by server. As the processing required in the In-vehicle unit is not computationally intensive therefore any low end microcontroller can be used as a CPU. The microcontroller selected to serve as CPU for In-vehicle unit is Microchips PIC18F248. This is 8-bit microcontroller and runs at speed of 20 MHz which is enough speed for the system.

5.4 Data TransceiverWhen all required information is extracted and processed,it needs to be transmitted to a remote Tracking Server which will be able to display this information to the end user. For real time tracking of vehicle, reliable data transmission to remote server is very important. Wireless network is required to transmit vehicle information to remote server. Existing GSM network is selected to transmit vehicle information to remote server because of broad coverage of GSM network. It is also cost effective rather than to deploy own network for transmission of vehicle information. For data transmission over GSM network GSM modem is required. GSM modem can send and receive data SMS text messages and GPRS data over GSM network. GM862-GPS GSM/GPRS modem is selected to transmit data over GSM network because of its features and capabilities. GM862-GPS provides AT commands interface i.e. all functions can be accessed by use of AT commands. AT commands can be sent to it using serial interface. It has built in UART that accepts the AT commands and modem performs the function as required by AT command received

VI. VEHICLE UNIT SOFTWARE DESIGN

Microcontroller is acting as Central Processing Unit for In- Vehicle unit. All operations of the In-Vehicle unit are to be controlled by the microcontroller. Microcontroller needs instructions to operate the whole system. These instructions are provided to microcontroller by writing the software into microcontrollers flash memory. It reads the software instruction by instruction and performs the action as required by instruction. Complete software is broken down into smallmodules as shown by the Figure 2.

Fig. 2 Breakdown of In-Vehicle software

All these modules are implemented as subroutines in the software. Each subroutine performs series of its designated tasks. Flow chart of each subroutine is described below.

6.1 Subroutine- Send AT Command

This subroutine is the basic routine which handles all the communication with GM82-GPS. This routine accepts the string containing AT command input in its parameters and sends this string character by character to module. GM862-GPS accepts carriage return (\r) as a command terminating character. As this character is received it sends back the response to microcontroller.

Figure 3 shows the flowchart

As shown in the flow chart routine checks each character of string, if the character is not null, it will check the transmit buffer contents. If transmit buffer is empty it will write new character into the buffer. Transmit buffer is a hardware register of UART. As soon as a 8-bit data is written into the transmit buffer, UART hardware transmits that character at the specified baud rate. Each character of command string will be sent in this way. When null character is found, it specifies end of string and routine terminates by sending carriage return to the module. Response received from the module will be handled in another subroutine.6.2 Subroutine- StartupStartup routine is executed only when device is powered on. It initializes all hardware of the In-Vehicle unit and configures GM862-GPS. It performs various tests to ensure the GM862-GPS is working properly and is ready to use. Figure 4 shows the flowchart.

Fig. 4 Flow chart of startup subroutine

As shown in the flowchart subroutine starts with initializing peripherals of the microcontroller. All peripherals in use need to be initialized in this step. After initializations All commands sent to module are sent using this subroutine. If the device responds with OK, it means microcontroller can communicate with module. If device doesnt respond after expiration of timeout routine is restarted. If problem persists definitely something in hardware is damaged. After receiving OK response from module various parameters of module need to be initialized. SIM presence is checked by sending command AT+CPIN? If device responds with +CPIN: READY message, SIM is ready to use. Any other response message will be considered be sent over network. If any other response is received module keeps on checking for network status until it connects to network. Once it makes sure that module is connected to network, subroutine is terminated.

6.3 Subroutine- Read GPS Data

GPS controller is by default powered on when module is switched on. Figure 5 shows the flow chart for Read GPS Data subroutine. As shown in the flow chart subroutine first of all checks whether GPS controller is powered on? To check this AT$GPSP? is sent to the module. If it responds with $GPSP: 0 it is not powered up. If it is not already powered up; it can be switched on by sending AT$GPSP=1. Once GPS controller is powered up location information can be read from it by sending AT$GPSACP. The module responds with a long NMEA sentence. The information of interest is latitude, longitude, speed, number of satellites used in calculating latitude and longitude. This information is extracted from the received response and saved in formatted string. This string can be later on passed to Send SMS subroutine to send it to remotely located Tracking Server.

Fig. 5 Flow chart of subroutine Read GPS Data

6.4 Subroutine- Send SMS

This subroutine accepts message string as input parameter which needs to be transmitted. Subroutine adds a terminating character Ctrl-Z at the end of message string as shown in the Figure 6 Then it checks whether module is in Text SMS mode. It can be checked by sending command AT+CMGF? If module responds with +CMGF: 0 it is in PDU mode. Mode can be changed to text by sending command AT+CMGF=1. To send an SMS module requires destination phone number that is sent to module using command AT+CMGS= da where da represents the destination phone number. This phone number will be read from microcontroller internal memory which is stored during programming. After sending destination number module waits for prompt >. When prompt appears message string is sent using Send AT Command subroutine. If message sent successfully, module responds with +CMGS: where mr is message reference number. If any error occurs subroutine tries to resend the message until it is successfully sent.

Fig. 6 Flow chart of subroutine Send SMS

6.5 Subroutine- SMS configuration

SMS configuration subroutine is call after startup routine. It is basically called once after powering up the In-Vehicle unit like startup routine. SMS Configuration It can be part of startup routine but it is separated because it does configuration of the module related to SMS only. Figure 7 shows the flow chart.This subroutine checks the SMS service centre number by sending the command AT+CSCA? Service centre number is required because SMS is routed to destination via SMS service centre.The module responds with +CSCA: number. If no number is present it can be saved in module by sending the command AT+CSCA= number, type type could be 145 if number is in international number format (i.e. it begins with +) or it could be 129 if number is in national format. When new message is received by module an unsolicited indication is generated. This indication may be sent to microcontroller, buffered if microcontroller is busy or discarded. In this case new message must be immediately sent to microcontroller or buffered if microcontroller is busy. This configuration can be done by sending command AT+CNMI=1, 1, 0, 0, 0 when GSM modem receives a new message it will send +CMTI: SM, message index no where message index no is location of message in memory and it can be then read by sending command AT+CMGR=message index no. After configuring new message behavior module is set to Text mode for SMS. It can be done by sending command AT+CMGF=1. All configuration related to SMS is finished and subroutine terminates. .Fig 7 Flow chart of SMS configuration

6.6 Subroutine- Configure GPRS

. Fig. 8 Flow chart of subroutine configure GPRS

When GPRS service is available, it is cost effective and more efficient to transmit vehicle information through GPRS. In order to connect to GPRS, it needs to be configured. Figure 8 shows the steps required to configure the GMS module for GPRS data transmission. First step in configuration of GPRS is to define GPRS context. It is set of information to identify the internet entry point interface provided by the ISP. With these parameters the GPRS network identifies the ISP to be used to gain access to the internet and defines the value of IP address of the GPRS device once connected. Fig. 8 Flow chart of subroutine configure GPRS The command sent for defining GPRS context is AT+CGDCONT=1, IP, payandgo.o2.co.uk, 0.0.0.0, 0, 0. First parameters is context id, it is possible to define up to 5 contexts. Next parameter is protocol used for communication, third parameter is APN assigned by network server provider. In next step subroutine sets the parameters for Quality of service. Commands used are AT+CGQMIN= 1,0,0,0,0,0 and AT+CGREQ=1,0,0,3,0,0. These parameters are recommended by manufacturer of the GSM module. Along with APN network service provider also provides user name and password to connect to ISP. Next step is to set user name and password for current GPRS context. Commands used are AT#USERID=payandgo and AT#PASSW=password. Next step configures the TCP/IP stack. It basically sets the minimum packet size, data sending timeout and socket inactivity timeout. Command used for configuring TCP/IP stack is AT#SCFG=1,1,140,30,300,100. First parameter of command is connection identifier; next parameter is context identifier for which stack is being configured. 300 is the minimum number of bytes that will be sent in one packet. Next parameters are inactivity timeout, connection timeout, and data sending timeout. Next step of the subroutine is configures the firewall settings. It allows certain computers to connect to module. In this case server IP address will be provided to firewall so that Tracking server can connect to In-Vehicle unit. Command used for firewall settings is AT#FRWL=1,server ip, subnet mask. Server IP address will be the IP address of Tracking server and subnet mask can be provided to allow access to range of computers. Last step is activate current GPRS context. Command is AT#SGACT=1, 1. First parameter is context id to be activated and next parameter is status i.e. 1 for activation and 0 for deactivation.

6.7 Subroutine-Send Information Using GPRS

When In-Vehicle unit is configured to send information using GPRS, all activities of In-Vehicle unit are controlled by this subroutine. Fig. 9 Flow chart of subroutine Send Information using GPRS Figure 9 shows the flowchart for this subroutine. In order to send data over IP network application needs an interface to physical layer. This interface is named as socket. This subroutine starts with opening socket for currently configured TCP/IP stack. Command used to open socket for configured embedded TCP/IP stack is AT#SD=1, 1, 6534. First parameter is connection identifier of TCP/IP stack, 2nd is protocol i.e. 0 for TCP and 1 for UDP. Next two parameters are port number and IP address/host name of Tracking server respectively. If command returns the response CONNECT; connection is accepted. Data can be sent now. After getting connection, socket is suspended using escape sequence +++ to bring module in command mode. Socket remains connected while it is suspended. When GPRS connection is alive, module cant accept AT commands and GPS data cant be read from module. Once module is in command mode this subroutine calls the routine Read GPS data which provides the information string that is to be sent to Tracking Server.

Fig. 9 Flow chart of subroutine Send Information using GPRS

Next step is to read I/O ports of microcontroller to get vehicles door and ignition status. Information string received from Read GPS data subroutine is appended with status of I/O ports. Socket connection is resumed and information is sent to Tracking server on this socket. If In-Vehicle unit is configured for continuous transmission of vehicle information after regular intervals, all above steps are repeated otherwise module waits for incoming requests from Tracking server. If location request is received above steps are repeated and if any other command is sent by the server according action is taken. Server can send request for vehicle shutdown, changing the data transmission from GPRS to SMS or changing the continuous transmission to polling or vice versa, restart the In-Vehicle unit. This subroutine ends only when In-Vehicle unit is restarted by Tracking server.

6.8 Main Routine of In-Vehicle Unit

Main routine just calls the subroutines described in previous sections. With start of main routine call is made to Startup routine that initializes all peripheral and In-Vehicle unit configurations. It checks for stored configuration to decide whether data transmission should be through GPRS orSMS. If configuration says for GPRS, call is made to GPRS configuration routine and then GPRS data sending routine is run. If configuration is for SMS, configuration is done and In-Vehicle unit starts sending the vehicle information to Tracking server via SMS either continuously after regular intervals or it waits for commands from Tracking server as SMS. GM862-GPS is configured in such way that whenever new SMS arrives, and indication is received by microcontroller with message identifier. This message is read by microcontroller and corresponding action is performed as shown in Figure 10. All subroutines are implemented in C language. Compiler used to generate machine language code for PIC18F248 is CCS PICC.

Fig. 10 Flow chart of Main program

VII. TRACKING SERVER

Tracking server maintains all information received from all In-Vehicle units installed in different vehicles into a central database. This database is accessible from internet to authorized users through a web interface. Authorized users can track their vehicle and view all previous information stored in database. Tracking server has a GSM/GPRS modem attached to it that receives SMS from In-Vehicle units and sends those messages to the server through serial port. Tracking server saves this information into database.

Design of Tracking Server is partitioned into four major parts.(i) Hardware design for GSM/GPRS Modem (GM862-GPS)(ii) Communication Software for GM862-GPS(iii) Database(iv) Web Interface

7.1 Web Interface Design As described in previous section Tracking Server maintains all information in a database. To display this information to end users front end software is required that can display all information to the end user. End user is the user of system who has installed the In-Vehicle unit in his vehicle and also the administrator of the system who is managing Vehicle Tracking System. There may be a number of vehicles installed with In-Vehicle units therefore server must be able to manage and distinguish information sent by all In-Vehicle units. For this purpose information must be available to server about all vehicles that are installed with In-Vehicle units.Whenever In-Vehicle unit is installed, information about that vehicle is stored in the database. Web interface must also support this functionality. Since web interface will be accessible over the internet therefore access must be restricted to authorized users only. Therefore information about all users of the system must be stored in database.

7.2 Database Design Database is designed to store all received vehicle information, information about In-Vehicle units and users of the system. Information to be stored in the database is Information about users of the system Information about vehicles Information about received from vehicles 7.3 GM862-GPS Interface Board for Tracking ServerGM862-GPS is GSM/GPRS modem that was used in In-Vehicle unit. The same modem is used on server side to exchange information with In-Vehicle units through SMS. Vehicle information sent using SMS on GSM network is received by this modem. Tracking server can also send commands for In-Vehicle units using this modem. Same interface board is used on this side. GM862-GPS interface board is connected to the serial (COM) port of server. Server can communicate with modem using AT commands. To send and receive data using this modem a software is required that can send AT commands to module.

7.4 Design of Communication Software for GM862-GPSThe software that is to be designed will provide communication interface to the GM862-GPS modem attached to computers serial port. It will control the operations of GM862-GPS. This software must be able to support following functions Configuration of GM862-GPS for sending and receiving SMS Receiving the SMS. Processing received SMS and saving information into database Sending SMS to in vehicle unit as required by user Accepting TCP/IP connections from In-Vehicle units Exchanging information with In-Vehicle units through internetGM862-GPS will be configured in such a way that whenever new SMS arrives, GM862-GPS will send the information about SMS to the serial port. Software will be listening at serial port; it will read the SMS from GM862-GPS memory and extract the information from SMS. After extracting the information SMS will be deleted from GM862-GPS by software and information will be written to the database. Design requirements suggest that following objects are part of the system. GM862-GPS Modem Serial Port Vehicle Info TCP/IP Socket DatabaseThis analysis yields following classes in the system.

7.5 Data Flow

Fig. 11 Data flow of communication software

7.6 Software Flow

Figure 12 shows the flow chart of main program. Main program listens for SMS and handles all communication with In-Vehicle units using SMS. It creates a separate thread for listening to TCP/IP connections, which receives incoming connections from In-Vehicle units and creates separate thread for each incoming connection, which allows any number of In-Vehicle units to connect to server.

Fig. 12 Flowchart of communication software for GM862-GPS

VIII. SYSTEM TESTING AND RESULTS

System design needs to be verified by testing after integration of all components of the system. PCB designed for In-Vehicle unit and server side was assembled. After integrating all the components, system was tested.

8.1 Testing In-Vehicle Unit (SMS Configuration)

GM862-GPS interface board was connected to microcontroller board through a serial cable. Fig. 12 Flowchart of communication software for GM862-GPS Debugging serial port of In-Vehicle unit was connected to a laptops COM port to see the debugging messages printed by microcontroller on HyperTerminal during its operation. This laptop and debugging COM port is just for debugging purposes, in real time there is no need to connect laptop to In- Vehicle unit. After connecting the GSM antenna and GPS antenna to the In-Vehicle unit system was powered on. Following logs of microcontroller operation were captured from HyperTerminal

.Fig. 13 Results of execution of Startup routine

When In-Vehicle unit is powered on it executes Startup routine. It first reads and displays the existing configuration of the system. In next step microcontroller is configuring the GM862-GPS. It first tests the communication interface by sending AT command. GM862-GPS responded with OK message which shows that interface is working. +CPIN: READY response shows that SIM card is ready and +CREG: 0, 1 response shows that module is connected to network.

Fig. 14 Results of execution of SMS Configure routine

8.2 Testing Tracking ServerIn order to test server, laptop was configured to act as a server. GM862-GPS COM was connected to COM port of laptop. Apache server was run on laptop to make it act like server. My SQL DBMS was installed. After running the Communication software for GM862-GPS following results were observed.

Fig. 15 Logs of Tracking Server

8.3 Web Interface Testing

Since server is setup on the local machine. Website was opened in internet explorer. After logging to the website it displayed the page as shown in Figure.

Fig. 16 Pointing out current location of vehicle

CONCLUSION

The results presented in this paper contain execution of Startup routine, execution of SMS Configure routine, Logs of Tracking Server and Pointing out current location of vehicle. For vehicle tracking in real time, in-vehicle unit and a tracking server is used. The information is transmitted to Tracking server using GSM/GPRS modem on GSM network by using SMS or using direct TCP/IP connection with Tracking server through GPRS. Tracking server also has GSM/GPRS modem that receives vehicle location information via GSM network and stores this information in database. This information is available to authorized users of the system via website over the internet. Currently In-Vehicle unit was implemented with two boards. Microcontroller board was externally connected to GM862-GPS interface board. Single board can be designed to incorporate Microcontroller circuitry on the GM862-GPS interface board. It will reduce the overall size of In-Vehicle unit and it will also reduce the number of components so will the cost.

REFERENCES

[1]. G. T. French (1996) Understanding the GPS. 1st Edition. Bethesda, Geo Research Inc.[2]. J.B. TSUI (2000) Fundamentals of Global Positioning System Receivers. 1st Edition. John Willey & Sons Inc.[3]. GPS Images[online:]http://www.gpsvehiclenavigation.com/GPS/images.php[4]. R. Parsad, M. Ruggieri (2005) Applied Satellite Navigation Using GPS, GALILEO, and Augmentation Systems. London, ARTECHHOUSE.[5]. R. Steel et al (2001) GSM, cdmaOne and 3G Systems. Chichester, John Willey & Sons Inc.[6]. T. Halonen et al (2003) GSM, GPRS and EDGE Performance. 2nd Edition. Chichester, John Willey & Sons Ltd.[7]. GPRS ( General Packet Radio Service), HSCSD & EDGE[online:]http://www.mobile-phones-uk.org.uk/gprs.htm[8]. Telit Wireless Solutions (2008) GM862-GPS Modem[9]. Microchip (2007) PIC18FXX8 Datasheet[10]. Transportation District's Automatic Vehicle Location System[online:]http://www.itsdocs.fhwa.dot.gov//JPODOCS/REPTS_TE/13589.htm l[11]. Vehicle Tracking Systems Overview [Online:]http://www.roseindia.net/technology/vehicletracking/ VehicleTrackingSystems.shtml[12]. Telit Wireless Solutions (2007) GM862-GPS Hardware user guide. 1vv0300728 Rev. 8 - 20/09/07