I really, really wanted a GPS speedometer for my boat. But I also really, really wanted the speedo to look period correct, and match the rest of my gauges. The Teleflex “Black Stirling” line had the perfect look, but only pitot tube options…so I decided to buy one, take it apart, and replace the “guts” with my own GPS powered version. Here’s how I pulled it off.
Trial and Error
The gauge I really wanted was, well, nearly discontinued. So I bought 2 – one that I could destroy in learning how it worked, and for spare parts if needed, and one that would be the actual one that lived in my boat. In the end, this proved to be the right call, as I broke the glass of the first one! The first step was to very carefully dremel away all of the plastic that I thought held the gauge together. Once I’d removed the exterior blue casing, all I was left with was this:
The front looked exactly how I wanted it too, and the back was…shockingly simple. Basically, the pitot tube in the water gets more and more pressurized as the boat moves forward. This pressure expands the copper manifold on the back of the gauge, causing it to uncurl (think of a party streamer), which tugs on a *very* sensitive linkage to move the needle.
So, all I had to do was remove the existing linkage (and all the crap that came with it), and replace it with a GPS activated replacement. I chose to use a servomotor, driven by an arduino that interfaced with a GPS chip. First up, was all of the mechanical stuff…
Moving the Needle
Nearly everything mechanical was 3D printed. First and foremost, the servo – I chose a brand name servo that was rated for a marine environment, so that I could feel safe knowing it would withstand many years of service in a boat. Otherwise, all I really cared about is that it was as small as possible…moving the needle requires almost zero force. I 3D printed a servo horn, an adapter linkage for the gauge itself, and a “main mounting bracket”. The M.M.B. directly mounted the servo and power regulator (see below), and then also fastens to the glass dome of the gauge. The enclosure bracket holds the GPS chip and “arduino”, and screws into the main mounting bracket. Together, they clamp around the dash, and hold everything in place. Here’s some shots of the servo linkages, and the main mounting bracket with servo / regulator installed:
Note that this is just the first iteration of the MMB – but it’s darn close. The only real changes were relocating a couple of holes, and adding “side” holes that allowed me to fasten through the blue plastic of the gauge, into the MMB, to mate them together. At this point, all of the mechanical stuff was done. I had verified that sweeping the servo would move the gauge wherever I wanted it to. I did have to remove the “needle rest” from the gauge face so that the needle could swing past it, as part of my planned operation, but otherwise it’s a (very) simple mechanical system!
Power and Wiring
There’s not a whole lot going on here, and to be honest I’m not entirely sure why I ended up using two regulators instead of just one. I want to say that one board needed 3.3V and everything else needed 5…but that’s just not true. Anyways, for whatever reason, I ended up with ~5 major electrical components. First up is the servo as already mentioned above. The second is the main regulator that powers the servo, also seen above – the system needs 5V to operate, and the boat only provides 12V. The third is the…second regulator? Again, I have no idea why I needed this, and in hindsight I was probably just being lazy and trying to make it easier to wire. The fourth is the brains of the operation, a DF Robot Beetle Board…which is basically an Atmega32U4 breakout board in the smallest possible form factor. I chose the 32u4 because a) I have a ton of experience with it b) it’s dirt cheap c) it’s a tiny, ubiquitos chip with native USB support. Last but not least is an Adafruit Ultimate GPS breakout board. I chose that specific GPS board because Adafruit is a great company that makes great products, and this board is no exception – it does everything you want, ready to go, with minimal headache.
Wiring everything up was relatively simple. The 32U4 communicates with the GPS board, and the two of them basically work together to determine what the speed of the boat is, and if the boat has valid GPS lock or not. Then, the 32U4 sends an “industry standard” PWM signal to the servo, to command it to the correct position for what it needs to display. The only somewhat difficult thing is that for various reasons – mostly, ensuring the GPS signal was as strong as possible, and everything was as watertight as possible – the GPS and 32U4 are mounted to the enclosure, while the servo and main regulator are mounted to the MMB. These parts are separate until you mount the gauge in the boat…so I had to have plugs go between the two of them (in this case, ground, +5, and signal for the servo…and gnd and +12 feed from the screw terminals to the main regulator). Ultimately it’s a bit of a rats nest but everything fits, and in the right orientation no less!
Software and Final Result
The code is very easy. The chip and GPS turn on, the chip tells the GPS to set itself up with the correct parameters, and then everything waits for a GPS fix. While the GPS is searching for a fix, the needle points straight down to indicate there’s no fix. Once there is a fix, the servo is commanded to move the needle to the correct location to display the correct speed. I basically brute forced this, doing a bit of “guess and check” to see what values corresponded to which numbered speed on the gauge…and then any speed is interpolated between those two points (i.e. 23 is displayed by calculating what servo pulse width is 30% of the way between the known value for 20, and the known value for 30).
Ultimately, it’s not going to win any awards or races. It takes a while to fix (largely rendered a non issue because, well, the boat takes time to warm up too!). It takes a while to respond accurately to speed changes (~2s to reflect a change, because I wanted it to be extra stable, and not always jump around). And it’s not very smooth…because it’s a hobby servo, it sort of jumps between locations instead of smoothly sweeping.
But it works, and everyone seems to love it. Most importantly, it’s just another added feature of the boat that’s one of a kind – it’s a classic looking gauge that I can tell people I hacked apart to provide it with GPS accurately. The two most common reactions are people wanting to double check it with their phone (and seeing that it’s spot on is always satisfying!), or assuming it’s reading too low. Most boat speedometers are aggressively optimistic, and so people expect it should read higher than it does. Ultimately, I’m very happy with the end result – especially since it was only about 2-3 hours of work in total. Here’s how the end product looks when it’s all packaged up…but don’t worry, I fixed the glass before installing it!