I had an email request to find this project from 2010… I updated the code too!
This project takes the pulse from a paddlewheel boat speed sensor and makes an NMEA output on the serial port. It should work with most through-hull speed transducers, and also with windspeed transducers too. The NMEA stream comes from the arduino serial port, so if you have a USB arduino you can hook it up to a laptop easily. If you want to hook it up to another NMEA instrument you’ll need something like a MAX232 chip to take the TTL logic from the serial port pins and convert them to RS-232 (or convert to RS-422 to meet the NMEA specification).
I used Valis’s NMEA monitor program (NavMonPC) to check out my output string.
The top picture is of the basic sensor in self-test mode. The arduino makes a pulse for testing that should show 5.5 kts. The yellow wire connects the pulse output to the pulse input to be measured.
Here is a screenshot of the output of the NMEA string received by hyperterminal.
Here is a screenshot of NavMonPC showing the display.
On power-up the microcontroller waits for a +++ sequence for a few seconds, if it receives it, it enters a calibration mode so you can change things like the filter pole and the number of pulses per mile. You can also change these in the code itself.
To test the unit, I have it creating a pulse using the Tone() function. If you wire the output pin to the input pin you should get around 6.3 knots. The input would normally be connected to a signal that is either a TTL pulse signal (0-5 Volts square wave) or a switch connected to ground alternating between an open-circuit and shorted to ground. Here’s a picture of the wiring:
Here’s the code (updated Sept 2017 for modern arduino, tested on an Uno)
I tested it with a speed transducer my dad gave to me from his box of parts. It’s from a raymarine st-50 system, the tag says Airmar Z092.
I put 13V to the red wire, ground from the arduino and my power supply to the bare wire, and connected the green wire to pin 3 THROUGH a 10K OHM RESISTOR. The resistor is important– the atmel microcontroller has diode clamps to protect against over/under voltages but you need to limit the current so the diodes don’t blow up. If your input is in the 0-5V range you don’t need the resistor.