Easy As Pie GPS Datalogger




Introduction: Easy As Pie GPS Datalogger

About: Atheist, Feminist, Critical Thinker. Maker of things, user of opensource.

This project came out of a very simple need; the need for speed. The night before I was leaving on my road-trip across the Grand Canyon, I realized I didn't have my Garmin with me. So I hacked this together. However, I have since realized I absolutely love the simplicity of this thing. There's a certain freedom in just pushing a button, being sure that your tracks will be recorded and dealing with everything else later on.

I know what you're thinking. Isn't there an app for that? Well, my three part answer to that is that apps crash, phones die and A-GPS(the kind of GPS used in phones) doesn't work everywhere. I learned this lesson the hard way.

The idea is pretty simple. I have two main components, a GPS unit that sends the current GPS location over serial and Openlog from Sparkfun which takes a any incoming serial data and writes it to a microSD card. To access the data, just pop the microSD card into your computer and open the file using Google Earth. Easy as pie!

Step 1: Get Set!

Here's what you need:
* OpenLog datalogger
The easiest way to log serial data!!
* GPS unit
Selected for it's small size
* AA battery holder
* AA Batteries
* Slide switch
* microSD card formatted to FAT16/32 (not in picture)

Step 2: Make It!

There really isn't much to describe. I removed the 4 pin connector as it was taking too much space. Then, using some jumper cable I soldered the following connections:

GPS OpenLog Battery
Gnd---------------------Gnd-----via switch-----Gnd

I drizzled entirely too much hot glue over everything to make sure it was (slightly) water resistant.

That's it! Put a formatted SD card in OpenLog, flick the switch and you're in action. Switch it off and there's no battery drain. Every time you switch it on, OpenLog creates a new file in the misroSD card, storing all the data the GPS is sending.

Step 3: Use It!

When you first switch on the unit, you will note that a blue LED blinks on the OpenLog, this indicates that the unit is functional and recording data. If it stops biking, it's time to replace the batteries. I measured the current draw to be 55mA on average. With a 2000mAh AA battery, that would be just over 36 hours of continuous use.

When you first switch on the GPS it can take a solid 15-20 minutes to get a fix on the location. I would suggest powering on the GPS and leaving it outdoors for an hour the first time you use it. Then verify that you did indeed get a fix on your location. After this, as you use it normally, it would get a fix within 10-15 seconds.

The logs are stored as numbered .txt files "LOG00001.txt", "LOG00002.txt" so on. But the data is actually in NMEA format. So, to open the data in Google Earth you have to rename the file to ".nema". So "LOG00001.txt" becomes "LOG00001.nmea". You can then open it in Google Earth by just going to File>Open and browsing to the file.

You can get creative with it and use tools like MapBox to make some amazing roadtrip scrapbooks!

2 People Made This Project!


  • Metalworking Contest

    Metalworking Contest
  • Water Contest

    Water Contest
  • Fix It! Contest

    Fix It! Contest

37 Discussions

Hi! I built it and have a .TXT file that I renamed .NMEA but Google Earth doesn't recognize it as a GPS file. I can't even select it from the "open" drop down...

Any idea?

Thank you for the fun project BTW!

2 replies

Actually, that's not necessary. If you do the TXT -> nmea rename, there's a dropdown to open nmea data in the open dialog of Google Earth. I just did that and it worked without problems.

I want to make a smaller version of this, powered by a single AA battery. I also want the GPS antenna to facing upwards when I have it in my pocket, but I am having problems finding a suitable GPS receiver. I want an antenna such as this one: http://tinyurl.com/h5f74e9 but the receiver board is too large.

Can anyone recommend a smaller receiver? The antenna needs to be small enough to be placed along the shortest edge of the case.

3 replies

If you want to power it off of a single AA battery, you'll need a DC-DC converter. That will decrease the efficiency quite a bit as well.. But here's the smallest GPS module I could find. Here's a small 5V step up module as well.

thank you. I am actually now looking into making my own pcb with all the neccesary components embedded. Why do you say that a voltage regulator/booster will make the system less efficient? I only need to provide 3.3V, which limits the gap between Vin and Vout. I bet I could find a regulator that does that pretty efficiently. In addition, some boosters can operate with voltages as low as as Vin=0.5V, making it possible to extract more power from the battery than without a booster. Overall, the power supply could be more efficient with a regulator than without.

I only meant to point out the losses in DC-DC conversion, which would be significant if, say, you took an off the shelf converter module-those things get hot!. But hey, if you're spinning your own board, nothing is stopping you! I'm sure you can convert 0.5-1.5V to 3.3V with >90% efficiency. And
you might be able to get the last 10-20% juice from the battery when it
goes below 1V. So there's a marginal gain in power there. But can decrease the power consumption further by moving to say an attiny instead of the Atmega328 and using the lowpower library cleverly. Go for it man! Looking forward to the results :D

How do you verify if the GPS has a fix on first power on?

Also does the time lag in getting a fix happen each time you change the batteries?

5 replies

I've been using a similar GPS module, and it has an on-board LED that can be used to check GPS fix. In my model (a GY-NEOGM v2 ) this LED flashes once per second whenever there's a fix. However, I know this could be very different in other modules.

It's not possible to tell if the GPS has a fix without looking at the data in the SD card after the recording is over :( The long time lag only happens when you power on a brand new GPS module because it needs to process a lot of data to identify it's location. The lag will also be there if you move to a different part of the planet. But, changing batteries is the same as powering on and off. No substantial lag.

The long delay in synchronising its position is because the data is in two parts: the Almanac and the Ephemeris data. The Almanac doesn't change very often/quickly, so its not transmitted very often (hence the 30s+ wait), but it can be used if the power interruption wasn't too long or far away. It details (I think) data about the satellites available and their position errors. The ephemeris data is transmitted continually, and from the two, the location can be calculated using enough satellites to refine the position. 3 satellites will give an inaccurate position, but 5+ should be good enough for us. (The US GPS system can also include a spoiler signal to degrade accuracy in time of war, but I believe it is normally switched off nowadays.)

In fact, I'm not strictly correct: the Almanac is not always needed by newer receivers, but it is only transmitted infrequently(12.5mins/satellite). It is receiving the Ephemeris which leads to the 30s delay. Once received in toto and the satellites located, their continuously transmitted time and status signal is used to calculate your second-to-second position. (See the GPS WIKI for much more info!) Just beware of attributing too much precision to the data sentence obtained from the receiver: It's been calculated and depends on the quality of the software in the receiver.

Oh, I had no clue about the Almanac information being transmitted.. I hope you don't mind if I include this in the instructable. Thanks a bunch!


1 year ago

Oh wow, this is super! I'm going to try to use something like this to capture the breadcrumb path on a sailing trip from Panama to Hawaii next year!

does it also can read speed ?

if i race with my RC car! can it tell the highest speed limit i raced?

2 replies

I wonder if there's a way to power it using the esc. That way you wouldn't have to lug the extra batteries.

I'm not a 100% sure but I don't think it captures speed directly. You'd have to back calculate if from the time stamp and positions. I hope you do it though! It's a fun use case.

Dunno if you're being sarcastic.. but I'll take it! Thanks!!

Absolutely not sarcastic. A simple solution to a problem. That's elegance.