sub-$50 DIY 10hz Bluetooth GPS Receiver

Full Disclosure: I got this project from Aidan over at miataturbo.net. The original thread is here. There is also a thingiverse page on this, which includes all links plus a 3D drawing to 3D print an enclosure for it.

If you do HPDEs, autocrosses, etc, you will likely eventually find yourself wanting to get good lap timing. It used to be that you had to buy a standalone system to do this, which cost thousands of dollars. These days, you can get away with an app for your phone. There are several popular ones, including Harry’s Lap Timer and RaceChrono, available for both iPhone and Android. These apps will show you not only your lap times, but also more detailed information, so you can determine which lines are fastest and help improve your driving.

By default, these apps use a phone’s built-in GPS to get your location and speed. The issue with this is that most phones have a 1hz GPS unit. This means that they can get updated coordinates once per second. While this sounds good, it’s actually too slow for good resolution. Instead, it’s better to get one of the many available 10hz or better GPS units and connect them to your phone via bluetooth.

Unfortunately, the cheapest existing receivers are in the $80+ range, and they aren’t very reliable. However, dozens of companies these days make small GPS, bluetooth, and other modules that can be easily hooked together. This project involves 3 such components (Bluetooth, GPS, and USB), costing a total of about $20, and soldering them together.

Source: http://www.thingiverse.com/thing:698168

Source: http://www.thingiverse.com/thing:698168

The diagram, taken from the thingiverse page, illustrates what will happen. You buy the 3 modules: bluetooth, GPS, and USB. Ground and power from the Bluetooth and GPS modules are connected to ground and 5V power on the USB module. Then, TXD (transmit) on the Bluetooth module is connected to RXD (receive) on the GPS module, and vice-versa. At the end of the day, your phone connects to the bluetooth module, and it forwards data to and from the GPS module. Easy peasy.

I’ll note here that this module does need to plugged in, there is no battery. Adding a battery, particularly the charging circuit, would add complication. Honestly, I find it easier to hardwire this once and forget it.

(Note: I’ve seen discussion on this project centering around using 5V power to the HC-06, stating it requires 3.3V. This isn’t quite true – the module itself does require 3.3, but the commonly purchased submodule, such as the I bought, includes a voltage rectifier allowing it to take between 3.3 and 6V, as it says on the underside. Further reading here.)

Shopping List

(Note: The price of these parts fluctuates _all_ the time. You can shop around Amazon, Ebay, Adafruit, Digikey, Mouser, etc and try to find the lowest prices – don’t forget shipping! A lot of these components ship from China, as well, so be prepared for slow ship times.)

Parts:

  • HC-05 or HC-06 Bluetooth Submodule (Either one will work, I found the HC-06 a little bit cheaper)
  • Reyax RY8253F GPS Module The older RYN725AI also works but is discontinued, as a commenter below pointed out. You want a GPS module that can do 10hz, has serial, has flash, and is powered by 3.3V to 6V with 3.3V logic.
  • USB Mini Breakout Board (Although I wish I’d gotten a USB Micro Breakout Board, since I have more of those cables – should also work)
  • Some double-length header pins
  • Replaced by Reyax RY8253F above: RYN725AI GPS Module (I accidentally bought the RYN25AI, which is a bit cheaper but has no flash or EEPROM to permanently store the 10hz setting. Some versions of the RYN25AI do have EEPROM – make sure you get one of these. If you make this mistake, you’ll simply have to reprogram the chip for 10hz when you use it, as the battery only lasts about a day. You cannot add EEPROM on afterwards.)

You also need a few tools, if you don’t already have them:

All of the parts required

All of the parts required

Here’s a picture showing all of these parts ready to go.

Fixing the Bluetooth module

The HC-06 comes with pins pre-installed

The HC-06 comes with pins pre-installed

The HC-06 will come with 4 pins preinstalled in VCC, RXD, TXD, and GND. This is fine for VCC, but we want to put some pins directly from the other 3 into the GPS module. We also want the chips (and the antennas) on each module to face away from each other. As such, you’ll have to remove three of these original pins.

Use the smallest snips you have to separate the plastic

Use the smallest snips you have to separate the plastic

You need to separate the little plastic pieces, whatever they’re called, to get the 3 other pins out while leaving VCC in place. You could slide all 4 plastic pieces off of the pins, if you want. I find it easiest to grab some snips like the ones pictured, and simply clip them apart.

With the board held down, heat with the iron and pull with the pliers

With the board held down, heat with the iron and pull with the pliers

After clipping them apart, I clamped the board to my bench. I used the soldering iron to heat the solder, and then used the pliers to pull it out. If you have desoldering wick, that’s even better. Use the iron to heat the solder, and let the wick suck it up. If I did this again, I would do it this way, because it will make the next step easier.

3 Pins in RXD, TXD, GND

3 Pins in RXD, TXD, GND

Same 3 pins on the other side - GND is much longer

Same 3 pins on the other side – GND is much longer

Once the original pins are removed, we can put in pins of our own. You want them to go through the board, with the GND pin being one of the double-length header pins in the shopping list. The other two (TXD and RXD) can be normal length, like one of the many pins that ships with the components. As I said, if you used a desoldering wick earlier, the pins should now be nice and free of solder. If you didn’t, they’re probably full of solder, in which case you’ll have to do your best to heat the solder up while you ram the pin in with some pliers.

Putting a pin in VDD on the GPS module

Pin for 5V Power in VDD

Pin for 5V Power in VDD

We’re nearly ready to hook the GPS and Bluetooth modules together. Before doing that, though, we should put a pin in the GPS module for 5V power while we still have easy access. This should be another double-length pin, with most of the length towards the bottom, so we can bend it to hook into the USB breakout module later.

Combining the Bluetooth and GPS modules

Stacking the modules

Stacking the modules

Side view showing clearance between the two modules

Side view showing clearance between the two modules

It just so happens that RXD, TXD, and GND on these boards line up so that we can just stack them as shown. The three pins soldered to the bluetooth module earlier will stick straight into the GPS module pins. As in the original diagram from earlier, RXD on Bluetooth goes to TXD on GPS, TXD on Bluetooth goes to RXD on GPS, and GND on Bluetooth goes to GND on GPS.

I also allowed a bit of a gap between them. Truthfully, they should also have a sheet of insulator as well, but I didn’t do that. Presumably You could still wedge something in there after soldering.

Both pieces combined

Both pieces combined

Once this step is complete, you’ll have something like the above. Notice the ground and +5V pins are quite a bit longer than the other two. That’s so we can hook them to the USB breakout module in the next step.

Hooking up the USB breakout module

The USB module hooked up

The USB module hooked up

The USB breakout module only has two pins we care about, VBUS (+5V) and GND (ground). The other pins are for data, and we are only using the USB cable for power. I simply bent the extra-long pins over with pliers until they would hold the USB breakout module where I wanted it, as shown. The GND pin was a little bit short, so I actually soldered extra pin to the board, bent that, and connected it to the original GND pin on the GPS module.

In any event, as long as the wiring looks like the above, it should work.

The Bluetooth module needs a 5V wire

The Bluetooth module needs a 5V wire

Of course, the Bluetooth’s 5V module was on the wrong side, so it didn’t line up nicely. I simply took a short piece of 22 gauge wire and soldered it to the the top side of the USB breakout board, where the 5V pin sticks out. Then, I soldered the other end to the original VCC pin that came with the Bluetooth module. (The one that was not removed at the beginning of this article.)

Setting the GPS receiver to 10hz

Once the GPS receiver is ready, it still needs to be set to run at 10hz. By default, the module only does 1hz, which is no better than the average phone. I wrote up how to do this in a separate article.

Using the GPS receiver

To test it out, I used RaceChrono. It and Harry’s Lap Timer are the two most popular options, at least for Android. RaceChrono has a free version to try, though, while Harry’s doesn’t. To use it, simply add the HC-06 in your phone’s bluetooth menu like any bluetooth device. The default pin is 1234. (You can change this by hooking up a serial connection to the HC-06 and sending some AT commands, but I didn’t bother and this is out of the scope of this article.)

Then, in RaceChrono, go to “Settings”, “Device 1”, and change it to external GPS. Pick the HC-06 out of the menu. If you go back to the main screen and hit Start, it will connect to the GPS Receiver and the bluetooth light will turn solid red if you did everything right. You can hit the up arrow in the bottom left to see GPS details. Once it obtains a satellite fix, you should see the top right area show it is reading at 10hz. If it says 1hz, check that you didn’t goof something up.

Conclusion

Done

Done

And there it is. Note that your phone or laptop won’t necessarily stay connected to it after pairing. I found that my phone didn’t actually connect until I opened RaceChrono, specified it as my external GPS, and actually started timing. In other words, it doesn’t bother connecting until something actually tries to communicate with the receiver. Once I did all of that, it worked perfectly.

In a future article, I’ll talk about making an enclosure for it. I am choosing to do something a little different than the 3d printed solution available on thingiverse.