UPDATED 09/08/2016. Following on from the last project, where I broadcast NMEA GPS data to iSailor, I wanted to send wind measurements as well. The mast in my Westsail 32 was out, and it was a perfect time to put a new wind vane on. The app iSailor now has an unlockable wind instrument display, meaning I could channel the measurements straight to it. Alternatively I could also send the data to a laptop running OpenCPN. Firstly I needed a wind vane to mount. In the same mind as the excellent Freeboard project, I decided to use a Peet Bros. Anemometer to mount at the top of the mast. The unit seems extremely reliable and simple, having only two magnetic reed switches inside. The timing between the switch pulses gives wind direction, and the frequency of pulses gives wind speed. It really doesn’t get much simpler than that, and this set-up only requires three wires to be run up the mast (eg. an audio cable).
With the anemometer installed, I used a 3.3V Arduino Pro Mini (or any other Arduino) to read the pulses. Peet Brothers kindly supplied the calibration data to convert the pulse timings into wind speed. It then took some trials and data analysis to work out the best error rejection and digital filtering for a stable output.
Once the wind speed and direction is decoded by the Arduino, it can be sent out as a standard NMEA 0183 string. This string can be read by almost any marine equipment. I piped the data string into my Raspberry Pi NMEA Multiplexer which allows the data to be sent over WiFi. The iSailor app can then be unlocked to read the NMEA sentence and display a wind instrument! The data could also be sent to any existing instrument display that accepts NMEA 0183. So why pay over $1000 for a brand name wind instrument, when you can build a simple and rugged one for a fraction of the price!
EDIT: I should note that I did have some initial problems with the wind vane. I was not receiving all the direction pulses; many were not there. In the plot below the top trace shows what should be received, the bottom was my wind vane.
Obviously the direction reed switch was not being engaged all the time. After some investigation I determined that the small piece of shielding metal in the cup assembly was not large enough to block the direction magnet. I ended up inserting another small piece of metal (in addition to what was there already) to better block the magnet’s effect on the reed switch (see picture below). I’d be curious to know if anyone else has this problem.