A Brief Overview of GPS
The Navman Jupiter 30
A Brief Overview of GPS:
As most people probably know, GPS is an acronym for Global Positioning System. As the name implies, GPS is a navigation system which can be used to pinpoint the location of a receiver at any point on the globe with reasonable accuracy. The system was developed and is maintained by the United States military but is also available free of charge to the rest of the world, although a few functional limitations are imposed on the civilian service. To be specific, the GPS signals available for civilians used to provide less accurate positional data than the military signals and all civilian GPS chipsets will cease to provide data if above an altitude of 18km, travelling at a speed greater than 500m/s or accelerating harder than 4 gravities. The reasons for this should be fairly obvious....
GPS is a satellite navigation system. This means you need to be able to see the sky or have a very sensitive receiver in order to locate yourself. For complete coverage of the globe 24 satellites are placed in three orbits inclined at 60 degrees to each other. At the time of this writing there are 30 operational satellites providing some redundancy and improved accuracy. The system is actually quite old, with the first spacecraft launched back in 1978. Extensive plans exist to upgrade and improve the system but the tendancy is to wait for an existing satellite to fail before a better one is launched in it's place. The satellites orbit at some 20,200km (the planet is about 12,700km across), making it almost certain that more than the required four satellites are visible from almost anywhere on the globe, but this also means the signals are very weak by the time they arrive at the surface. As a point of interest, GPS satellites also carry sensors to detect nuclear detonations.
Geographical position (and altitude) is determined by measuring the distance to a minimum of three satellites and using a technique known as trilateration. In principle, the process is actually quite simple. The signal from each satellite provides precise information about the position of that satellite and the transmission delay can be used to measure the distance from the receiver to each satellite. Given these distances, the receiver knows it must be somewhere on the spheres around each satellite with radii defined by the distance to each satellite. Furthermore, if the position of each satellite is accurately known these spheres can be arranged in the correct positions relative to each other and should intersect precisely on the receivers location. Obviously some uncertainty is involved and the spheres will not all intersect perfectly, so the final position is an estimate which can be improved by measuring the distance to additional satellites if they're visible.
In order to accurately measure the distance from a satellite to the receiver a very precise time reference is required, more precise than is cost effective to integrate into a large number of receivers. The satellites themselves are equipped with atomic clocks and getting an accurate position actually requires four satellites or more, the extra satellite providing an independent and accurate time reference. The level of accuracy required to get a usable result is so high that the atomic clocks on-board GPS satellites have to be compensated for the relativistic effects experienced at orbital velocities. GPS receivers need to know the time in order to calculate their position and so most also double as very accurate clocks.
In addition to providing a geographical location and time and date information many GPS receivers can provide other useful information such as ground speed and geographical or magnetic heading.
The Navman Jupiter 30:
The Jupiter 30 is the GPS chipset I used to make my receiver. Designed by Navman, a New Zealand based company specialising in navigation and tracking hardware, it's a high sensitivity device capable of acquiring signals down to -159dB with a suitable active antenna. Unfortunately I only had a simple passive patch antenna so my homebrew receiver doesn't actually live up to many of the claims made in the documentation, such as working indoors. Like most modern chipsets, the Jupiter 30 can track up to 20 satellites at once meaning it's pretty much guaranteed to be using all visible satellites rather than the minimum required.
Using GPS chipsets like this one is surprisingly simple. All you have to do is attached a suitable antenna, apply power and it spits out data from a serial port at 9600baud 8N1 in plain text. This can be connected to a PC with a RS232 line driver for viewing in a terminal program or decoding by any software that understands the NMEA protocol. Alternatively a microcontroller can be used to decode the data and do something useful with it, in my case it's just formatted on a HD44780 liquid crystal display.
Being designed for surface mounting on a specially designed PCB, it's not exactly hobbyist friendly but with some determination I managed to attach flying leads to the relevant pads for connection to a breadboard.
The receiver is constructed on a small solder-less prototyping "wish board" using a BASIC Stamp to run the show. There's not really much to it, the biggest hurdle by far was interfacing the 5V microcontroller to the 3.3V GPS module without damaging anything. A character LCD is wired directly to the I/O on the BASIC Stamp along with two buttons and an LED.
One of the is pushbuttons is wired into the BASIC Stamp in order to cycle through various information on the LCD as two rows of sixteen characters is not nearly enough to show everything. The other button just controls the LCD backlight. The LED is there primarily for debugging purposes and flashes while logging data to flash memory.
As mentioned above the Jupiter 30 operates from a 3.3V supply, making it's I/O signals slightly incompatible with the BASIC Stamp. The serial data lines which drive out from the BS2p40 to the GPS module pass through voltage dividers which take the 5V signals down to about 2.5V, which is a bit low but i didn't have appropriate resistors on hand to match 3.3V exactly. These resistors will limit the slew rate of the serial signals but the baud rate is relatively low and it doesn't seem to be a problem. A slightly different approach is taken with the reset signal because the Jupiter 30 datasheet states that the reset input should never be driven high, so a transistor is used to pull the reset input down to ground as required and leave it open otherwise. Signals driven out by the GPS module are connected straight to the BS2p40 (with current limiting resistors in some cases) as the 3.3V signaling is still enough to switch the 5V inputs.
The circuit has three separate supply rails at different voltages. V+ is fed directly from the battery and is used to run the BASIC Stamp (which has it's own 5V regulator built in) and drive the LCD backlight. +5V is regulated by the BS2p40 itself and only runs the LCD, and +3V3 is separately regulated for the GPS module by an LM317. Note that the +3V3 rail is decoupled with both a 1µF electrolytic and a 100nF ceramic capacitor. The small value ceramic is not there so much to improve transient response but to filter out any digital switching noise from the rest of the circuit. The GPS module uses a highly sensitive radio front end in order to receive signals from the satellites in orbit which makes it somewhat sensitive to power supply noise. While this extra precaution is probably not strictly necessary in a battery powered circuit it did seem to help in the early stages when the circuit was running from the 5V USB power of my laptop which is no doubt full of noise from disk drives, display inverters and so on.
One of the more difficult things to get right was the antenna. The GPS module came with a suitable patch antenna but it still needs a ground plane and a solid connection to the receiver. The ground plane took the form of an unetched PCB, which is just fibreglass with copper on one side. At first I tried to wire it up with some shielded audio cable because I didn't have any proper coaxial cable. It didn't work, and in the end a small length of 50Ω coax had to be purchased. The patch antenna is pictured below. It's quite a simple solution, if somewhat directional (as in it looks upwards and doesn't receive signals from satellites on the horizon very well at all).
So how well does it actually work? Better than I expected. The accuracy generally depends less on the receiver than it does on things like the number of visible satellites and atmospheric conditions, so I expect it's perfectly comparable to a commercial receiver. Despite only having a passive antenna it will occasionally get a fix sitting on my desk indoors through the four stories above. Under cover of trees it can often see a good eight satellites or more, although it takes a while to acquire those signals if powered on in such environments.
By modifying the program in the BASIC Stamp to periodically log data to unused program memory and hacking together a small C program to download this information to my laptop I was able to compare the data from the homebrew receiver with a reasonably authorative reference; Google Earth. First up, a wander across campus...
Ok, so it's not perfect. It looks like I walked through a few walls and swam over the river but a good amount of that can be accounted for. Here's a few things will likely have contributed to any discrepancies.
Venturing further abroad, this is how far you have to go for a decent coffee on easter Sunday, no lies. Again, the 30 second sampling rate makes it look like the bus cut a few corners, but if you look closely every vertex in the plot is on a road.
Crossing cook strait on the interislander ferry...
GPS speed measurements are supposed to be quite accurate, and it seems to be so. Below is a speed/time plot of the crossing shown above. The outside windows of the viewing decks are usually cleaned at the end of night crossings resulting in periodic loss of signal visible between 2.25 and 2.5 hours.
The receiver front and back.
Closeup of the Jupiter 30 GPS module and antenna connection.
Finally, a sample set of data as displayed in each mode. I am perfectly aware that the displayed latitude and longitude is actually some 120Km off the Ross Ice Shelf of Antarctica. The receiver works fine I just don't consider it smart to post my exact location on the internet...
If you have any comments or questions please don't hesitate to contact me.
|Return To Top||Last Updated: 02/08/2008||Home Page|