0% found this document useful (0 votes)
59 views

GTS: GPS Tracking System

The document is a design document for a GPS Tracking System (GTS) intended to aid in the recovery of stolen vehicles. The GTS will monitor a vehicle's installed car alarm to detect theft and then use an onboard GPS and GSM cellular modem to automatically notify the vehicle owner of the theft and provide location information. Tests show the prototype detects the car alarm, notifies the owner's PC, and sends location and phone calls to the owner. The design aims to allow vehicle recovery without monthly fees by enabling owners to track their own vehicles if stolen.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

GTS: GPS Tracking System

The document is a design document for a GPS Tracking System (GTS) intended to aid in the recovery of stolen vehicles. The GTS will monitor a vehicle's installed car alarm to detect theft and then use an onboard GPS and GSM cellular modem to automatically notify the vehicle owner of the theft and provide location information. Tests show the prototype detects the car alarm, notifies the owner's PC, and sends location and phone calls to the owner. The design aims to allow vehicle recovery without monthly fees by enabling owners to track their own vehicles if stolen.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Design document for:

GTS: GPS Tracking System


Submitted to Dr. Joseph Picone ECE4532 ECE Senior Design I Department of Electrical and Computer Engineering Mississippi State University Mississippi State, Mississippi 39762 December 4, 2003

Submitted by: H. McDonald, M. Lee Faculty Advisor: Dr. Robert Reese Department of Electrical and Computer Engineering Mississippi State University Mississippi State, Mississippi 39762 Email: {hgm3, mal12}@msstate.edu

TABLE OF CONTENTS 1. PROBLEM 2. OBJECTIVES... 2.1 Size, Weight, Color, and Mounting. 2.2 Power Supply, Sleep Mode, Battery Backup 2.3 Communication. 2.4 I/O Ports. 2.5 Software. 3. APPROACH. 3.1 Hardware Components 3.2 Software Components. 4. TEST SPECIFICATION.. 4.1 Test Equipment and Software 4.2 Unit Testing 4.3 System Testing. 5. TEST CERTIFICATION.. 5.1 Component Testing.. 5.2 System Testing. 6. SUMMARY AND FUTURE WORK... 7. ACKNOWLEDGMENTS. 8. REFERENCES. 1 2 3 3 3 3 4 4 4 12 14 15 15 19 22 22 24 25 26 26

EXECUTIVE SUMMARY Car theft is a crime that leaves the owner of a stolen vehicle in a seemingly helpless situation where they feel that all they can do is wait to see if they ever find out what has happened to their vehicle. Each year, approximately 1.2 million vehicles are stolen in the United States alone, with a recovery rate of approximately sixty-five percent [3]. The problem is that, once a vehicle is stolen, it can be hidden fairly easily and searching for a stolen vehicle can be time consuming since it could be moved over great distances. The GPS Tracking System (GTS) will greatly reduce the time it takes to locate a stolen vehicle by having it automatically report its position. In order to fulfill its role, the GTS must be able to report its position to the owner of the vehicle. It will be able to determine if it has been stolen, and if it does come to that conclusion then it will contact the owners PC to report its latitude and longitude and call the owners cellular phone. An analog comparator found on the microcontroller does the monitoring of the siren timers are used to determine how long the signals exist on the siren wires. Long signals are interpreted as a possible theft, while short signals are interpreted as the owner using the alarm remote. If the theft detection mechanism is bypassed during the theft of the vehicle, then GTS will still be useful in the recovery of the vehicle by allowing the owner to poll it for its current location. In order to detect that the vehicle has been stolen, it will require the use of a previously installed car alarm. It will monitor the activity of the car alarm siren to determine if it is being stolen, and it will be able to differentiate between the car alarm being armed, disarmed, or set off. The monitoring and controlling will be performed by an Atmel ATmega128, and will be replaced with the lower cost ATmega64 when it becomes available. If the alarm is set off and not disabled by the owners remote, it will begin tracking the vehicle with a Garmin GPS receiver. If the vehicle begins to move, then it will use a GSM cellular modem to report its position to the owner. Disabling the vehicle will be accomplished by opening a relay that will be used to remove power from the vehicles fuel pump. Tests show that we have a workable design. The device detects the car alarm and notifies the owners PC. It sends its location and calls the owners cellular phone. The device also currently has the capabilities to disable a car. The only major challenge left is reducing the cost of the design. The major reasons for the high cost are the GPS and modem. The rest of the design is very cheap. The thing that sets this design apart from other vehicle tracking solutions is that the owner can track their vehicle themselves without monthly fees, instead of paying a company to track it for them if it should be stolen. Owning a vehicle with an installed GTS not only will aid in the recovery if it is stolen, but it will also bring a peace of mind knowing that the recovery chances are also greater.

GTS: GPS TRACKING SYSTEM

PAGE 1 OF 30

1. PROBLEM Automobile theft protection devices have been around for approximately 30 years; most of these devices focus on deterring theft. However, a recent trend has been towards the recovery of stolen vehicles. There are now several products that aid in stolen vehicle recovery. These devices include vehicle identification numbers, window etching, steering wheel locks, brake and gas pedal locks, transmission locks, car alarm cut off switches, and police trackers. While many of these devices lower the chances of vehicle theft, few increase the odds of recovering a stolen vehicle. What is lacking in many of these devices is the ability to automatically contact the owner and report that the vehicle has been stolen, which makes vehicle recovery a tedious process as hidden vehicles are difficult to find. The GTS will fill this gap by monitoring the location of the vehicle and working in tandem with the cars pre-installed car alarm. Police agencies, insurance companies, and organizations such as Watch Your Car say that consumers should not rely on any one device for protection from car theft. In fact, most experts say that consumers should use more than two antitheft devices, but most consumers do not do this. Last year Cobra Vehicle Security and Nexo produced a device very similar to the GTS that works on the whole continent of Europe. This device has a GPS and can report the location of a car to a computer, which displays the cars location on a map. However, this device does not work in the United States and it does not use cellular technology. In the US, this idea is starting to catch on, but there is no product we are aware of that can function anywhere in the US. The largest competitor is LoJack Inc. which makes a product they named LoJack. LoJack is a device that is installed in a vehicle but is normally turned off. When the owner of the vehicle notices that their car has been stolen, they call LoJack Inc. and they enable the device and track the vehicle themselves. The major drawbacks to LoJack are that the time for the device to report its position can be as much as an hour, it doesnt automatically activate itself to report that its been stolen, it cant be transferred from one vehicle to another, and that it is only available in a few states and major cities. The GTS would be able to work in any area with cellular phone coverage, and as long as the vehicle is in a location covered with cellular service, the time to obtain its location would be only a couple minutes or less. It will require that it is installed in a vehicle that already has a car alarm installed for full functionality. If it does not have a car alarm to work with, the owner can still contact the GTS from their computer and disable the car, but the GTS will not automatically detect when the car has been stolen. The GTS will be able to be transferred from one automobile to another so long as the new vehicle has a car alarm, or it will again suffer the lack of automatic car theft detection. Compared to LoJack, there is a lot of interaction between the owner and the GTS. Although we realize that our product will not eliminate auto theft, it will have an impact on theft recovery. The chance of quick recovery of a vehicle with a GTS installed is higher than the chance of any recovery of a vehicle without any tracking systems installed. Since the GTS will be able to track a vehicle in motion, it will also increase the chances of the thief being caught, which could be of relief to the victim.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 2 OF 30

The GTS is not meant to be a theft deterrent, but instead a theft recovery device. It is well known that a proficient thief can disable or bypass nearly any car alarm and there is no reason to think that the GTS would be immune to such practices. Instead, the GTSs presence will remain hidden so that it can operate inconspicuously. This will allow the thief to be caught off guard since they will not even know that they are being tracked. To get around some of the practices that thieves use to disable a car alarm, the GTS will have its own battery backup. This is to prevent the thief from being able to disconnect the cars battery, then disabling the car alarm before attempting to steal the car. As soon as the battery is disconnected, the GTS will activate. Another method that thieves can use is just to cut the siren wires. If multiple sirens are installed, this may or may not set off the car alarm as it depends on the setup of the alarm. If it does set off the alarm and there are multiple sirens, then the GTS will activate if it is monitoring the alarm from one of the sirens that is still connected. However, if the car alarm is disabled before the GTS is able to detect that a theft is occurring, it will still be able to be contacted by the owner when they realize that their car is missing. 2. OBJECTIVES Our goal is to make a theft recovery device for an automobile that will automatically notify vehicle owner of the theft, allow for a quick recovery of the vehicle, and give the owner the option to temporarily disable the vehicle. To make this device, we will meet the following requirements: 1. Size: The brains of the device will be contained in a plastic or metal box measuring 4x6x3 inches. 2. Weight: The device will not weigh more than three pounds. 3. Color: The color of the plastic box will be black. 4. Mounting: The device will have four screw holes to attach the device to the car. 5. Power Source: The device will operate on a voltage to be supplied from the car of 9 to 16 volts [1]. 6. Sleep Mode: The device will use 3 watts of power in sleep mode. 7. Battery Backup: The device will have a self-contained optional battery backup. 8. Communication Port 1: This will be a serial port for communicating with a 2400 or 9600-baud cellular modem. 9. Communication Port 2: This will be a serial port for communicating with a GPS using standard NMEA 0183 (National Maritime Electronics Association) protocol.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 3 OF 30

10. Input Port: The device will have an input from the car alarms siren wire to monitor the car alarm. 11. Output Port: The device will connect to a relay outside of the box through a 5 Amp open drain circuit. 12. Software: The device will communicate with software on a personal computer so that it can be tracked and controlled. 2.1 Size, Weight, Color, and Mounting The device will be designed so that it can be easily hidden in an automobile. The size is small enough to allow for it to be hidden in small areas of the vehicle, such as a wheel well or under a seat, but will still allow for an optional battery backup to be kept inside of it. The black color will allow it to be hidden in dark areas of the car, such as in the dashboard or under a seat, without drawing too much attention to it. The relatively low weight will allow the device to be attached to a surface without putting much strain on it. It will also be small and light enough that the GTS can be installed simply through the use of zip ties if the installer does not wish to use screws to fasten it down. 2.2 Power Supply, Sleep Mode, and Battery Backup The GTS will operate off of the vehicles electrical system, and must be able to operate off of a power supply range of 9V to 16V [1]. For normal operation, the micro controller will shut off the GPS and put the modem and itself into a low power state and will consume 3 Watts of power. It will remain in this mode until it detects a signal on the car alarm siren wire or until it detects that the owner is attempting to contact it. At this time it will wake up the GPS and the modem. If the 12-volt car battery is disconnected, it will switch to its internal battery backup to continue functioning. 2.3 Communication The device will have two serial ports to communicate with the modem and the GPS. It will communicate with the GPS using the NMEA 0183 standard protocol that is used by many serial GPS receives today [2]. The GTS will need only a small amount of bandwidth to communicate with the owners personal computer. The communication with the computer will be less than 10 kilobytes per transfer, and while tracking the vehicle it will only attempt to transfer its location every 10 minutes. This makes the 2400-baud serial modem fast enough to handle the data without taking a long time to finish the transfer. 2.4 I/O Ports The device will have one input and one output port. The input port will be used to monitor the car alarms sirens. It will watch the signal on this wire and determine the behavior of the car alarm to be able to tell if its being enabled, disabled, or if it has been set off. The output of the

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 4 OF 30

device will be from a 5 Amp open drain transistor to connect to a relay to shut off the fuel supply by disabling the fuel pump. This output will be received from a signal sent from the personal computer and will require the security code to be entered at the computer. 2.5 Software The tracking software will require Windows 95 or better as an operating system, and run on a 300 MHz Pentium II or faster processor. The software will be used to program the device with a phone number and a security number. The phone number put in the device will be the number it calls when it detects the theft. The security number is used to verify that the owner or another authorized user is the one shutting off the vehicle through the fuel kill switch. The software will use a graphical interface and allow the user to see the location of the car on a map by placing a red dot at the cars approximate position. It will also allow the owner to poll the car for its position in case the device was unable to detect that the vehicle was stolen. 3. APPROACH The GTS will involve three major components that will allow it to determine its location as well as report that location to its owners computer. These components are a GPS receiver, a cellular modem, and a microcontroller. In addition to these components, a car alarm will be needed in order to automatically determine if the car has been stolen, as well as a power supply to run all of the GTS hardware. The microcontroller will monitor the activity on the siren wire of the alarm, and if it determines that it has been stolen, it will then activate the GPS receiver and obtain its location. If the car begins to move without the owner disabling the alarm then the GTS will activate the cellular modem and report its current position. 3.1 Hardware Components The hardware that will be discussed in the following sections includes the microcontroller, the GPS, and cellular modem, and the fuel cut system. In addition to the physical hardware discussion, the background and historical usage of each system component will be discussed. 3.1.1 Microcontroller The GTS will need to have a central location at which all of the information is processed. This includes information from the car alarm, the GPS, and the cellular modem. Several microcontrollers were considered, but the final choice was an Atmel ATmega128. This was the final choice for several reasons, but mainly because it contains two hardware UARTs as well as an analog comparator. Other features that will be taken advantage in this microcontroller include 128 kB of programmable flash for program space, 4 kB of SRAM, 4 kB of EEPROM, up to 16 MIPS at 16 MHz, and six different sleep modes [9]. The size of the flash is more than twice of what this project will require, so when the ATmega64 becomes available it will be used to replace the ATmega128. One of the two UARTs will be used to communication with the GPS receiver, the second UART will be used to communicate with the cellular modem, and the analog comparator will be used to

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 5 OF 30

monitor the car alarm. The communication with the GPS is done in standard NMEA 0183 ASCII strings and the communication with the modem is done with a more complex and proprietary packet data interface (PDI) format, though both devices are capable of transferring across a RS-232 interface. The ATmega128 is capable of using an internal oscillator to clock itself, but an external crystal will be used to ensure more accurate timing since timing is critical to asynchronous UART transmissions. The chosen frequency is 3.69 MHz as it is the highest frequency available on the Atmel development board used to build the prototype. It also allows for 0% timing error for 4800 and 9600 baud serial transmissions [11] that are the speeds used to communicate with the GPS and cellular modem. 3.1.2 GPS Receiver The GTS will be of little use to anyone if it cannot determine its location. A GPS receiver was chosen to be the device by which the GTS determines its location because of the availability of GPS receivers, virtually no maintenance costs, consistency of readings, and ease of use. The GPS satellite network is funded and controlled by the United States Department of Defense mainly for the military, though many civilians make use of the satellites themselves [4]. The GPS satellite system is made up of a network of 24 satellites that orbit the earth in such a way that the GPS receiver can obtain data from five to eight satellites at any given point [4]. Of these five to eight viewable satellites, only 4 are required to obtain a location, though a location can be estimated if fewer satellites are available due to some type of obstruction.

Figure 1: The GPS satellite network consists of 24 satellites

The GPS chosen for this project is the Garmin GPS25-LC. It has two RS-232 serial ports, operates at a voltage of 3.6V to 6.0V, and current consumption is 120 mA typical, 140 mA max, and 20 mA in power down. Powering down the GPS is accomplished by applying a 2.7V to 5.0V signal to the power down pin on the GPS. The pin-out of the GPS is shown in the following figure. The mating connector for the connector below is available from the JST corporation.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 6 OF 30

Figure 2: Pin-out of GPS data and power cable.

Communication from the GPS to the microcontroller is done through an RS-232 serial interface with no flow control at a baud rate of 4800 using pins 4 and 5. Pins 1 and 2 are electrically identical to pins 4 and 5. Pins 1, 2, 3, 7, 11, and 12 are not used in the GTS. The format of the serial transmission is in NMEA 0183 format, which is made up of ASCII strings starting with character $ and ending with a carriage return and line feed characters; these strings are called sentences. The sentences contain the location data that is required for the operation of the GTS and the data can be easily parsed out of the string. The sentences that the GPS transmit can be enabled or disabled by the microcontroller by sending a control sentence, $PGRMO,<sentence name>,<1=enable, 0=disable><cr+lf>, note that each field is delimitated with a comma. Discussion of sentences from here out will assume that carriage return and line feed characters are sent at the end of the string unless otherwise noted. All sentences can be disabled by sending $PGRMO,,2 to the GPS receiver. This allows for a large number of sentences to be disabled quickly. To enable the sending of location data, the sentence $PGRMO,GPGGA,1 is sent. Approximately every second, the GPS will return a sentence in the format of $GPGGA,164743,3329.0014,N,08849.3069,W,1,04,2.8,118.1,M, 29.2,M,,*7F and has a maximum sentence length of 82 characters including delimiters, $, carriage return, and linefeed. The example sentence from above can be broken down as follows: $GPGGA - Sentence identifier. GPGGA signifies the sentence is the Global Positioning System Fix Data sentence. 164743 UTC (Coordinated Universal Time) time of position fix. Before the GPS satellites are acquired, the onboard clock in the GPS receiver calculates this time. After the GPS satellites are acquired, the GPS calculates this time from information received from the satellites. 164743 translates to 4:47:43 PM Greenwich Mean Time, 5 hours ahead of Eastern Standard Time. 3329.0014,N Latitude. This translates to 33 degrees and 29.0014 minutes north. Leading zeros are transmitted.
December 3, 2003

ECE 4542

GTS: GPS TRACKING SYSTEM

PAGE 7 OF 30

08849.3069,W Longitude. This translates to 88 degrees and 49.306 minutes west. Leading zeros are transmitted. 1 GPS quality indication. 0 = fix not available, 1 = Non-differential GPS fix available, 2 = Differential GPS fix available, 6 = estimated. 04 Number of satellites in use. Leading zeros are transmitted. 2.8 Horizontal dilution of precision, 0.5 to 99.9. Leading zeros are not transmitted. 118.1 Antenna height above/below mean sea level, -9999.9 to 99999.9 meters. M This field is always M and does not change. -29.2 Geoidal height, -999.9 to 9999.9 meters. M This field is always M and does not change. NULL Differential GPS data in seconds since last TRCM transmission, NULL if DGPS is not available. NULL Differential Reference Station ID, 0000 to 1023. NULL if DGPS is not available. *7F Checksum byte. This field is sent by the GPS but it not required to be sent by the microcontroller and is a parity checksum.

The GPS responds to any valid sentences sent to it by echoing that sentence back to the microcontroller without the checksum byte. This allows for the microcontroller to check for the existence of the GPS receiver by sending the sentence $PGRMO,,0. If the GPS receiver is connected properly, it will return the sentence $PGRMO,,0 to the microcontroller. Note that this is normally used to disable other sentences, but since none are specified none are disabled. However, it is still a valid sentence so the GPS receiver will echo it back to the microcontroller.

Physically, the GPS receiver is small enough for our design requirements in section 2. Its measurements are shown in the figure to the left. The senor board is mounted using four screws, either #4 or M-3.

Figure 3: GPS sensor board physical dimensions.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 8 OF 30

The antenna for the GPS is the recommended GA27C. It has a cable of approximately eight feet of RG-174A/U with a MCX connecter to attach to the sensor board. 3.1.3 Cellular Modem One of the main problems that needed to be solved was the data link between the users computer and the device in their car. We decided to solve this problem by using a cellular modem. There are several advantages to using cellular modem technology. Most notably, the cellular modem does not require the user to purchase any additional equipment. Most computers already have a telephone modem when they are purchased, and that modem can be used to talk directly to the cellular modem in the device simply by dialing up the phone number. Also it was easier to develop the product because we did not have to design the communications equipment. A third advantage of using a cellular modem is that it is small, which makes it harder for a thief to find and defeat. The only draw back is that the user will probably have to pay a cellular service charge every month they want to be able to track their car. Fortunately, this service can be the cheapest plan offered by the company that provides the service because the device will not be used very often, communication links will have short duration, and if the users car is stolen, then the user would probably gladly pay for extra minutes to get their car back. The modem we chose for this product is the GSM SocketModem made by Multi-Tech. A picture of the modem is shown in figure to the right. This modem was chosen for three main reasons. The first reason is that is has small size. This makes the final product smaller, and therefore easier to conceal. The second reason is the packaging. The GSM SocketModem is designed to be incorporated into products that include vehicle tracking and has a simple hardware interface.

Figure 4: This is SocketModem. [12]

picture

of

the

GSM

The hardware interface for the GSM SocketModem operates entirely through CMOS inputs and outputs. Communication with the SocketModem is done through RS-232 type communication, though the voltage levels are CMOS compatible, 0v for a low, and 5v for a high. Because of these voltage levels the modem inputs can be directly driven by the microcontroller, and the modem outputs can be directly read by the microcontroller without the need for any external hardware. A top view of the dimension of the GSM SocketModem can be seen in the Figure 5 below. In the specifications, we decided that the final product should be no bigger than 6x4x3 inches. The GSM SocketModem is able to easily fit in a product that has the desired dimensions, leaving plenty of room for the remaining components that well need..

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 9 OF 30

Figure 5: A view of the dimensions of the GSM SocketModem in inches. [13]

The SocketModem uses a 12 pin interface. The pins we used were TXD, RXD, GND, RESET, VCC, RTS, DTR, and RI. The rest of the pins were allowed to float. The SocketModem has an internal UART that is used to send and receive data packets for data communication. The settings of the UART are 115200 baud, no parity, and one stop bit. There are three wires that are used to send and receive the serial data. These wires are RXD, TXD, and GND. TXD is used by the modem to receive serial data from the microprocessor. RXD is used to send serial data to the microprocessor. The fact that these two pins are named as such caused several headaches while trying to determine why we were having difficulty communicating with the modem. GND is the communication ground. There is no protection circuitry for the modem, so the communication wires must be kept between 0V and 5V when the modem is on, and at 0V when the modem is off. It is turned on by a low to high transition on this pin. The table below shows the pin-out of the SocketModem.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 10 OF 30

Table 1. A pin-out of the SocketModem hardware interface. [13]

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 11 OF 30

Communication between the modem and the microcontroller as stated before is done through an RS-232 type interface, though at CMOS voltage levels. The commands that the modem works with are the same commands that a Hayes Compatible modem would use. This allows for very quick development for the modem with a wealth of available information. Well over 100 commands are available for communicating with the modem, several of these commands are specific to the MultiTech cellular modem series. 3.1.4 Power Supply During the second semester, the power requirements for the device changed because of the new modem. Before, we had to generate three voltage levels (12 Volts for the modem, 5 Volts for the GPS and MCU, and 1.5 Volts for a reference). With the new modem, we did not have to generate a 12 Volt supply, so we needed only 5 Volts for the modem, GPS, and MCU. We also needed a reference voltage that was between 0 Volts and 5 Volts for the siren detection circuit to compare. Another important concern while designing the power supply is the amount of current required. With the new modem, we could expect to need up to 2 Amps during transmission. This means that the power supply has to supply at least 10 Watts for short periods of time. The GPS also has requirement of less than 150 mV of ripple on the power supply. A car is a very electrically noisy environment, so our power supply has to be able to filter out a lot of noise. As test show, our power supply design is able to effectively filter out noise from the car, however, when we tested our first PCB, there was 800 mV of ripple on the power rails. Eventually, we traced this to the MCU, but we were forced to make some changes to the power supply to filter the noise from the MCU. Lastly, we had to be concerned with what happens when the power supply fails. The power supply has to power some expensive equipment, and we had to make sure that if for some reason the power supply could no longer reduce the input voltage to 5 Volts, then the power supply would shut down before it damages anything. The basic ideal behind the design is to have a DC-to-DC converter that takes the voltage supply from the car and converts it into 5 Volts. The output of the DC-to-DC converter goes through a protection circuit that blows a fuse if the output is too high. The design of the DC-to-DC converter part remained the same throughout the design process. The main components of this part were a p-fet, opamp, and 7805 voltage regulator (see figure 6). The 7805 is used to generate a reference voltage that is compared to the output by the opamp. When the output is less than the reference, the p-fet is turned on, and when the output is higher than the reference, the p-fet is turned off. This circuit has two capacitors and three diodes. The two larger diodes allow current to flow into the DC-to-DC converter, Figure 6. Schematic of the DC-to-DC converter part of the but do not allow current to leave power supply. the device. This is important because to prevent the device from trying to supply power to the car from the backup battery when the car is dead. The smaller diode is used to prevent the ground rail from having a higher

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 12 OF 30

voltage than the power rail. This could possibly happen if someone hooked the power supply up wrong to his or her car. The diode does not need to be too big because the two larger diodes also prevent current from going the wrong way, so when the power inputs are crossed, both GND and VDD should equal the battery voltage of the car (~12 Volts). Since GND and VDD are equal, there is no chance of damaging anything because the electronics see 0 Volts on their terminals. The smaller capacitor (5 uF) is used to filter high frequency spikes from the input. This is very important because the car can occasionally generate high voltage spikes (such as when the car is jump started). Some times cars can have a problem where the voltage from the spark plugs gets into the power supply. In this case there is little that can be done because the voltage from these spikes is several thousand volts, which is high enough to ark across traces and blow the electronic components. However, this is a rare event and most likely if this occurs, then everything in the car will be destroyed. The larger capacitor is used to remove the ripple from the output. In the first PCB this capacitor was 100 uF. However, during tests, we found that there was a ripple of 800 mV on the power rails of the GPS (the GPS specs list 150 mV as the maximum ripple). We eventually traced this ripple to the MCU. Though we are not sure why the MCU caused too much ripple, but we were able to fix the problem by having wider traces between the power supply and the components and increasing the capacitor to 1000 uF. Another important thing to note is that the 7805 is also very good at filtering noise. During testing no variation of the output of the 7805 when the input was varied. This means that it can provide an exceptionally stable reference voltage. During the development of the power supply we tried two designs for the protection circuit. The first one proved the concept would work, however, it had some problems we thought we should correct. Figure 7 shows a schematic of the first protection circuit design and the DC-to-DC converter. One of the main requirements of the protection circuit was that it could not reuse any signals from the DC-to-DC converter so that a failure of converter part would be less likely to cause the protection circuit to fail. Another important design criteria was keeping the cost down while still providing adequate protection. The main components of the first design were two voltage dividers, an opamp, a n-fet, and a mechanical relay. One of the voltage dividers has a 5 Volt zenor diode and a 1.5 KOhm resistor, so its output is clamped to 5 Volts or less. Through testing we found that under normal conditions the output of this first voltage divider is about 4 Volts. The other voltage divider has a 430 KOhm and a 1 MOhm resistor, so that it normally has an output of 3.5 Volts and allows 3.5 uAmps to flow through it. Both of these voltage dividers dissipate very little power and the normal state has the output of the voltage divider with the zenor (4 Volts) higher than the output of the other (3.5 Volts). Under a failure condition, the output of the power supply will go up to 12 Volts. At about 7 Volts, the output of the divider with the zenor becomes lower than the output of the other Figure 7 Schematic of power supply with the first divider. This causes the opamp to protection circuit design.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 13 OF 30

turn on the n-fet, which switches the relay. When the relay switches, it disconnects the power supply from the rest of the components and blows the fuse by drawing the current through the pfet. The 1 Ohm resistor keeps the circuit from oscillating because the output of the power supply gets pulled down too far when it is trying to blow the fuse. Though this circuit works in the lab, we found that it was sensitive to vibrations because the reed in the relay could vibrate out of place. This causes it to disconnect the power supply from the other components or possibly blow the fuse. One ideal for fixing this problem was to set it up so that the relay is normally switched on so that it has a magnetic force pulling the reed to the correct position. This probably would have solved the problem, however, it was rejected because it would be dissipating power all the time. Eventually, we settled on the design shown in figure 8. In this design, the current goes through the .5 Ohm resistor and the n-fet when it is trying to blow the fuse. This design also forces you to use a 2.5 Amp or 3.0 Amp fuse because the saturation current of the n-fet is 4.0 Amps. During testing, we found that the current did not always reach 4.0 Amps because the conditions for the n-fet were not right. Finally, the reference voltage for siren detection circuit is borrowed from the voltage divider that has the 430 KOhm and 1 MOhm resistors. This means that the reference voltage is 3.5 Volts. 3.2 Software Components The majority of the GTS firmware code is interrupt driven. Interrupts are generated when a transition is detected on the siren detect pin, when timers run their full duration, and when data is received on either UART. These interrupts and the order in which they occur determine how the GTS will react to the situation it is in. 3.2.1 Firmware Code The code for the microcontroller is written completely in C, and is compiled with AVR-GCC. Interrupts are utilized for nearly every function the GTS performs which includes transmitting and receiving on each UART, analog comparator transitions, and several timers. When the GTS boots up, it configures each UART, the analog comparator, sets up the input and output pins, initializes each timer, the GPS, and the modem, and puts the GPS into its sleep mode. The GTS then waits for any transition on the analog comparator or for the modem to receive a connection. The analog comparator is initialized to cause an interrupt on any transition. When the transition is from low to high, a three second timer is started. If this timer runs for three seconds, an interrupt is generated which puts the GTS into an alert mode. When the transition of the analog comparator is from high to low, the microcontroller checks the status of the three-second timer.

Figure 8. Schematic of the power supply with the second protection circuit design.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 14 OF 30

If the timer is still running, it is disabled and the GTS is taken out of alert mode. If the timer has stopped, the GTS remains in alert mode. When the alert mode is entered, the GPS is taken out of its sleep mode and is queried for the location of the vehicle. When the query string is sent, the GPS automatically continues sending the location data in one-second intervals. When each character is received from the GPS, it is added to a string in the GTS. When the string is completely built, it is inspected to determine how many satellites were used in determining the location. If at least one satellite is used, that location is stored as first location in the GTS memory. Each additional string is stored as current location in the GTS memory if it was determined by at least one satellite. When each current location string is received, it is compared to the first location string using the following approximate formula [8]: Approximate distance in feet = 5280 * sqrt(x * x + y * y) where x = 69.1 * (lat2 - lat1) and y = 53 * (lon2 - lon1) Ten minutes after entering alert mode, if the distance was found to exceed 50 feet then the GTS will activate the modem and contact the owner and report its position. Every ten minutes after this first contact, the GTS will contact the owner again and report its new position, whether it has moved or not. It will continue to do so until it detects less than 3 seconds of activity on the car alarm siren wire or until the owner disables the GTS from their computer. Once it has been determined that the vehicle is in fact being stolen, it must connect to the owners computer and begin relaying its position through the cellular modem. In order to interface with the modem our firmware has a 200 ms timer and two buffers allocated to contain packet data. When the microcontroller sends a packet to the modem, it starts the 200 ms timer. After the timer is expended, the microcontroller resends the packet and increments a counter. When an acknowledgment is sent, this counter is cleared. If the counter ever gets to 15, then it assumes the connection has been lost and resets the connection. One of the buffers is used to store the data for an idle packet. The purpose for this is to allow the other buffer to act as an interface between the modem program and the rest of the program. The way this works is that the microcontroller sends idle packets to maintain the data link while it has nothing to say. When something is placed in the data buffer, the micro controller sends that instead of an idle packet. After it receives an acknowledgment on the data packet, it switches back to sending idle packets. Also, before the data buffer can be written to, the program must check a bit to see if it is busy. If it is busy, then the program is not allowed to change the buffer. After the data packet is acknowledged, the program is no longer busy. 3.2.2 Graphical User Interface In order for the owner to locate their vehicle, they must have access to a computer running a Windows98 or NT based operating system. The GUI they use will have buttons to accomplish most of the controls that will be expected to be performed by the user, but it will also have the ability to send other custom commands.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 15 OF 30

The GUI shown here in figure 9 communicates to the GTS through a modem in the computer. The user has the ability to select which com port of the computer the modem is installed, and the baud rate at which it will transmit and receive from, though the baud rate selection is largely unnecessary. Once these options are selected, the user should press the Connect button. Once connected, the user has several options. The Track Car button will put the GTS into its alert mode immediately upon connection. When entering the alert mode in this fashion, the GTS will transmit its location to the owners computer immediately and continue to do so on ten-minute intervals. The Cancel Tracking button takes the GTS out of alert mode, and if the car is disabled it will enable the Figure 9: Graphical User Interface. vehicle. The Get Location button will get the location from the GTS once. If the GTS is in the alert mode when this option is selected, it will send the location and remain in alert mode. If the GTS is not in the alert mode, it will send the location and stay out of alert mode. The Disable Vehicle and the Enable Vehicle buttons disable and enable vehicle respectively. The last button, Send, is for the custom commands to either the local modem or the GTS. Whenever the GUI receives a valid NMEA 0183 string from the GTS, it will display that string in the large text box near the center of the window. If this string contains valid location data, the time of day is parsed out and placed into the time box, and the longitude and latitude is parsed out and placed into their respective boxes as well. The GTS and GUI setup function is shown here in Figure 10. In this box, you can enter the modems data phone number, your home phone number, and an optional alert phone number. The alert phone number is to alert the owner if the vehicles alarm is sounding and can act as an early warning device. The setup also requires that you enter the current password and also the new password if you intend to change it. Pressing the update button causes the computer to connect to the modem and update all of the information.

Figure 10: GTS Setup

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 16 OF 30

The GTS reports the longitude and latitude of the vehicle whenever a connection is established. While very useful, this data is rather cryptic as it can be difficult to locate something solely by longitude and latitude unless another GPS receiver is employed. Figure 11 to the right shows the solution to this problem. A list of all location data gathered by the GTS is displayed in a window. If new information comes in while the window is open the user must manually update the data with the Update button. To locate the Figure 11: GTS Map Display vehicle, the user would select the last entry in the list and press the Locate on MapQuest button. This requires an active connection to the internet and will open a browser window which will contain a map with various levels of available zoom of the most recently known location of the vehicle. 4. TEST SPECIFICATIONS The test specifications will be used to show that the system meets the design constraints laid out in section two. The system parts will be tested individually and then as a complete system after all individual component design constraints have been met. In figure 12 below, the major components of the GTS and the paths along which those components communicate are shown.

Figure 12: The major components of the GPS Tracking System . are shown above.

4.1 Test Equipment and Software

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 17 OF 30

This section will list the necessary equipment and tools used to test the individual components of the GTS. Also listed are the tools and equipment to do the system test of the GTS after the required component testing has been completed. Digital oscilloscope Multimeter Laptop computer Desktop computer Custom software Car alarm Car alarm siren Atmel ATmega128 microcontroller Voltage generator Function generator Test circuit Car

4.2 Unit Testing Before performing system tests, the individual components will be tested to ensure they work properly. Below, sections describing the individual component tests, how they should be performed, and the expected results of those tests can be found. 4.2.1 Fuel Cut Relay Fuel Cut Relay: The system will be able to disable the vehicle through use of a relay which will cut power to the vehicles fuel pump. With the gate voltage on the NFET at ground, the current through the NFET should be 0A and the relay resistance should be near 0. With the gate voltage on the NFET at 5V, the current through the NFET should be 5A or less and the relay resistance should be infinite. Figure 13 graphically shows how the test is to be conducted.

Figure 13: A detailed view of how to set up the component relay test. .

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 18 OF 30

Test Procedure 1. Set the voltage generator to produce a 12V DC signal on channel one and a 5V DC signal on channel two. 2. Connect body, source, and gate contacts of the open drain NFET to the voltage generator ground. 3. Connect the drain contact of the open drain NFET to the negative control terminal of the relay. 4. Connect the positive control terminal of the relay to the 12V channel one output on the voltage generator. 5. Turn on the generator. 6. Measure the resistance of the relay; it should be close to 0. 7. Measure the drain to source current through the NFET; it should be 0A. 8. Remove the ground connection from the NFETs gate. 9. Apply the 5V signal from the voltage generator to the gate contact of the NFET. 10. Measure the resistance of the relay; it should be near infinite. 11. Measure the source to drain current through the NFET; it should be 5A or less. 4.2.2 Siren Detect Siren Detect: The system must be able to detect the car alarms siren so that it can determine if the car is being stolen or not. It must also be able to differentiate between the alarm being armed or disarmed by the owner from the alarm signaling possible theft. The signals found on the siren wire are as follows: When the alarm is armed, the siren wire will have a brief 12V pulse on it and then it will remain at 0V. When the alarm is disarmed, the siren wire will have two brief 12V pulses on it and then it will remain at 0V. If the alarm is set off and then the remote is used to disarm it, there will be a brief 12V pulse on the wire and then it will remain at 0V. If the alarm is set off and then not disarmed with the remote, when the alarm stops, the siren wire will return to 0V without producing any 12V pulses.

If a signal remains on the siren wire for more than three seconds and is not followed by any brief pulses, the GTS should assume that the vehicle is being stolen and enter an alert mode. The analog comparator pins on the microcontroller will be used to detect signals on the siren wire. The analog comparator reference pin will be connected to a constant 5V source, and the analog

Figure 14: A detailed view of how the siren component detect test is set up.
December 3, 2003

ECE 4542

GTS: GPS TRACKING SYSTEM

PAGE 19 OF 30

comparator test pin will be connected to a signal wire that will be either 0V or 12V. The 5V signal will be obtained directly from a voltage source, and the pulses will be applied to the signal wire by a manually activated button connected to a 12V voltage source. An LED will be used to signify that the microcontroller is in an alert mode.

Test Procedure 1. Apply one pulse approximately 250ms in length and ensure that the microcontroller is awake and not in alert mode. The length of the pulse must not exceed 2 seconds. 2. Apply one pulse approximately 250ms in length and ensure that the microcontroller is awake and not in alert mode. The length of the pulse must not exceed 2 seconds. 3. Apply a pulse approximately 5 seconds in length and ensure that the microcontroller is awake and enters the alert mode. 4. Apply two pulses approximately 250ms in length and ensure that the microcontroller exits the alert mode. The length of the pulses must not exceed 2 seconds. 5. Apply a pulse approximately 30 seconds in length and ensure the microcontroller enters and remains in alert mode. 6. Repeat this test, putting the microcontroller into sleep mode before each step.

4.2.3 GPS Communication GPS Communication: The GTS must be able to determine its latitude and longitude and will do so by communicating with a GPS receiver. Passing commands directly from a laptop computer to the serial port of the microcontroller will be done to perform the component testing. The microcontroller will then pass the commands on to the GPS receiver, collect the data, and pass it back to the laptop computer. The returned data will be compared to latitudes and longitudes obtained from an atlas. Test Procedure 1. Use a street atlas to obtain known coordinates of five locations inside of Starkville. 2. Move to locations of known latitude and longitude and request coordinates from the GPS using a laptop computer. 3. Compare the obtained coordinates to the known coordinates. 4.2.4 Modem Communication Modem Communication: The modem must be able to communicate with the program on the owners personal computer in order to allow the vehicle to be tracked. Testing will consist of establishing a connection and sending data to the computer, and the computer returning information to the modem. The modem must also be capable of accepting phone calls from the computer whether the modem and emulator are awake or asleep. Test Procedure 1. Using the emulator, initialize the modem.
ECE 4542 December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 20 OF 30

2. Have the modem place a call to a number at which the laptop computer is and can answer the call. 3. Transmit 32 bytes of data from the cellular modem to the laptop. 4. Return the same 32 bytes of data from the laptop to the cellular modem. 5. Compare the sent data to the received data and ensure they are the same. 6. Have the cellular modem terminate communications. 7. Have the laptop place a call to the cellular modem. 8. Transmit 32 bytes of data from the laptop to the cellular modem. 9. Return the same 32 bytes of data from the cellular modem to the laptop. 10. Compare the sent data to the received data and ensure they are the same. 11. Have the laptop terminate communications. 12. Place the modem into sleep mode. 13. Have the laptop place a call to the cellular modem. 14. Transmit 32 bytes of data from the laptop to the cellular modem. 15. Return the same 32 bytes of data from the cellular modem to the laptop. 16. Compare the sent data to the received data and ensure they are the same. 17. Have the laptop terminate communications. 18. Place the modem into sleep mode. 19. Place the emulator into sleep mode. 20. Have the laptop place a call to the cellular modem. 21. Transmit 32 bytes of data from the laptop to the cellular modem. 22. Return the same 32 bytes of data from the cellular modem to the laptop. 23. Compare the sent data to the received data and ensure they are the same. 24. Have the laptop terminate communications. 4.2.5 Power Supply Power Supply: The power supply must be able to supply 5 Volts DC to the components of the device. It needed to be tested to see if it could supply 5 Volts and maintain this voltage at the maximum power required during transmitting. It must be able to filter the ripple so that there is less than 150 mV of ripple. Testing the power supply required several procedures. In the first procedure, we tested the power supply to determine if it could supply enough power to transmit. In the second procedure, we tested if the protection circuit worked. In the third procedure, we tested the protection circuit. Later we became aware that the power supply must be resistant to vibration. In the final test procedure, we determine if the power supply could handle the vibration associated with a car. Test Procedure 1 1. Hook up the power supply to a car. 2. Place a 1.3 Ohm load on the power supply. 3. Measure the current and voltage for 15 minutes.
Figure 15. Power Supply Test Circuit.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 21 OF 30

Test Procedure 2 1. Hook the power supply to test circuit shown in figure 15. 2. Measure the peak-to-peak voltage with an oscilloscope and vary the frequency from 30 Hz to 1000 Hz. 3. Hook the power supply to a car. 4. Measure the peak-to-peak voltage with an oscilloscope. Test Procedure 3 1. Connect the power supply to a car. 2. Take a wire and connect the 12 Volt terminal of the car battery to the heat sink of the p-fet. (The heat sink is connected to the drain.) 3. See if the fuse is blown. Test Procedure 4 1. Shake the power supply. 2. If the relay rattles, then it is switching, and the power supply is sensitive to vibration. 4.2.6 User Interface Software User Interface Software: The user will only interface with the GTS through the GUI on their personal computer. The GUI will have to be able to establish communication with the modem and send commands to the GTS. In section 4.2.4, testing the cellular modem will require communication with the computer and will serve to demonstrate that communication can properly take place. In this test, separate functions will be written to give data to the program instead of requesting this information from the emulator and cellular modem combination. Test Procedure 1. Request the location of the vehicle. 2. Ensure that the latitude, longitude, and map are displayed. 3. Repeat the test for the same locations as in section 4.2.3. 4. Ensure that the received locations are the same as the known locations. 4.3 System Testing Once the individual component testing has been completed, testing on the completed system will begin. Causing the GTSs environment to stimulate its inputs will be the method by which the system testing will be performed. 4.3.1 Fuel Cut Relay Fuel Cut Relay: The GTS will be able to disable the vehicle by removing power to the fuel pump. The computer will be used to send the signal to disable the vehicle, and at that time, the relays resistance should change from near 0 to near infinite.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 22 OF 30

Figure 16: A detailed view of how the system relay test is set up.

Test Procedure 1. Measure the resistance of the relays signal path; it should be near 0. 2. Measure the current into the GTS from the relay control; it should be near 0A. 3. Use the computer interface to send the signal to disable the vehicle. 4. Measure the resistance across the relay; it should be near infinite. 5. Measure the current into the GTS; it should be under 5A. 4.3.2 Siren Detect Siren Detect: The system must be able to detect the car alarms siren so that it can determine if the car is being stolen or not. It must also be able to differentiate between the alarm being armed or disarmed by the owner from the alarm signaling possible theft. Unlike the tests in section 4.2.2, it will be unknown as to whether or not the GTS is in alert mode, so the vehicle will be moved after each test to see if the GTS attempts to contact the owners personal computer. Test Procedure 1. Arm the alarm. 2. Disarm the alarm. 3. Move the vehicle 500 feet; it should not try to contact the owners computer. 4. Arm the alarm. 5. Set off the alarm. 6. Disarm the alarm. 7. Move the vehicle 500 feet; it should not try to contact the owners computer. 8. Arm the alarm. 9. Set off the alarm and allow it to run full duration. 10. Disconnect the siren wire from the analog comparator test pin so that disabling the alarm does not take the GTS out of alert mode. 11. Disarm the alarm.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 23 OF 30

12. Move the vehicle 500 feet; it should contact the owners computer and report its position. 13. Wait 10 minutes; the GTS should attempt to contact the owners computer and report its position. 14. Arm the alarm to take it out of alert mode. 15. Repeat steps 1 through 14, allowing the microcontroller to go into sleep mode before step from 1 to 12. 4.3.3 GPS and Modem Communication GPS Communication: The GTS must be able to determine its latitude and longitude and will do so by communicating with a GPS receiver. It will then send its location to the computer via a cellular modem to be displayed on a map. Test Procedure 1. Move the vehicle to the known locations in section 4.2.3. 2. Using the personal computer, request the location of the vehicle while it is near each of the five locations in step 1. 3. Compare these locations to the known locations of the vehicle. 4.3.5 Power Supply Power Supply: Most of the power supply testing could be done by simulating the other components as resistors. However, it became apparent that we needed to do some testing with actual components connected to the power supply to make sure that we still met the ripple requirement. We were not going to do a system test with the protection circuit because we decided that the cost of failure was too high. However, during the testing phase we inadvertently caused the power supply to fail during a system test. Since this incident validated the protection circuit, we will now report the results. Test Procedure 1 1. Connect the modem and MCU to the power supply. 2. Connect the power supply to 12 Volt supply in the lab. 3. Measure the peak-to-peak voltage at the GPS connection using an oscilloscope. 4. The peak-to-peak voltage should be less than 150 Volts. Test Procedure 2 The following procedure was the result of an accident that occurred during a modem system test. It is not recommended that this procedure be replicated. 1. Connect the modem and MCU to the power supply. 2. Connect the power supply to a car. 3. Drop a wire connected to the 12 Volt terminal of the car battery on the heat sink for the 7805. (This will burn up the ground trace for the 7805 on the PCB.) 4. Replace the fuse and solder a wire between GND and the 7805. 5. Connect the power supply back up to the car and see if every thing still works.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 24 OF 30

4.3.6 User Interface Software User Interface Software: The user will only interface with the GTS through the GUI on their personal computer. The GUI will have to be able to establish communication with the modem and send commands to the GTS. An event log will be kept of each successful data transmission and also of each failed attempt to contact the GTS from the computer. Test Procedure 1. Contact the GTS to program the phone number and security code; the GUI should display the position record the successful transmission and the position. 2. Turn off the GTS. 3. Request the location of the GTS from the home computer; it should log a failure to contact the GTS. 4. Use the GUI to attempt to disable the GTS using the wrong security code; it should log a failure to contact the GTS. 5. Use the GUI to attempt to disable the GTS using the correct security code; it should log a failure to contact the GTS. 6. Turn the GTS back on. 7. Request the location of the GTS from the home computer; it should display it on the map and log the location and successful transmission. 8. Request that the GTS disable the vehicle using the wrong security code; it should display the position on the map and log the successful transmission and location, and failure to disable of the vehicle. 9. Request that the GTS disable the vehicle using the correct security code; it should display the position on the map and log the successful transmission, location, and disabling of the vehicle. 10. Request that the GTS re-enable the vehicle; it should display the position on the map and log the successful transmission, position, and re-enabling of the vehicle. 11. Request that the GTS actively track the vehicle; it should display the position on the map and log the successful transmission. 12. Wait 10 minutes. 13. The GTS should automatically contact the personal computer and report its position; and the GUI should log the location and successful transmission. 14. Tell the GUI to disable the vehicle on the next transmission with the wrong security code. 15. Wait 10 minutes. 16. The GTS should automatically contact the personal computer and report its position, and the GUI should log the location, successful transmission, and unsuccessful disabling of the vehicle. 17. Wait 10 minutes. 18. The GTS should automatically contact the personal computer and report its position and disable the vehicle. The GUI should log the location, successful transmission, and successful disabling of the vehicle. 19. Wait 10 minutes. 20. The GTS should report its position; the GUI should log the location and successful transmission, and display the position on the map.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 25 OF 30

21. Use the GUI to take the GTS out of alert mode. 22. The GTS should no longer attempt to contact the personal computer. 5. TEST CERTIFICATION This section contains the results for the tests performed as described in section 4, and will also contain any modifications that were made to ensure proper operation. After each section, the results will be discussed and compared to the expected values. Some tests are currently pending because of hardware difficulty, this will be noted in the appropriate sections. 5.1 Component Testing The testing is broken down into two parts, component testing and system testing. The component testing deals with testing the individual components and is discussed first. Component testing deals with how the individual components react to laboratory equipment and simulated stimulus. 5.1.1 Fuel Cut Relay A relay was chosen to be the means by which the vehicle removes power from the fuel pump. This relay is controlled by an NFET with the ability to sink a maximum of 5 amps of DC current. Testing of the relay in the lab involved the use of a 12v power supply, a 5v power supply, and a multimeter. Gate Voltage 0V 5V Relay Resistance 0.110 Infinite Relay Control Current 0A 56.6 mA Expected Resistance Near 0 Near infinite Expected Current Near 0 Less than 5 A

Table 2: Fuel cut relay component test results. As can be seen from Table 2, the resistance of the relay is close to zero when the gate of the NFET is grounded. This allows current to pass through the relay to power the fuel pump of the vehicle. Also, when the NFET gate is grounded, no current passes through the control of the relay. This ensures that the relay will not accidentally open and cause the vehicles fuel pump to lose power. When a 5 V source is applied to the NFET gate, the relay opens up and does not allow current to flow to the fuel pump, which disabled the vehicle. The current through the control terminal of the relay is also well below the 5 A requirement. 5.1.2 Siren Detect Siren detection is one of the most critical aspects of the GTS. The siren detection is what causes the GTS to begin processing the data necessary to automatically transmit its location to the owner as soon as it is stolen. Without siren detection, the owner would have to manually control the GTS whenever they wanted to locate their vehicle.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 26 OF 30

Test Short pulse Short pulse Five second pulse Two short pulses Thirty second pulse

Alert Mode Result Off Off On Off On Table 3: Siren detect component test results.

Expected Result Off Off On Off On

Table 3 shows the results of testing the siren detection component of the GTS. The short pulses applied to the analog comparator cause the microcontroller to exit alert mode if it is on, and it remains out of alert mode if it is already not in it. The five second and thirty second pulses cause the GTS to enter its alert mode as expected. Unfortunately, the sleep mode requirements for this test were not completed as time did not allow for full implementation of the sleep mode for the microcontroller. 5.1.3 GPS Communication The GPS is another extremely important part of the tracking system. Without it, the vehicle can be disabled, but the recovery of the vehicle would be just as difficult as if the vehicle was not equipped with a GTS. Proper location of the vehicle by the GPS receiver is necessary to ensure a quick vehicle recovery. Testing of the GPS used a laptop with the GPS directly connected to the serial port, all the data entering the serial port was displayed in a window as it arrived. Location Chevron Highway 12 Radio Shack Highway 12 Suttle Hall Parking Lot Waffle House Highway 82 213 Bridle Path Longitude 88 48.6551 W 88 50.8937 W 88 47.2991 W 88 46.1316 W 88 49.2990 W Latitude 33 27.2928 N 33 26.6067 N 33 27.4374 N 33 28.1679 N 33 28.9798 N Expected Longitude 88 45.0000 W 88 45.0000 W 88 45.0000 W 88 45.0000 W 88 45.0000 W Expected Latitude 33 22.5000 N 33 22.5000 N 33 22.5000 N 33 22.5000 N 33 22.5000 N

Table 4: GPS communication component test results. Determining the expected latitude and longitude was more difficult than anticipated. Many road atlases, maps, and online directories were checked but none of them gave accurate enough descriptions of longitude and latitude locations of the test locations. However, a location was obtained and used as the general reference for the city of Starkville and is N33 22' 30" W088 45' 00" MS Starkville [10]. This location converted to decimal minutes and seconds, which is what the Garmin GPS unit uses, is 33 22.5000 N 88 45.0000 W. While the accuracy of GPS can not be check in this fashion, it is at least enough to show in table 4 that the general location of the GPS is near the expected values of the city.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 27 OF 30

5.1.4 Modem Communications Testing of the modem did not take place in either the component or the system tests because it was damaged beyond repair by the available equipment. A new modem will be acquired as soon as possible and the communication code will be written to allow for cellular transmission. At this time, all communications are done over a serial cable connected from the GTS to the computers serial port. 5.1.5 Power Supply The power supply went through two redesigns this semester. The first design was supposed to power the device with the original modem we had, but when we switched to the new modem, the old power supply design had to change. The second design worked, but we were concerned that it would not pass the vibration test. In fact, it did not. The third design uses all solid-state components, so it is immune to vibration. The results of the tests are shown in the following tables. During the current test, we tested to see if the power supply could supply 4 Amps long enough to transmit. We were watching the multimeter to see if the voltage dropped. The output remained constant, so the power supply passed this test. All versions of our power supply had the approximately same results.
Frequency in Hz 30 100 200 1000 5000 10000 Car Input Ripple Voltage .5 Volts 1 Volt 4 Volts 42 mV 24 mV 20 mV 42 mV 24 mV 20 mV 42 mV 26 mV 20 mV 48 mV 25 mV 25 mV 48 mV 16 mV 20 mV 48 mV 25 mV 20 mV 40 mV Output Ripple Voltage
Output Voltage During 4 Amp Test 6 5 4 3 2 1 0 0 20 40 Time in seconds 60 80

Table 5: Ripple Voltage

Output voltage

Figure17: Output Current/Voltage Test

During the next test, we connected the test circuit to the power supply and measured the ripple on the GPS power rails. Then we connected it up to a car and measured the ripple. During the test, the ripple had to stay below 150 mVolts. The results (see table 5) of the test show that our power supply meets the requirements. During the third test, we tested the protection circuit to determine if it would in fact blow the fuse when high voltage was forced on the output. We this by touching a wire connected to 12 Volts to the heat sink of the p-fet. In the tests, all three designs demonstrated that they could detect the high voltage and blow the fuse.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 28 OF 30

The last test was done on just the first PCB. It was supposed to determine if the design was vibration sensitive. The result of the test was that the relay was vibration sensitive, and we needed to switch to the newer design. 5.1.6 User Interface Testing of the user interface was done by connecting the GTS directly up to the serial port on the computer since the modem was damaged. As written in section 4.2.5, testing of the GUI requires that the modem be used; however, the modem was damaged before we were able to test it. Because of this, testing of the GUI as a component did not take place. 5.2 System Testing System testing involves connecting all of the components together and installing them in a vehicle so that real world reactions to stimuli can be tested. The GTS was briefly connected to a car alarm to test the siren detection, and the antenna was placed inside of the vehicle while moving around town to record location data. This section discusses the results of this testing. 5.2.1 Fuel Cut Relay The relay was tested again while the FET was driven by a 5 V signal obtained from the microcontroller. Similar results were obtained in this system test as those found in the 5.1.1 component test As shown in table 6, the microcontroller is capable of adequately driving the relay to enable and disable the vehicle. Gate Voltage 0V 4.97 V Relay Resistance 0.11 Infinite Relay Control Current 0A 57 mA Expected Resistance Near 0 Near infinite Expected Current Near 0 Less than 5 A

Table 6: Fuel cut relay system test resuts. 5.2.2 Siren Detection Because of the damaged modem, the GTS was unable to attempt to contact the owners computer. Instead, a led was turned on by the microcontroller to indicate when it would attempt to contact the vehicle. Following is a list of the tests that were ran and their results. 1. The alarm was armed and disarmed, and then the vehicle was moved. The GTS did not light the led. 2. The alarm was armed, set off, and then disarmed. After the alarm was disarmed, the vehicle was moved. The GTS did not light the led. 3. The alarm was armed, set off, and allowed to run full duration. At the end of the siren sequence, a short tone that was previously unnoticed caused the GTS to exit alert mode. The GTS did not light the led as hoped.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 29 OF 30

4. The alarm was armed, set off, and the siren was disconnected from the GTS. The GTS was in alert mode, and the led lit up when the car was moved. Code was written to correct the situation in step three. It works by ignoring short tones immediately following a long active siren of more than 12 seconds. This is currently a work around that may be replaced at a later time by a better algorithm. 5.2.3 GPS and GUI The GTS was installed in a vehicle for these tests. The GUI was used to perform all the requests done to the GTS. Table 7 shows the tests performed, the results of the tests, and the expected results of the tests. Test Program GTS Request Location (GTS off) Attempt Disable (GTS off) Request Location Disable Vehicle w/ Wrong Code Disable Vehicle w/ Correct Code Re-Enable Vehicle Enable Tracking Wait 10 Minutes Disable on Next Trans w/ Wrong Code Disable on Next Trans w/ Right Code Wait 10 Minutes Disable Tracking Wait 10 Minutes Result GTS Programmed Failure Failure Location Returned Failure Vehicle Disabled Vehicle Enabled Tracking Enabled GTS Reports Location Failure Vehicle Disabled GTS Reports Location Tracking Disabled No Communication Expected Result GTS Programmed Failure Failure Location Returned Failure Vehicle Disabled Vehicle Enabled Tracking Enabled GTS Reports Location Failure Vehicle Disabled GTS Reports Location Tracking Disabled No Communication

Table 7: GPS and GUI system testing. The operation of the GTS was as expected as shown in the table. Logs were kept to record how the GTS and the GUI operated in each case. Also not shown in the table is that the location data was properly parsed out and displayed in the appropriate boxes and that maps were available and accurate in all cases. 6. SUMMARY AND FUTURE WORK The GTS meets the original expectations that were drawn up for the design project. All of the major functionalities of the device have been implemented and tested. However, improvement can always be made on any device. In the case of the GTS, the costs can be driven down with the development of a cheaper GPS unit and the power efficiency can be increased with the use of a switching voltage regulator. The more efficient power supply was considered for the project, but time and budget constraints were major hindrances that we could not overcome. Not only that, but the switching regulator samples we received were in a BPGA package which would be extremely difficult for us to use.

ECE 4542

December 3, 2003

GTS: GPS TRACKING SYSTEM

PAGE 30 OF 30

7. ACKNOWLEDGEMENTS We want to thank Dr. Reese for guiding us in the right direction, Dr. Picone for taking us through this course, Dr. Harden for loaning us a GPS and modem, Guy Parker and Joe Roberts for getting us in touch with hardware distributors, Donnie Hood for the free microcontrollers, and Mark Motsinger for the new modem. 8. REFERENCES [1] [2] [2] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Kassakian, J.G., Wolf, H.-C., Miller, J.M., Hurton, C.J., Automotive Electrical Systems Circa 2005, IEEE Spectrum , Volume: 33, Issue: 8 , Aug 1996, Pages 22-27. NMEA 0183, http://www.kh-gps.de/nmea-faq.htm. F.A.C.T. Statistics, http://www.getfacts.org/FACT/webstuff/stats.html. Global Positioning System Overview, http://www.colorado.edu/geography/gcraft/notes/gps/gps.html. CVDM-3 Transmitter Module Data Specifications, Wireless Link, Page 1. J. Y. SPEC, PCBA DEMENSIONS, CVDM3 (SMA), CSI Wireless, July 1999, Page 1. Terry, S., CSI Wireless Packet Data Interface, CSI Wireless, December 1999, Pages 617. Distance Calculation, http://www.meridianworlddata.com/Distance-Calculation.asp. Atmel, ATmega128(L) Preliminary Data Sheet, Page 1. Mississippi Genealogy Network, http://www.msgen.net/ms/mapsa.html - S. Atmel, ATmega128(L) Preliminary Data Sheet, Page 193. SocketModem GSM/GPRS and CDMA Homepage, http://www.multitech.com/PRODUCTS/Families/SocketModemGSM/ MultiTech, SocketModem GSM/GPRS Developers Guide, Pages 7-8.

ECE 4542

December 3, 2003

You might also like