Introduction: Easy As Pie GPS Datalogger

Picture of Easy As Pie GPS Datalogger

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!

Picture of 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!

Picture of 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
+V------------------------+V--------------------------+V
Gnd---------------------Gnd-----via switch-----Gnd
Tx------------------------Rx

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!

Picture of 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!

Comments

MikeD279 (author)2016-12-14

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!

MikeD279 (author)MikeD2792016-12-14

OK, I found that you have to convert the file to a KML by using a website like this:

https://www.h-schmidt.net/NMEA/

Hope that helps everyone.

Crucio (author)MikeD2792016-12-21

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.

Crucio made it! (author)2016-12-21

Currently only breadboarded, but I used a tiny $16 SparkFun GP-20U7 GPS, a 3.3v regulator, 3xD cell batteries, a switch, and of course the openlog. Works great! Planning to take it on a long sailing trip next year. Thanks again, tinkrmind!

MikeD279 made it! (author)2016-12-14

Found a smaller GPS. it works well!

tinkrmind (author)MikeD2792016-12-15

So glad you got it working! Thanks for sharing!!

remiborlet (author)2016-11-28

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.

tinkrmind (author)remiborlet2016-12-07

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.

remiborlet (author)tinkrmind2016-12-08

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.

tinkrmind (author)remiborlet2016-12-08

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

BernWozny (author)2016-11-27

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?

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.

tinkrmind (author)BernWozny2016-11-27

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.

SallyJ18 (author)tinkrmind2016-11-27

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.)

SallyJ18 (author)SallyJ182016-11-30

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.

tinkrmind (author)SallyJ182016-11-27

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!

Crucio (author)2016-11-29

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!

WannaDuino (author)2016-11-27

does it also can read speed ?

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

wesleysuhler (author)WannaDuino2016-11-28

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

tinkrmind (author)WannaDuino2016-11-27

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.

LesB (author)2016-11-27

Elegant solution!

tinkrmind (author)LesB2016-11-27

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

LesB (author)tinkrmind2016-11-27

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

tinkrmind (author)LesB2016-11-27

Glad you liked it!

SallyJ18 (author)2016-11-27

What is the update rate for this? 1.e. how long does it take to fill a microSD card?

I assume that without command codes being sent to the GPS it continuously outputs the positioning string at its refresh rate? This is the simplest solution I've seen so far!

tinkrmind (author)SallyJ182016-11-27

You're right, it sends data every two seconds. So that would be about 70 bytes (very roughly) every 2 seconds.. say 4GB SD card.. About 3 years of continuous data. You don't need to worry!

kmpres (author)2016-11-27

Nice idea! Can you read the data while on the run, say, in an Android phone?

tinkrmind (author)kmpres2016-11-27

You would have to add some sort of communication method to the android device. I think a wireless connection would be fairly simple.. pop in an HC05 in there. But it would almost double the battery usage and would be against the spirit of simplicity. I think the best way would be to expose the Tx line and attach an FTDI to the phone and read using any of the serial emulator apps.

gaj1967 (author)2016-11-27

So nice and simple. I was wondering if I could use GPS module https://www.sparkfun.com/products/13740 instead? Looks like it could be a smaller and cheaper solution.

tinkrmind (author)gaj19672016-11-27

A keen consumer eye! Yes, it'll work just as well.

gaj1967 (author)tinkrmind2016-11-27

Only thing that I see that might need changing is battery voltage. Sparkfun's GPS is only listed as 3.3volts instead of 3.3v/5v on the Seed.

tinkrmind (author)gaj19672016-11-27

In case you are wondering about some other module as well, I think this will help:
Any GPS that send data using serial connection (identified by Tx and Rx wires on PCB or the word 'baud' in the datasheet) will work. :)

mulqueen (author)2016-11-27

Is the altitude data captured as well?

tinkrmind (author)mulqueen2016-11-27

Yeah, but it's not super accurate.

remiborlet (author)2016-11-27

Nice work! Will make one similar to this since my Sony GPS tracker for photography got damaged some time ago.

tinkrmind (author)remiborlet2016-11-27

Would love to see a photo of the end result!

RamblinLane (author)2016-11-24

Cool nice idea. what about adding a timer to get it to start at a predetermined interval?

tinkrmind (author)RamblinLane2016-11-24

OpenLog is based on arduino and the code is open source. I think it'd be
quite easy to write a bit of code to start recording after a set
interval. But, this project was aimed to be dead simple :)

romanfernandez (author)2016-11-24

Great instructable. How much power is the GPS using? Can you leave the GPS on so it does not need to reacquire the position and just turn off the data logger? And last but not least, how long after normal power up before you get useful GPS location? Thank you.

tinkrmind (author)romanfernandez2016-11-24

The GPS itself draws about 50mA, so the bulk of the power consumption. You can do that by adding a switch between the Tx of GPS and Rx of the datalogger. But, since the power saving by doing that is minimal, I wouldn't advise it. Time to cold fix depends on a number of factors including -but not limited to- your speed, time and distance from last fix, cloud covert, how many satellites happen to be around.. I generally get a fix within 10-15 seconds.

About This Instructable

18,977views

276favorites

License:

Bio: Atheist, Feminist, Critical Thinker. Maker of things, user of opensource.
More by tinkrmind:Wooden LED Clock - Analog StyleEasy as pie GPS dataloggerWooden Precision Screwdriver Set
Add instructable to: