GPS Basics

Contributors: bitsmashed
Favorited Favorite 33

Reading GPS Data

Most GPS modules have a serial port, which makes them perfect to connect to a microcontroller or computer.

Connecting to a Microcontroller

GPS modules to GPS Breakout connections

Once a GPS module is powered, NMEA data (or another message format) is sent out of a serial transmit pin (TX) at a specific baud rate and update rate, even if there is no lock. To have your microcontroller read the NMEA data, all that is needed is to connect the TX pin of the GPS to the RX (receive) pin on the microcontroller. To configure the GPS module, you will need to also connect the RX pin of the GPS to the TX pin of the microcontroller.

It is common for the microcontroller to parse the NMEA data. Parsing is simply removing the chunks of data from the NMEA sentence so the microcontroller can do something useful with the data.

For example, the microcontroller might need to read only the altitude of your GPS.


Instead of dealing with all of this text, the microcontroller can parse the GPGGA sentence and end up with only the altitude (in meters).


Once the microcontroller can grab the data needed, the information can be manipulated to create other interactions on the microcontroller.

The Arduino platform can parse NMEA data easily with the help of the Tiny GPS library. Check out the GPS Shield Getting Started Guide for a walk-through example on how to connect an Arduino to a GPS module and parse NMEA sentences.

Connecting to a Computer

A simple way to see the NMEA data directly is to connect the GPS module to a computer. For the connections, all that is needed is to power the GPS with the FTDI basic (in this case 5V and GND), then connect the TX pin of the GPS to the RX pin on the FTDI Basic.

GPS module to FTDI connections

Next, open a serial terminal program at the same baud rate of your GPS module. Even if the GPS does not have a lock, you should see NMEA sentences steaming by.