iTead GPS Shield library

iMall website proposes a GPS shield with a micro SD card socket, which is interesting to create a GPS logger for example. The antenna is water resistant and has a magnetic base.

This pages proposes a simple GPS library based on this shield.

You can download the full article and source codes using the following link:



iTead GPS Shield library - Revision 1.0, 2013-08-04

1. Schematic


This library will not send anything to the GPS receiver. Thus, the Tx pin of the board (Rx pin of the GPS receiver) will not be used. However, I have notice that the GPS receiver is sending incorrect data if the pin is left floating. It must be pulled high, which is the idle status of the line. Moreover, the GPS receiver is working at 3.3V. Unfortunately, this is not enough for the SCI peripheral of the microcontroller and this is why I have used this software serial interface which has been modified to read Rx input by using the ADC peripheral of the microcontroller.

Finally note that the AREF pin needs to be connected to the 5 volts power supply in this application. This is not done by default on TheUno V2.0 (done on TheUno V2.1 and all the hardware revisions of BigBrother and BigBrother-USB).

The wiring is illustrated below.

2. Software


The software is based on my software serial library. The Rx pin is one of the analog inputs of the microcontroller to read the 3.3V signal coming from the GPS receiver. The architecture is described below.

The GPS library parses GPGGA and GPRMC frames and updates some structures in which the data are recorded and available to the user application. Additional NMEA frames can be read easily if required.

Conclusion


This simple library will be useful to create a GPS receiver based application. It is possible to improve it, particularly to get and parse additional NMEA frames.

You can visit this page for more information about NMEA frames content.