Arduino GPS Boat Speedometer

Hi,

I am completely new to Arduino, but I have an idea for a project. I have some programming background and work as an IT-consultant, so I am sure I will eventually figure that out with some trial and error.

However, before purchasing components I would like to get some input on what to purchase and if my project is even feasible.

I have a Waterskiing/wakeboard boat and this boat has a speedometer that uses a paddle wheel that send an electrical pulse to the speedometer to register the speed of the boat. I have all kinds of issue with the paddle wheel, mainly that seaweed and other stuff grows on it and very early in the boating season the paddle wheel stops rotating. Before that it is also inaccurate.

My idea is to use a GPS antenna, a GPS shield for Arduino and an Arduino board to create a small system that can convert the GPS speed to a pulse to simulate the paddle wheel pulse.

I am not 100% sure of what frequency will read to what MPH speed, but I saw for some different paddle wheels from the same manufacturer it was in the 4.5 - 5.5 Hz per MPH range and I need to be able to read 22 MPH +/- 5 MPH and then I am fine. So being able to output a PWM from the Arduino at roughly 80 Hz - 150 Hz should be what I am looking for.

As I understand it the PWM signal should ideally be 12V, but I don't know if that is necessary for the speedo to work.

Any input on whether this project seem feasible or not and what components I would need is greatly appreciated. Also any pointers on where to start with the coding once I get the components would of course also be appreciated.

Thanks!
Mike

Hi Mike.

Definitely feasible. Many variations you could try.

Is your aim to generate a pulse to replace that from the paddle wheel and feed it to the existing display?

You could just add a display to the Arduino and not bother with the paddle wheel display.

John.

If my memory is correct standard hand held marine GPS units are around $99--. They have a display speed screen, why not just buy one of them and Velcro it to the dash?

Hi,

There are two aims. I thought I would keep it simple, but I will provide the reason why getting a display to the GPS is not good enough.

I have a perfect pass, which is essentially a speed control unit that using the pulse from the padde wheel can control the speed of the boat. So it takes RPM and speed pulse as input and then it controls the throttle on the engine with a servo engine and a cable. All of this works fine, but it is not accurate enough.

Getting the pulse from the arduino would solve both problems. 1) Get the speed control to work and 2) get the speedometer to read accurately. Also the built in display has its benefits. Fits perfectly in the dash, has the brand name of the boat on it, looks good, is part of an instrument cluster containing other gauges in the same style.

There are actually a third party company that have already a solution for this but it would be 350 USD with shipping to Sweden + an additional 30% on top in tax and customs. So seems steep. The product was probably well worth its price tag when developed about 10 years ago...

Mike

The Arduino world is a hobbyist's world. It's one thing to make a GPS gadget that displays speed; quite another to use that to control a vehicle.

One factor that makes the Swedish unit costly would be the fact that the manufacturer recognises their liability exposure and built the device to an appropriate level of safety integrity that hobbysits can't match.

I made a GPS speedometer for my car. Worked well enough but had some glitches. I wouldn't dream of feeding its output into a cruise control.

Sometimes it would lose the fix. Sometimes the indicated speed would be completely erroneous, like 120 kph while standing still at lights. There was a distinct latency -- indicated speed lagged behind real speed by several seconds.

You would still need a display to show the GPS speed so that you can calibrate the paddle wheel system.

I used an Arduino Nano, a bluetooth module, a GPS module incorporating a u-blox neo-6M receiver. I tried three displays: 16x2 LCD, color OLED and 7-segment LCD. The LCD was by far the best performer for outdoor use. The bluetooth allows for connecting with an Android phone, which could also be your display. None of it was particularly difficult but you need to master each one so you can troubleshoot when it fails (and it will).

GPS itself is great to explore. Works well when it works; a frustration when it doesn't.

Good luck,

John.

Hi John,

Thank you for the input.

The Cruise Control system will still be the perfect pass that is very well recognized within this very specific area, getting a wakeboard or waterskiing boat to keep an accurate speed.
They realise they have liability etc, which is why the system can never exceed the speed set on the manual throttle, only decrease it. So regardless if the Arduino sends 2 mph, while we are actually doing 20 mph the system will not speed up so that the boat becomes dangerous. It will simply do nothing. If we have the opposite situation that the Arduino suddenly sends 120 mph, while riding the perfect pass will only slowly nudge the speed in what it thinks is the correct direction. Also, there is a limit of how much it can adjust. Something like 20 % of the full throttle motion. Meaning what you do as a driver is set the throttle to maybe 10 % above your desired speed and then the perfect pass lowers the speed until it is correct. Then it will keep controlling the speed until the driver throttles down and the system automatically realizes that now it cannot keep control and it beeps to let the driver know he/she is now operating without cruise control.

The perfect pass will show the speed on a digital lcd display. That together with a handheld GPS (which I do have) and an iphone with a GPS app should work hopefully. In that case I cannot tell if the arduino GPS is off, but I should be able to calibrate it if it isn't.

Thanks,
Mike

Mike.

Do you think the manufacturer of the Perfect Pass will stand by their warranty and liability if their system is modified by the customer?

It's an interesting project and certainly doable.

You talk about using a handheld GPS and an iPhone app to check on the Arduino GPS. Is this asking too much of the boat driver?

With my speedo, I first developed a prototype. This seemed innocuous on the work bench but was a horrible contraption when transferred to the car. I learned that whatever is installed in the car has to be clean and reliable. It must not distract the driver in any way whatsoever. No fiddling with wires, no pressing buttons, no picking the device up and placing it in a better position.

What I now have is a display in front of the driver that is bright and easy to read with a quick glance. This is quicker than looking at the car's speedo.

Can you compare several speed displays and drive a boat at the same time? Safely.

John.

Hi John,

They probably will not. At the same time, the system I bought to retrofit in my boat is at least 15 years old. So they probably wouldn't stand behind it anyways. The important part is that due to mechanical restrictions in the system (how it is hooked up to the throttle and normal throttle wire) it cannot increase the speed from the speed set by the driver. If the driver throttles down it will throttle down. So I see really no risk except that the system might still not work... =)

Calibrating the system I see more likely that I do while someone else is driving the boat and with no rider in tow.

So I was thinking if I get the system to at least do something. Output some speed figure to Speedo and the Perfect Pass. Then I can use the handheld GPS and/or phone to verify if that figure is correct. If it is not, back to work-bench and tweak. When I get it close, I am happy. Actually doesn't matter too much if we do 22 mph actual speed but speedo reads 25 or 19. As long as I know what to set the cruise control to.

The main purpose is to let the driver focus on A) What the rider is doing and B) to drive straight while still getting a consistent pull. Now the driver will focus mainly on adjusting the throttle +/- 5 % to get the boat to not speed up/down when the rider cuts in the water.

Mike,

Ok, I now have a better understanding of how the Perfect Pass interacts with the throttle. It is mechanically constrained to changing the throttle by a small amount around the position set by the driver.

I think you will first have to build an Arduino based GPS device and use it independently of the Perfect Pass system. You'll have to find out if the GPS meets your accuracy and reliability requirements. You can test it out in a car.

I don't know if your commercial handheld GPS can be expected to be more accurate than one you build yourself. Same goes for the iPhone app. I'll query some experts on that and come back to you.

I strongly recommend you get a GPS board that uses a u-blox GPS receiver. They provide software called u-center that give you great control, monitoring and recording facilities.

You will be able to record an excursion on the lake. Here's a wild idea -- put a GPS device on the skier and record their trip as well as the boat's trip. You could then play them back on a laptop.

I've gone the opposite way to you. I started with a GPS-fed speedo, found it had problems and moved to taking the input from a magnetic sensor on a wheel drive shaft. This is 100% reliable, unlike yr paddle wheel.

It needs calibrating to match the car's speedo. I adjust the wheel diameter value in the code. I'm thinking of doing this automatically while the car is moving.

John.

Mike,

You need to understand that GPS data has a random error. Even if you are driving at a constant speed the GPS reading will move around. It's a result of the complications of receiving radio signals from satellites 20,000 km away. You will have to learn if this variation is significant to your needs.

John.

1 Like

Hi John,

Thank you for all the replies.

I have done some googling and feel a bit better equiped now.
I have ordered an Arduino Uno and a u-blox Neo 6 GPS module.

I have also found some sample code online for how to output a PWM.
Even how to get higher bitrate than 8-bit PWM.

Right now the driver uses an iPhone app to see the GPS speed and tries to adjust manually. Can't see any reason why the iPhone should get a more accurate reading than the Arduino.
Perhaps I could incorporate something in the code to limit issues from intermittent strange GPS readings. Like when loosing a satellite. I perhaps these issues can be mitigated by configuring the perfect pass sensitivity/aggressiveness as I am able to do that in the perfect pass module itself.

Then last step I have also ordered some resistors and transistors to be able to switch the 5V PWM output to 12V PWM output. Hopefully this all works well in practice as well as in theory. :slight_smile:

My idea now is to basically map the possible speeds 0-35 MPH to the correct analogwrite() value, possibly using 10bit 0-1023 range for the PWM output. This would give me enough precision in the PWM signal to the perfect pass. Then I need to get the output to 12V using the transistors. Or at least I think I need to. Perhaps the perfect pass can detect 5V PWM as well as 12V PWM, but I measured the paddle wheel to currently output 12V PWM. Though it is totally unreliable and the perfectpass drives like a 3 year old on the paddle wheel signal which bounces from 14 mph to 25 mph while the GPS is steady as 21 MPH. :slight_smile:

This little sample code accepts a signal from a potentiometer and maps that to a PWM signal. https://create.arduino.cc/projecthub/muhammad-aqib/arduino-pwm-tutorial-ae9d71
I should be able to use something similar mapping the signal from the GPS to a PWM signal, no?

And this example code managed to get 10bit PWM:
https://forum.arduino.cc/index.php?topic=41964.0

Then all that is left is to read the gps-speed from the gps module and use that instead of the potentiometer.

Thanks again John!

Looks like you're on a roll, Mike.

The Uno is a good board to start with. Good for prototyping which you'll be doing plenty of.

Did you go with a GPS shield or a breakout board?

You'll be needing a medium sized breadboard.

Mapping the GPS speed value to your PWM output will be trivial for you.

Two s/w packages you need to install: the Arduino IDE (under the SOFTWARE tab above,I think), and "u-center" from u-blox (under their RESOURCES tab; go to u-blox.com).

u-center is invaluable for learning about GPS and then troubleshooting when it doesn't work (which will happen).

When you install the Arduino IDE, then install the TinyGPS++ library. This gives you all the functions to read the GPS output and parse it into parameters like long,lat,speed, course... There's an example provided to simulate a GPS feed without having a GPS receiver connected.

Filtering out nonsense speed values should be easy. How fast can the boat accelerate or decelerate? Any value outside that range could be discarded.

I asked on a u-blox users forum about the relative accuracy of commercial handheld unit, an iPhone and an Arduino/u-blox device. The opinion is all can be expected to give good performance. The phone might not work so well since it is not custom designed for GPS and its aerial will have limitations. Arduino + u-blox performs well.

I did not get consistent reception until I got an external aerial. You might like to add that to your shopping list.

John.

Hi,

Sorry, I have been terrible at updating this thread.

There has been significant progress though.
I managed to get the Arduino Uno to communicate with the Ublox GPS.
Found some code to set the ublox updating rate to 5 Hz and turned off all NMEA sentences except the one holding speed.
I used the library TimerOne to be able to set the frequency of the PWM signal.

Then I have a loop that gets the GPS speed, converts it into a frequency stated in Microseconds and sets the PWM output frequency to that.
It all works great.

However the Perfect Pass either needed to be the one supplying the current for the PWM or needed a higher voltage of the PWM signal because it couldn't detect the PWM output.
I then found a post on a forum to get 5V PWM to 12V PWM using two transistors and some resistors.
I wired this on my breadboard to let the ground, V+ and signal wires all go the the Perfect Pass.

Results are great. It matches very well with my iphone GPS speed. (The speed reading on the Perfect Pass Gauge that is) and the Perfect Pass itself controls the speed well. I have rarely ridden behind my boat with such consistent speed and now this is effortless for the driver.

Very happy!

Great result. Well done.
John.

Hi Mike.

That's a great outcome.

How are you managing the breadboard? It doesn't seem like stable arrangement for use in a speedboat.

Did you have to filter out extreme speed readings?

John./

Hi John,

I just received (yesterday) a (don't know what it is called) circuit board that is like a bread board.
So basically I will have to solder or the electrical components to it using the same layout as on the breadboard.

I did not have to filter out extreme speed readings. Only trouble I have seen is when doing too tight turns, then it reads slower than actual speed and speeds up. But it is just for the driver to be a bit more active with the throttle while turning. A small trade off for not having to be active with it while going straight (which is what you aim to do as much as possible when pulling a wakeboarder).

I guess one thing that makes this thing easier for me is that I have a clear view of the sky, no buildings or other objects close by, just flat water for at least 30 yards and often much more in all directions from the boat. Also it is usually quite nice weather while wakeboarding. At least no rain, thunder or storms. Might be cloudy, but normally of the lighter kind of clouds.

Mike

That sounds like a perf board.

On a tight turn wouldn't the boat slow down some? How do you know it's reading low?

With my car speedo I found it essential to eliminate all driver involvement with the device apart from glancing at the display and picking up audio alerts. I have no buttons or switches and all connections must be secure (fiddling by the driver could be a fatal distraction).

John.

roosm:
Hi,

Sorry, I have been terrible at updating this thread.

There has been significant progress though.
I managed to get the Arduino Uno to communicate with the Ublox GPS.
Found some code to set the ublox updating rate to 5 Hz and turned off all NMEA sentences except the one holding speed.
I used the library TimerOne to be able to set the frequency of the PWM signal.

Then I have a loop that gets the GPS speed, converts it into a frequency stated in Microseconds and sets the PWM output frequency to that.
It all works great.

However the Perfect Pass either needed to be the one supplying the current for the PWM or needed a higher voltage of the PWM signal because it couldn't detect the PWM output.
I then found a post on a forum to get 5V PWM to 12V PWM using two transistors and some resistors.
I wired this on my breadboard to let the ground, V+ and signal wires all go the the Perfect Pass.

Results are great. It matches very well with my iphone GPS speed. (The speed reading on the Perfect Pass Gauge that is) and the Perfect Pass itself controls the speed well. I have rarely ridden behind my boat with such consistent speed and now this is effortless for the driver.

Very happy!

Hi. Are you able to share your code? Im doing something similar!