GPS Speed to Pulse

I have the following problem. Before I explain the problem this is the project summary.

I have a Motorbike Computer (Temperature, Revs, and speed Vapor Speedometer Tachometer Kits | Vapor Tachometer | TrailTech). This project relates to Speed Component only.

The motorbike computer uses a reed attached to the wheel that pulses the computer and gives you a speed. The computer has a setting and formula depending on the size of your wheel. Easy.

Here is the thing. I want to use this on my Jet Ski. Last time I looked no wheels on a jetski :wink:

My approach is using a Nano with GPS module, a MOSFET to "operate a switch", and a code - This is my question.

I kind of did a half ass'ed job using seriously basic code. Grabbed the speed from GPS and then toggled a digital pin driving a MOSFET using Delays. Very inaccurate as Serial comms makes things very inconsistent with interupts and the system slows down.

This is my question

What other approaches would one take? Variable Frequency square waves? Is there a library?

Once I get a clear idea I want to then learn how to do this so this question is for "Project Guidance Only". I can then go hunting - the fun part!

Thanks!

PS If your keen to help me then read the last page of this document. You will see you need to think about some forumulas. https://cdn1.polaris.com/globalassets/trail-tech/2020/home/pdf/010-elv-195.pdf?v=834b67d1

Don't use delay.
Search for "Doing several things at the same time". That uses millis() telling when it's time to fire a pulse, when to end it, and so on.

Have you considered using a Speed Sensor for a small boat? Internet search words "arduino boat speed sensor".

See, also, "pitot speed sensor".

Hi.

I'm wondering if this could be done by using two Nanos.

First Nano just receives the GPS data and extracts the speed and sets an analog pin proportional to the speed. That's all straight forward.

Second Nano takes the analog value from the first Nano and operates the switch to simulate the input from the bike's wheel sensor.

Sounds excessive to use two Nanos but the programming of each would be independent of the other with no synchronising issues (I think). I think the programming would be simple and Nanos are low cost.

Calibration would be easy if you include a display on the first Nano to show the GPS speed and compare it with that of your Vapor display. An LED display works best outdoors.

Interesting project.

John.

Thanks! I'll try Millis() first as thats easiest.

Ill look for a speed sensor also as that's interesting.

All fails look at multi boards.

Ill report back.

I saw you found the other discussion about speed measurement on a ski boat. It's a pity all discussions on GPS projects are not grouped together rather than scattered across several forum sections.

John.