NMEA 2000 Wind Direction Correction - is this feasible?

Hello everyone, I have a project in mind and would like to know if this is feasible before purchasing some relatively expensive hardware.

I have a sailboat with a rotating mast (the mast can rotation along the vertical axis to improve airflow on the sail). As is common with many sailboats, I have a wind sensor mounted at the top of the mast the measures wind speed and wind direction. The wind direction data received is usually incorrect because it doesn't take into account rotation of the mast. My project is to add an analog angle sensor to the mast and correct the wind direction data coming from the masthead sensor before sending that data to the network where it is read by several displays. The data from the masthead sensor is NMEA2000 and the output from the mast rotation sensor is analog 0.5 - 4.5Vdc.

Plan A: The masthead sensor will be connected directly to the Arduino/CAN Bus (meaning the data won't already be on the overall NMEA 2000 network). If possible, I want to read the NMEA 2000 data coming from the masthead sensor and modify the wind angle based on what the mast rotation sensor is reading. Then, I want to send this corrected data out to the NEMA 2000 network where it can be received by other devices. So essentially this would be transparent to other devices on the network.

Plan B: I don't know much about NEMA 2000, but I do know this would be simpler with NEMA 0183. Interestingly, the new version my my masthead sensor outputs NEMA 0183 and includes a NEMA 2000 converter that is used at the network connection point. This device would make it simple to do everyone in Plan A above, but with NEMA 0183. The new sensor is $700 though, so first I want to understand if this can be done with NEMA 2000.

I imagine that sailing or marine navigation forums might be more productive than the Arduino forum, for questions about NMEA 2000.

I expect it's plausible, but like you my experience is with 0183. Search the forum for NMEA 2000 - there is a very long thread on the topic that would probably be helpful.

1 Like

Towards the end of that thread, I recall helping someone with code to adjust rudder angle for display. He already had the code to put it onto the network. On reflection, it's pretty much a parallel to your need.

2 Likes

Could well be wrong here but ….Does it really matter ? The indicator at the top the mast is really for showing your angle of “slip”
The indicator is showing the resultant vector of your speed and the wind speed, not the direction of the wind which surely you can only get if you are stationary ?

I guess you have a compass too

Clearly reading and writing the NMEA2000 messages is the crux of your project. Since even with a new masthead sensor you must be able to generate NMEA2000 messages.

I would start by creating a routine that could read and write to the parts you likely already have. If you have success you can review which Plan would be the best.

Toward that end a simple google found this which I believe will get you started.

1 Like

Yes, it does matter. The "Apparent wind" is a common, important state variable for sail performance, and if your mast pivots, it will throw off your measurements.

1 Like

DaveX is correct. The sensor is meant to output apparent wind speed and direction. With a paddlewheel sensor it is possible to determine true wind speed and direction (current / leeway aside). The rotating mast reduces all of this useful info to only apparent wind speed unless the angle or rotation can be factored out of the direction measurement.

Thanks JohnRob, I have that bookmarked and will begin there. I've also found Open Boat Projects which may prove useful. If I do end up purchasing a new masthead sensor it actually comes with a NMEA 0183 to NMEA 2000 converter, but obviously if I can achieve my desired functionality without having to replace the sensor it would mean more money for other boat projects :).

1 Like

It is feasible. I have a working prototype of plan A, and am currently debugging. I'm using the Honeywell and an ESP-32 development board from Hat Labs:

I'm happy to share thoughts and code, although my documentation is not yet complete.

randel@redshift-consulting.com

Maybe put an electronic compass on the mast and aligned with the keel axis of the boat then direction of the wind vane could be adjusted. This method eliminates any moving parts and can be accomplished at the deck height, I never liked bosun's seat.

Thanks Randel, I replied to this topic on the IO forum. Amazing job!!!

Thanks for the kind words! I hope that my information is helpful.

Sail fast!

Hi Randel, I received my hardware from Hat Labs and am starting to work through this. First question involves the I2C connections. Did you use GPIO 21 and 22 for both the OLED display and the ADS1115, or did you use GPIO 21 and 22 only for the ADS1115 and use the separate I2C header provided on the SH-ESP32 board (from GPIO 16 and 17)? Thanks and I hope you're getting a lot of sailing in!! Chris

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.