NMEA 0183 Speedometer
- Created on Tuesday, 06 April 2010 17:50
- Last Updated on Tuesday, 29 April 2014 20:58
- Written by Mike Holden
- Hits: 23313
Here's my first arduino project, it 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. There should be lots of examples of this if you use the google.
UPDATE 5/22/10-- I tested it with a real transducer and it works (read on).
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 PWM outputs. If you wire the output pin to the input pin you should get around 5.5 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 5/2/10)
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.
Here are some links to arduino stuff: