You are hereHome / Arduino Projects / Project Page: GPS Logger

Project Page: GPS Logger

GPS Is Everywhere

With the availability of low cost GPS receivers and free access to satellites, GPS based projects are a natural for the DIYer.  My goal for this project was to record my coordinates as I was skiing and play back my runs in Google Earth.

I choose to use a Pharos GPS-500 rather than a receiver mounted on a shield.  Since the Pharos uses the popular SiRF Star III  chipset it is just as easy to incorporate as other receivers.  The one I bought is Microsoft branded and is packed with their Streets & Trips software. Shuttle bus route A USB to serial converter is also included.  It’s possible to solder hookup wires directly onto the contacts of the Pharos and plug it into digital pins of the Arduino.  I thought that it would be better to keep it intact and use it as a USB device, which allows me to connect it directly to a computer if I wish.  A USB host shield connects the GPS to the Arduino.  Fortunately, support for the USB to serial converter is included in the USB library since it uses the PL2303 chipset.

With the GPS plugged into the USB host shield I could see raw data coming in the serial port window of the Arduino IDE.  Using the TinyGPS Library to parse the data on the fly let me print out the latitude and longitude received.  The next step was to hit the road and see if the data looked correct.

Testing in the Wild

BaseI hooked up a LCD to display the coordinates, put the boards, a breadboard and LCD in  a cardboard box and walked around the block.  The rig was tethered to a laptop that supplied power and showed the raw data.  The coordinates changed as I walked around, which was a good sign.  When I got home I copied and pasted the raw data into a text file and converted it to GPX format with GPSBabel.  Importing this file into Google Earth proved that the test was a success

The next step was to collect a more substantial amount of data, which meant the rig was coming on my commute.  Despite the often repeated recorded pleas to report any suspicious behavior on the bus, no one reported that there was a guy with a backpack, laptop and what could be described as a suspicious looking cardboard box with a LCD and wires sticking out of it. I was thrilled to see the bus route mapped out in Google Earth when I arrived at work.

BaseNow it was time to lose the tether to the laptop, so I needed a way to store the raw data.  My first choice would be to put the GPS receiver on a hub with a thumb drive.  Since the USB library does not support mass storage devices I choose to use SD card storage, which is pretty well supported on the Arduino platform.  The SD shield that I bought and the USB host shield use the SPI interface so it was straight forward to get them working together.

BaseAnother cardboard box served as the prototype for the non-tethered GPS logger.  I used a 9V battery holder with an on/off switch to power the new rig.  More commuting, now with a less conspicuous device, showed continued success, encouraging me to build a more permanent version.

BaseThe project box that I choose is bigger than I really wanted, but those 9V batteries take up a lot of space.  I thought of different designs with LEDs indicating various states but decided to make it as simple as possible.  The interface consists of a single switch to turn the logger on and off.  The only requirement was that the switch would be large enough to operate with gloved fingers.  The GPS receiver glows blue when it has power so there is no need for a separate LED indicator.  I banded the receiver to the enclosure for convenience but it could easily be separated to be placed away from the enclosure for better satellite reception.

BaseMeanwhile, I wrote a Python  program to convert the raw data to GPX format.  Everything was working perfectly until garbage characters started showing up on the SD card.  The card deteriorated to the point that it can no longer be formatted.  Replacing the card seemed to resolve the problem.  I also touched up a couple solder points on the card reader but am not certain that was the real fix.

Off to the Slopes

BaseThe big test of the logger came in early February in the White Mountains of New Hampshire.  My family was skiing at Attitash Mountain and when the girls broke for lunch I grabbed the logger from my backpack, slipped it into my inside jacket pocket and headed for a lift.  I traveled from the base of Attitash to the adjacent Bear Peak and back.  As soon as we returned to the North Colony Motel I transferred the data into Google Earth on the laptop and, right there in room number 2, relived my trips up and down the mountain.

I was really pleased with the performance of the GPS logger.  One of my main concerns in the beginning was that the receiver would not be able to get a fix from inside my pocket.  The initial walk-around-the-block test proved it could with no problem.  The size makes it a bit cumbersome to carry skiing, but it did not bother me while going down the hill.

Parts Bin

Parts Bin

Data Logging Shield

from Adafruit Industries

ON/OFF Switch

from Tayda Electronics

Bongo Tie

from Bongo Ties