LINK TO UPDATED VERSION
for Wind V1.0 – Updated 30/08/2016
1. Introduction
The wind board is designed to read signals from a Peet Bros wind vane and output a serial data stream. It can be used standalone, through a FTDI USB cable or plugged directly to a Raspberry Pi.
The board can be purchased from tindie.com
The schematic is here and there is more info available on my initial blog post here.
There are files here for a small enclosure that can be 3D printed for the standalone board.
If you are find that the direction output is not particularly stable and jumps around, you can try doing the mod in Section 8 of this manual.
2. Standalone
To use the board standalone you will need some way of reading the serial data, either to a PC, a system like OpenPlotter using a 5V FTDI cable or to some NMEA 0183 equipment. Using an FTDI USB cable as shown in the picture 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.
- If you are using an FTDI cable:
- Solder on the right angle header to the Arduino (included with the board).
- 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.
- For no FTDI cable:
- Connect the GND and VIN terminals to a 5 to 10 V power supply. Do not connect more than 10V to the VIN terminal, as the on-board regulator may not last long. For higher voltages use a small dc-dc converter module (Hint: search ebay). Alternatively run the board on 5V from a USB car charger.
- Solder wires to the Serial Output and Ground pins of the Arduino as shown in the board layout picture. This will provide a 5V serial output. The receiving device must be compatible with this voltage level.
- Optional: Adjust the direction offset and filter rates as described below.
3. 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. Another picture here.
- Optional: Adjust the direction offset and filter rates as described below.
4. Jumpers
The board has three solder jumpers and one link jumper. 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.
Enable RX – If soldered, this connects the Raspberry Pi TX pin to the Arduino. Not required unless you wish to write custom software.
SIM – Simulate jumper. If this is set during a reset, the board will continuously output the direction filter and offset via serial. This allows adjustment of these trimpot values (see Direction Adjustments). If this jumper is set after the board has started, the board will output simulated data for testing.
5. Direction Adjustments
The board has two blue trimpots which allow adjustment of the direction ouput’s offset (from -180 to +180 degrees) and the filter rate (from 0.1 to 1.0). These values should be checked by connecting a serial terminal to the board, placing the SIM jumper and pressing the RESET button. The serial output will then display the offset and filter rates, which can be adjusted on the trimpots with a small screwdriver. The direction offset is straightforward and simply adds the offset value in degrees to the direction output. The board ships with the direction offset set to 0 (± 1 degrees).
The filtering on the direction output is a simple exponential smoothing function. A value of 1.0 means no filtering is performed, and the direction input equals the output. A value of 0.1 will heavily smooth the direction output and it can take several seconds to respond to a change. The board ships with the filter rate set to 0.5 (± 0.05).
6. Bill of Materials
- PCB: WIND V1.0
- R1: 2.4K Resistor
- R2: 2.4K Resistor
- R3: 1.5K Resistor
- R4: 2.7K Resistor
- RV1: 10K Trimpot
- RV2: 10K Trimpot
- F1: 1N4004 Diode
- JP2: 5X2 Header Socket
- JP4: RJ11 Jack
- JP5: 2 Screw Terminal
- JP6: 2 Pin Jumper
- U1: Arduino Pro Mini Clone
Extra: 6 Pin Right Angle Header for Programming or FTDI cable (QTY 1)
7. Example Output
Wind v1-0 28-Jun-2016 Direction Filter | Direction Offset 0.53 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 that 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!