Project tutorial
Simple GPS Speedometer with Logging

Simple GPS Speedometer with Logging © Apache-2.0

My daughter is getting adventurous in her cycling, so I put together a simple logger and speedo to show where she traveled

  • 7 views
  • 0 comments
  • 0 respects

Components and supplies

Apps and online services

About this project

Here is a really simple project that's both fun and practical at the same time. This logger is inexpensive to make, and can go most places to give you a detailed record of your travels. Originally, I built this to be used on a bicycle, but there is no reason it can't be used as a head-up display in a car for example.

Features

Since we already know how fast we're going, it's very easy to add a speedometer display as well. Most MAX7219-based displays are eight digit, so there is room to spare since realistically, the speed is not likely to exceed three digits. To this end, the leftmost display displays the number of satellites currently in view.

Similarly, you could add a clock on the left side by using the displaySpeed() routine as a template.

The software is also quite modular, so you can elect to only add the parts you require. Or you could add even more if you wish.

The Hardware

The parts list covers all the details, but in summary, this project is not critical for it's components. I used a Freetronics EtherTen controller because it already has the SD card built in. You could use an Arduino Nano and make the package a little smaller as well. Use what you have on hand is my advice.

The Software

The software is very straightforward: "Setup() initialises the hardware serial (for debugging), software serial (GPS connection), SD driver and display. If you get only garbage from your GPS, check the baud rate in "ss.begin()". My modules all work at 9600 baud, but some older modules start at 4800.

Loop() checks the incoming stream for valid NMEA messages. Once a valid message is received, it is taken apart by the tinygps library and the data formatted into a comma-separated string for writing to the SD card. Once the data is written, the display is updated. This happens approximately every second.

One small complication was that the speed value was a float, and we don't really need to know the fractional value of a speed, so we convert the speed to an int before display. This has the added bonus of making the speed display more stable as well.

The left-most digit of the display is used to show the number of satellites in view. You might choose to leave this out once your unit is working.

The Git repository also contains a small Python script "export-gpx.py" will take the csv output from the logger and write out a garmin gpx file (which is xml). This can be imported into Strava, etc.

Construction

Start your construction by mounting the parts into your chosen enclosure. Use a plastic enclosure to make sure the receiver can pick up the GPS signals. Some receiver / antenna combinations seem better than others, so a little experimentation is required.

Most current modules feature a LED which will flash in sync with the GPS "PPS" output. When there is no valid data, it will usually be solid on, but will start flashing when data is available. This is a great way to test your device inside the enclosure.

Next, using standard jumper wires, connect the modules together as per the wiring diagram. Note that I didn't include the power wiring in order to make the signal wiring more obvious. Be careful however, most GPS modules are 3.3V. Check with your supplier if you are unsure.

Be aware that some GPS modules take a number of minutes to report after they are powered up. The module shown here has a battery which keeps the receiver powered at all times, even though the interface is off. This considerably speeds the startup process. If you need to buy a GPS module, I would recommend making sure your chosen module has a keep-alive feature.

Since the finished product is intended to be mobile, it would be worth securing the jumper wires to ensure reliability. Some hot glue will do the job nicely.

Mounting the finished product is up to you. I used velcro tape to attach it to the carry basket on the front of the bike.

After a journey, shut down the logger, and remove the SD card. Use export-gpx.py as to create a gpx file (don't save this on the SD card!).

Now, you can upload the file to Google maps and plot your journey.

You can do this by signing into maps.google.com, choosing "Your Places", "Maps" and "Create a new Map"

This gives you a screen similar to the one shown below where you can import your data:

Click import to load the gpx file. Google will take a minute or so to process your data then provide you with a new track of your journey.

I am not showing the final map output for reasons of privacy.

Code

https://github.com/au-chrismor/GPS-Speedometer

Schematics

Fritzing Wiring Diagram
gps-speedometer_gLwES5TXFV.fzz

Comments

Similar projects you might like

GPS Location Display With GPS And TFT Display Shields

Project tutorial by Boian Mitov

  • 19,276 views
  • 7 comments
  • 37 respects

GPS LED Bike Speedometer

Project tutorial by Jeremy S. Cook

  • 5,146 views
  • 4 comments
  • 9 respects

A cheap and accurate clock based on GPS

Project tutorial by Ingo Lohs

  • 3,242 views
  • 1 comment
  • 11 respects

Sandro: Your Personal GPS Assistant

Project tutorial by Mohamed Fadiga

  • 6,242 views
  • 2 comments
  • 14 respects

Log GPS Information to MicorSD Card with Visuino

Project tutorial by Boian Mitov

  • 12,440 views
  • 11 comments
  • 33 respects

GPS Tracking System with Arduino Uno and Digilent PmodGPS

Project tutorial by Ian Etheridge

  • 10,169 views
  • 1 comment
  • 27 respects
Add projectSign up / Login