for Wind V2.0 – Updated 11-Nov-2016. Previous manual: Wind V1.1
Version 2.0 Changes:
- Improved power supply, board can now be powered from a 12V battery.
- Dedicated circuit board and microcontroller.
- Socket for a RS485 module
1. Introduction
The wind board is designed to read signals from a Peet Bros wind vane and output a NMEA 0183 data stream. Designed as a cheap wind interface for weather stations and boats. The board has the following choices for data output:
- Plugging an USB FTDI cable on to the board. This is the best choice for computers and will also power the board by USB.
- Plugged directly to a Raspberry Pi, with the board powered by the Raspberry Pi.
- Plugging on a RS485 module. This allows the wind board to be a proper NMEA0183 v2+ talker for marine equipment. Board will require external power.
The board can be purchased from tindie.com
The schematic is here.
There are a few adjustments and tests required before use, see Section 6
In normal operation the red light on the wind board will flash every second. If the board is started in TEST mode, the light will be off.
2. USB Connection
To use the board via USB and get data into systems like OpenPlotter or OpenCPN, I suggest you use a 5V FTDI cable. The wind board has a header that matches the pinout for most FTDI cables. See picture for connection example. The FTDI USB cable will even power the board, so you don’t need to supply power separately. Steps:
- Plug in a Peet Bros Anemometer to the black RJ11 jack.
- Connect the 5V FTDI cable to the header in the correction orientation (see picture).
- Plug in the USB end of the cable to a computer or Raspberry Pi. The board should power up and start streaming wind data. You may need to install drivers for the FTDI cable.
- Run through the procedure in Section 6.
3. RS485 / RS422 Output
To use the board as a NMEA talker, a cheap RS485 module can be added. This allows
connections to marine equipment. Search eBay for “RS485 module” to buy one.
- Plug in a Peet Bros Anemometer to the black RJ11 jack.
- Attach the RS485 module (see picture for orientation) and connect the A and B outputs.
- Connect the GND and VIN terminals to a 7 to 15 V power supply.
- Run through the procedure in Section 6.
4. Raspberry Pi
The board can also be plugged directly onto all models of Raspberry Pi. In this configuration the data is received by the Raspberry Pi’s built-in serial port. To do so you will need to:
- Solder on the 10 pin header to the non-component side of the wind board.
- Plug in a Peet Bros Anemometer to the black RJ11 jack.
- Setup the Raspberry Pi to read the serial data.
- Connect the board to the Raspberry Pi on the first 5×2 pins of the GPIO header as shown.
- Run through the procedure in Section 6.
5. Jumpers & Switches
The board has two solder jumpers, one TEST switch and one RESET button. See the picture of board layout for positions and names of these jumpers.
Config 1 – Soldering this jumper will change the wind speed output to km/h. Unsoldered the output is in knots.
Config 2 – Soldering this jumper will change the serial baud rate to 57600. Unsoldered the baud rate is 4800 to match NMEA 0183 standard.
Test – If this is set during a reset, the board will continuously output the direction filter and offset. This allows adjustment of these trimpot values (see Initial Test and Adjustments). If this switch is set after the board has started, the board will output simulated data for testing.
6. Initial Test and Adjustments
Once the wind board is setup, you should follow this procedure to check there are no missing pulses from the wind vane. This section also describes how to adjust the direction offset and filter time.
- Connect the wind vane, switch the TEST switch on, connect a serial terminal and power up the board.
- With the TEST switch on as the board powers up, the serial output will show the current filter time, direction offset and a count of missing direction signal pulses from the wind vane.
- Get a hair dyer to turn the wind vane cups, and vary the wind speed and angle over a minute.
- The number of missing pulses should be less than 10 over 60 seconds. If you have more, check that the direction part of the wind vane is pushed down properly so it’s just above the spinning cups. If you still have problems read the Direction Mod section below. Note: you will usually get one missing pulse detected when the zero degrees mark is crossed.
- The two blue trimpots can now be adjusted with a small screwdriver. These change the direction output’s offset (from -180 to +180 degrees) and the filter time (from 0.0 to 5.0 seconds).
The direction offset is straightforward and simply adds the offset value in degrees to the direction output. The board should come with the direction offset set to 0 (± 1 degrees).
The filtering on the direction output is a time based exponential smoothing function. A value of 5.0 s means it takes five seconds to show a change from the input signals to output (slow but smooth response). A value of 0.0 s means no filtering is performed, and the input equals the output (fast response). The board ships with the filter rate set to 1.0 (± 0.1).
7. Example Output
Wind v2-0 11-Nov-2016 Direction Filter | Direction Offset | Missing Pulses 1.2 s 5 0 $WIMWV,125.0,R,8.65,N,A*1E $WIMWV,152.0,R,7.33,N,A*12 $WIMWV,157.0,R,6.24,N,A*10 $WIMWV,160.0,R,5.38,N,A*1A $WIMWV,161.0,R,4.62,N,A*15 $WIMWV,162.0,R,4.22,N,A*12 $WIMWV,163.0,R,3.84,N,A*18 $WIMWV,161.0,R,3.55,N,A*16 $WIMWV,163.0,R,3.21,N,A*17 $WIMWV,162.0,R,2.92,N,A*1F $WIMWV,163.0,R,2.63,N,A*10 $WIMWV,162.0,R,2.36,N,A*11 $WIMWV,161.0,R,2.10,N,A*16 $WIMWV,160.0,R,1.84,N,A*19 $WIMWV,158.0,R,1.62,N,A*1A $WIMWV,158.0,R,0.00,N,A*1F $WIMWV,157.0,R,0.00,N,A*10
8. Direction Mod
If you find there are missing pulses or the direction output from the board is jumping around a bit you can try this mod. First, remember the direction is passed through an exponential filter, which will smooth the direction output. Second, the direction output is not as accurate at very low speeds. As an benchmark I recorded my direction output with two different filter rates as shown in the graph. For each recording I held the direction vane steady at a fixed angle, and used a hairdryer to turn the cups at a steady 10 knots. Note the held angle was different for the two results, but the idea is to show how much the output varies.
If your direction is jumping around more than this, there may be a problem with the pulses coming from the wind vane. I discovered when I first started this project that the direction reed switch required more shielding, as there were many direction pulses missing. If you have an oscilloscope this is easy to verify. The correct pulses going to the Arduino should look like the top traces in the picture below, the missing pulses can be seen in the bottom traces.
If some of the direction pulses are missing you can try the mod outlined below:
- Pull the direction vane part of the anemometer directly up and off the body. My Peet Bros unit came disassembled so this was easy to do.
- Pull off the cup part of the anemometer and look for the piece of shielding metal. You will need to cut a similar piece of thin steel from a tin can. The dimensions are roughly 13 x 20 mm, and the piece needs have a matching curve.
- Slide the new piece into place. You may want to glue it later if after testing.
- Reassemble the wind vane and test. I strongly suggest that you use a glue or silicone to secure the top direction part of the vane to the body, otherwise it can blow off in very strong winds. Do not put glue near the bearings!