circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

August 1999, Issue 109

Where in the World (Part 1):
GPS Introduction


by Ingo Cyliax

Whether you’re dispatching emergency personnel or just trying to find your way home, affordable and easy-to-access technology is making GPS applications more popular. Ingo sets the course for future projects right here.


Recently, a friend of mine was describing how the local police station was upgrading their communication system. With the new system, each police cruiser has a GPS receiver that locates the cruiser and periodically sends its location and ID to the dispatcher. A computer then processes the messages and updates a map with the locations of all the cruisers.

My friend’s comment was that they could save a lot of money by just putting a bunch of LEDs on a map to indicate the location of the local donut shops. Well, there are many other uses for GPS besides tracking police cars. Besides being used for navigation, GPS is useful in surveying, remote sensing, data collection, geology, archeology, and other applications that haven’t been thought of yet.

Let’s do a brief review of GPS and how it works. For a more detailed description, check out Do-While Jones’ series ("The Global Positioning System," Circuit Cellar 77–78).

In a nutshell, the global positioning system (GPS) is a satellite navigation system with 24 satellites orbiting the earth in 12-h orbits. The satellites are distributed such that, on average, there are 12 satellites visible in each hemisphere.

9905011-p1.jpg (23744 bytes)

Photo 1—To interface a typical hand-held GPS receiver to a computer, you have to add an external power and communication adapter module. With those additions, the unit is capable of transmitting NMEA sentences to a computer.

The satellites are time synchronized using an onboard atomic clock. They continuously transmit the time and other information using a spread-spectrum carrier. Each satellite has its own pseudo random number sequence, which makes it possible to share the same carrier frequency.

There are two carriers, one is encrypted and only usable by the military if you have the "super-secret GPS password." Data on the civilian carrier is not encrypted and can be used by anyone with a GPS receiver.

A GPS receiver is a satellite receiver that listens for the signals and measures the time of arrival, comparing it to the GPS time that is sent in the data. This information provides a pseudo-range to each satellite that is received, and that range is used to compute the position. You need to be able to receive three satellite signals to get a two-dimensional fix and four signals to get a three-dimensional fix.

GPS receivers typically listen for all 12 satellites that should be in the hemisphere where the receiver is located. The receiver uses the strongest signals for its fix. The more satellites it uses, the better the accuracy.

How does it know which satellites are where and when to expect to listen for them? Each satellite transmits a database that contains the orbital data for all of the satellites. It takes some time to transmit this database, so receivers store the data in nonvolatile memory (along with the last known location) to preserve this information between power cycles.

When a GPS receiver is first turned on, it does a cold start, which involves cycling through all of the possible satellite codes until it receives a satellite with sufficient signal-to-noise ratio to download the orbital information and the current time. Because the receiver doesn’t know if the satellite is approaching or receding, it also has to guess at the satellite’s Doppler shift.

When it finds a satellite, the receiver downloads the orbital data and current time. It can then can compute the current constellation (another word for position of satellites in the sky) and tune in to the satellites that should be visible. If the receiver is then power cycled, it can use the data from the NVRAM and the current time from a battery-backed real-time clock to make a good guess at the initial constellation.

If the receiver has been off for a while or has moved a great distance, it may need to perform a warm start. In a warm start, the orbital information is accurate enough for the receiver to receive at least one satellite and start downloading more accurate orbital data immediately instead of having to seek for a satellite first.

GPS-receiver manufacturers make specification claims for the different kinds of starts. Cold starts can take up to 15 min. in some receivers. Warm starts typically take less then 2 min., depending on how good a signal the receiver has. Remember that these specifications are under ideal conditions, with a good antenna, and a clear sky. The boot times vary so you need to make sure they are acceptable for your application.

For embedded-system work, there are several GPS-receiver solutions available. Many hand-held and portable GPS receivers have serial interfaces that can be also used in embedded systems. They also have front panels and displays for user interfaces and many features you wouldn’t need for a computer interfacing project.

9905011-p2.jpg (20910 bytes)

Photo 2—A low-cost GPS receiver without a user interface has to be controlled by a computer. This receiver plugs into a laptop (or other computer) but contains its own battery pack.

Portable and hand-held receivers are available practically everywhere (e.g., sporting goods stores, department stores). Photo 1 shows a hand-held GPS receiver with an optional communications and power adapter that enables me to connect it to my computer via an RS-232 port and receive NMEA messages from it.

Another kind of portable GPS receiver, such as the one shown in Photo 2, attaches to your serial port or PCMCIA slot of your notebook and has no user interface. These receivers can only be used under computer control.

A common use for these portable/hand-held GPS receivers is to attach them to a laptop and use software like Delorme Street Atlas for car navigation. This is pretty fun and a good way to get comfortable with the technology. You can even use them on airplanes, provided you have a window seat for the antenna and it’s OK with the flight crew. See the Navigation 101 sidebar for more details on navigating.

Besides hand-held GPS receivers, there are GPS-receiver modules. Motorola, Rockwell, and several other companies make these small PCB boards that contain all of the analog/RF section and a small microprocessor to perform the computation necessary to find satellites and get fixes. One of these modules, made by SiGEM, comes in a 32-pin SIMM module format.

GPS modules have an antenna connection, power, and one or more serial ports. The serial ports are typically TTL-level asynchronous serial protocol and can be connected directly to a USART in your project. If you want to connect these to an RS-232 port, you need a TTL-level–to–RS-232 converter line driver.

Both GPS modules and portable/hand-held receivers usually speak NMEA-0183 protocol, which I’ll get to in a bit. Some modules also speak proprietary protocols that offer more functionality then NMEA-0183 but are specific to a module manufacturer (check the specs). I listed some places that carry GPS modules in the Sources section.

Several companies make ISA- and PC/104-bus GPS boards, which are internal GPS receivers. These typically use one of the GPS-receiver modules in a carrier board. The carrier board also contains a serial USART so the receiver looks just like a serial-port–based external GPS receiver to the computer.

If you want your GPS receiver module to actually receive signals, you need an antenna. Portable and hand-held receivers usually have an integral antenna.

Antennae come in two basic types—passive and active. An active antenna has a small preamplifier built into it, which is powered via the coax cable that connects it to the GPS receiver module. Active antennae are preferable because they provide a much better SNR than passive antennae.

Active antennae do cost more, and the GPS receiver needs to be able to support sending DC power to the antenna. An active antenna without DC power on the coaxial cable won’t work at all. The impedance for coax used in GPS is 50 W and needs to be low loss and high quality.