# GPS Data Logger for Road Runners

6,017

51

4

I am a road runner (by foot) myself, and I like numbers and math as well (as an Engineering student). The idea of tracking/marking my running path for post-analysis has always fascinated me, but I always face a problem acquiring GPS-enable wrist watches: they are very very expensive, ranging from \$120 up to \$1,500 and so on.

That's a prohibitive price point for a hobbyist like me, so I decided to make my own GPS-enable tracker/logger for my road races. The idea was to unite my two passions (electronics and running) in a single solution to make my life easier and more fun.

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: Choosing the Components

I wanted to keep the budget as low as possible while still being able to make it. So all components listed below were obtained from eBay sellers, even the cheapest ones I could find on that website. You are going to need:

- Arduino Pro Mini > US\$ 1,99

- MicroSD card Breakout > US\$ 2,00

- 2GB (or greater) microSD card > US\$ 2,49

- GPS module (uBlox Neo-6M) > US\$ 9,95

- 3.7V/600mAh Li-ion Battery (model aircraft ones) > US\$ 2,01

- 3.7V to 5V step-up converter > US\$ 0,76

## Step 2: Schematic Diagram of the Data Logger

The idea is that the Arduino Pro mini manages everything, from GPS readings to SD card writings, because the components needed are only those presented in the imagem below.

Another important detail is the dc-dc boost converter; it is necessary to step-up and adjust the variable voltage from the battery (3.7V and down) to steady 5V that the Arduino Pro Mini and the GPS module requires.

The imagem shows:

- in RED the +5V and Battery voltages

- in BLACK the ground (reference, GND)

- in Green and Yellow the GPS serial communications line

- The other colors are communications and control lines for the micro SD card breakout.

## Step 3: The Arduino Code

The most updated version (if any) of this GPS data logger code can be found in my GitHub page, on this link.

What the code below does is save Latitude, Longitude, date, time and speed to a .csv file called "rundata.csv", every 2 seconds.

Click here to see the code (on GitHub) for the Arduino Pro Mini

## Step 4: Utilization and Example of Data Obtained

Here is a picture of a 21km race I made while carrying my GPS data logger. The track is in red over a satellite view map.

All you have to do is power up the circuit, and it will instantly start logging your GPS data (even befor GPS fix) to the microSD card.

Below I extracted a bit (16 seconds) of the raw data saved to a microSD card.

Lat Long Altitude Speed (km/h)
-26,4750720 -49,0913160 41,9 3,83

-26,4750630 -49,0913350 42,1 0,96

-26,4750490 -49,0913500 42,4 6,74

-26,4750440 -49,0913080 39,9 3,63

-26,4750550 -49,0913390 36,9 9,59

-26,4750480 -49,0914190 44 10,91

-26,4750480 -49,0914190 44 10,91

-26,4750780 -49,0915560 47 15,74

Participated in the
Sensors Contest 2016

## Recommendations

• ### Internet of Things Class

21,548 Enrolled

## 4 Discussions

Arduino : 1.8.5 (Windows 7), Carte : "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"

C:\Users\Lucas\Desktop\Running_GPS_logger-master\Running_GPS_logger-master\GPS_com_SD_card\GPS_com_SD_card.ino: In function 'void loop()':

GPS_com_SD_card:68: error: no matching function for call to 'SDLib::File::print(double, int, int)'

dataFile.print(gps.location.lat(),2,6);

^

C:\Users\Lucas\Desktop\Running_GPS_logger-master\Running_GPS_logger-master\GPS_com_SD_card\GPS_com_SD_card.ino:68:42: note: candidates are:

In file included from C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Stream.h:26:0,

from C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/HardwareSerial.h:29,

from C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Arduino.h:232,

from sketch\GPS_com_SD_card.ino.cpp:1:

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:65:12: note: size_t Print::print(const __FlashStringHelper*)

size_t print(const __FlashStringHelper *);

^

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:65:12: note: candidate expects 1 argument, 3 provided

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:66:12: note: size_t Print::print(const String&)

size_t print(const String &);

^

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:66:12: note: candidate expects 1 argument, 3 provided

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:67:12: note: size_t Print::print(const char*)

size_t print(const char[]);

^

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:67:12: note: candidate expects 1 argument, 3 provided

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:68:12: note: size_t Print::print(char)

size_t print(char);

^

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:68:12: note: candidate expects 1 argument, 3 provided

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:69:12: note: size_t Print::print(unsigned char, int)

size_t print(unsigned char, int = DEC);

^

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:69:12: note: candidate expects 2 arguments, 3 provided

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:70:12: note: size_t Print::print(int, int)

size_t print(int, int = DEC);

^

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:70:12: note: candidate expects 2 arguments, 3 provided

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:71:12: note: size_t Print::print(unsigned int, int)

size_t print(unsigned int, int = DEC);

^

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:71:12: note: candidate expects 2 arguments, 3 provided

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:72:12: note: size_t Print::print(long int, int)

size_t print(long, int = DEC);

^

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:72:12: note: candidate expects 2 arguments, 3 provided

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:73:12: note: size_t Print::print(long unsigned int, int)

size_t print(unsigned long, int = DEC);

^

Plusieurs bibliothèque trouvées pour "SD.h"

Utilisé : C:\Users\Lucas\Documents\Arduino\libraries\SD

Non utilisé : C:\Program Files (x86)\Arduino\libraries\SD

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:73:12: note: candidate expects 2 arguments, 3 provided

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:74:12: note: size_t Print::print(double, int)

size_t print(double, int = 2);

^

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:74:12: note: candidate expects 2 arguments, 3 provided

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:75:12: note: size_t Print::print(const Printable&)

size_t print(const Printable&);

^

C:\Users\Lucas\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Print.h:75:12: note: candidate expects 1 argument, 3 provided

exit status 1

no matching function for call to 'SDLib::File::print(double, int, int)'

Ce rapport pourrait être plus détaillé avec

l'option "Afficher les résultats détaillés de la compilation"

activée dans Fichier -> Préférences.

Good morning i would like to tell me which library you are using and with what kind of load is loaded in arduino thanks

Hi, thank you for asking this! I will update this instructables soon. You can vizualize .gpx data files directly on this website: http://www.gpsvisualizer.com/ . If you have .csv (comma separated values) files you can vizualize them by importing it into Microsoft Excel and generating a line chart.