DIY your GPS tracker

It is easy today to build a GPS tracking system for mobile applications that can be adapted to your needs. In fact, it is more accurate to speak of a GNSS (Global Navigation Satellite System) tracker, a term which encompasses the 4 positioning systems or satellite constellations:

  • the historical GPS of US origin
  • Galileo developed by Europe
  • Glonass developed by Russia
  • Beidou developed by China

The GPS or GNSS receiver

GNSS receiver
GNSS receiver connected and powered by USB.

There are receivers mounted on a printed circuit, allowing easy interface via USB or a TTL serial port. They are based on the NEO-M8 chip. Preferably take the M8 and not the M6 or M7 because it allows you to work on 3 constellations of satellites simultaneously. On the back, when the red LED flashes every second, it indicates that the satellites have been acquired. The first time it is started it may take a while. Subsequently, the satellite parameters being saved, it will be faster.

The external antenna

If the receiver board is hidden by a building or a metal envelope, you can use an external antenna with its preamplifier which is fed directly by the coaxial connected to the SMA connector.

The receiver and external antenna set can be bought for less than 10 € at Aliexpress. Take Aliexpress standard shipping and you will receive your package within 10-15 days.

Reading data

The easiest way is to connect via the micro-USB to a PC or a microcomputer such as a Raspberry-Pi or an Orange-Pi. You can use the serial interface by connecting to a UART. Be careful to choose the 3.3v or 5v supply voltage according to the chosen UART. To read the content sent every second by the receiver, you need a “serial monitor” software like Putty for Windows or Minicom for Linux.

Connect to 9600bauds, 8 bit, 1 stop bit on the correct COM port.

If you have software like Arduino, use the included monitor.

On the 5 output pins is the output marked PPS (Pulse Per Second). It provides 1 rising edge every second very precisely. It can be used to count elapsed time with the accuracy of GNSS clocks.

NMEA data

The data provided is in the NMEA0183 format well known to sailors. Every second the receiver sends a lot of information such as:


Each message begins with a $ followed by 5 letters then a series of digits or characters separated by commas.

The first two characters after the $ sign identify the origin of the signal (the constellation of satellites). The main prefixes are:

  • BD or GB – Beidou ;
  • GA – Galileo ;
  • GP – GPS ;

The prefix GN is used in the case of mixed GPS + GLONASS signals.

$GNRMC       : type de trame
145341.00   : heure UTC exprimée en hhmmss.sss 
A            : état A=données valides, V=données invalides
4338.87446    : Latitude exprimée en ddmm.mmmm : 43° 38.87446 mn
N            : indicateur de latitude N=nord, S=sud
00707.82656  : Longitude exprimée en dddmm.mmmm :  
E            : indicateur de longitude E=est, W=ouest
0.3            : vitesse sur le fond en nœuds 
0       : route sur le fond en degrés
040621       : date exprimée en qqmmaa : 4 Juin 2021
,            : déclinaison magnétique en degrés (souvent vide pour un GPS)
,            : sens de la déclinaison E=est, W=ouest (souvent vide pour un GPS)
A            : mode de positionnement A=autonome, D=DGPS, E=DR
*53          : somme de contrôle de parité au format hexadécimal3 

For details of all messages received, go to the U-Blox website (Swiss company)

The analysis of messages is easy in a microcomputer to have a localization solution adapted to its needs.

F1ATB André

Ham Radio - Home automation - Photovoltaic

You may also like...