Arduino GPS Tracker

The Plan

For this weekends project I decided to design and build a small GPS tracker.  The aims was:
  • Should be small enough to take on walks with the kids in my rucksack
  • Record time and position on an SD card every few seconds as a CSV file
    • Next stage log full kinematics
  • Run off batteries for a 'useful' amount of time
    • Minimize number of components 
GPS Tracker

The Micro-controller design

I decided to try and build a 3.3v Arduino based on the 328P-PU micro-controller.  There are a couple of good blogs showing the extended run time with the drop in voltage from the normal 5v to 3v, which seemed ideal.  The downside of running on 3.3v is that you also have to drop the clock speed to 8Mhz to stay within the parameters of the micro-controller.

After lots of reading I created a new board entry in boards.txt that dropped the clock speed to 8Mhz and uses an internal resonator as the clock.

############################################################## "Uno" @ 8MHz INTERNAL - Optiboot

Once this was working I was able to upload the bootloader or burn the program directly using the Arduino IDE and my USBasp programmer.

The GPS receiver

I received a ublox GPS receiver (GY-GPS6MV2) in the post during the week so set to work getting it running.

GPS Receiver
The UNO only has one hardware serial port, which is used for debugging, so I used the SoftSerial library to connect the GPS receiver. To decode the NMEA format messages from the GPS receiver I used the excellent TinyGPS library.  Putting the two together was simple following the examples and I was soon outputting the GPS data.

Writing Files to an SD card

Building on a previous Arduino SD card blog, I added an SD card reader/writer.  The providers the ability to write the GPS output to a csv file.   The SD card writer uses SPI to connect to the micro-controller.

The CSV files can be loaded directly into Google fusion tables to visualise the data in Google Maps or Google Earth.


Once the bread boarding was complete I soldered a bare-bones UNO with a hard-wired SD card reader and serial header connections for the GPS receiver.

Arduino GPS Tracker
I had an issue with memory overflow with the SD library which caused the Atmega to reset when it was writing to the SD card.  I solved this by upgrading to the latest version of the SD library from github and by being more efficient with my programs memory usage.


I decided to power the tracker using a 3.3v regulator via a 2.1mm jack.  The regulator is obviously less efficient than powering the board from a 3.3v source directly (e.g. 2*AA batteries), but gives the flexibility to use different power packs (e.g. 4*AA or 9V P3 batteries).

Next stages

Now that the basic electronics are complete  I am planning the next 'upgrades'
  1. Status LEDs for satellite lock and SD card availability
  2. I forgot to add a pull-up resistor to the reset pin + reset button.  Seems to be working ok....but just to be safe
  3. Housing.  I designed the layout of the tracker to be tall and thin to fit inside a slim water bottle.  This provides an excellent solution to take the tracker in one of the side pockets of my rucksack.
  4. Add a UV sensor and log output - need to check the water bottle doesn't filter UV ?
  5. Add a 6/10 DoF sensor - complete kinematic recording.  I have several I2C sensor packages that I can use, just need to add a header


  1. Hi, you have a code sample here. I was studying the right time. Thank you


Post a Comment

Popular Posts