Wind direction and speed sensors - crestlinesoaring/ArduinoWeatherStation GitHub Wiki
Introduction
While we want to have an ultrasonic sensor eventually, currently we have a mechanical wind direction sensor that uses a rotating magnet to close one or two reed switches at a time.
Circuit
The circuit is eight radial reed switch-resistor spokes with the center and outer edge of the circle tied together. This forms a variable resistor whose resistance varies with which switches are closed. This resistance is measured as an analog voltage in a voltage divider.
Only one reed switch, or two adjacent reed switches, will be closed at a time. This means there are 16 measurable directions. The resistances on the sensor may be found in the PDF describing the part. Using a derivation like this, the ADC thresholds for choosing wind direction look like this:
Amazon: Ambient Weather Wind Vane Replacement, WS-1080, WS-1090, WS-2080 Weather Stations
Wind speed sensor (Anenometer)
Introduction
While we want to have an ultrasonic sensor eventually, currently we have a mechanical wind speed sensor that uses a rotating magnet (on the propeller) to activate a reed switch.
Circuit
The Anemometer is plugged into the wind vane.
The four leads from the RJ11 jack are as follows
Pin 4 -----------------------> output of Windvane
Pin 3 -----------------------> output of Anemometer
Pin 2 -----------------------> ground of Anemometer
Pin 1 -----------------------> ground of Windvane
A pull up to load the reed switch, plus some RC filtering connect to an interrupt pin of the Arduino Mega.
Amazon: Ambient Weather Wind Cups Replacement, WS-1080, WS-1090, WS-2080 Wireless Weather Station