MICROCONTROLLER INTELLIGENT WINDVANE
Operating Principles and Setting-up Procedure
This windvane is intended for the control of devices such as air-sampling pumps which are required to operate only when the wind is blowing from a particular sector. When a windvane is observed in normal weather conditions, it will be seen to be oscillating very rapidly about a mean position. If the such a vane were directly connected to an air sampler's pump, there would be a great deal of switching on and off which would damage the pump and give inaccurate results due to the finite time which the pump would take starting up and closing down. It is therefore necessary to build some hysteresis into the system. The simple solution is to introduce mechanical damping by friction or viscosity, but devices of this nature are temperature, time and position dependent and completely unreliable. In this instrument it was decided to allow the vane to oscillate freely and to introduce the hysteresis electronically. A software Schmitt trigger was therefore devised in order that the performance would be totally predictable. The windvane itself is an NRG instrument in which the shaft drives a precision potentiometer capable of continuous rotation. (It should be remembered that in common with all such potentiometer devices, there is a small deadband where the potentiometer is open-circuit. In this instrument, the microcontroller is made to see an apparent angle of zero, rather than the indeterminate orientation which would arise from an open circuit.) The electronic system, contained in an IP66 sealed box, consists of a PIC microcontroller driving a reed relay and a series of indicators. When the device is powered up a check takes place in which all the indicators are progressively illuminated for a few seconds. What happens next depends on the position of the 'status' switch (see picture below).
When the switch is in the 'run' position, a count of 127 is initially placed in a register. If the windvane is within a pre-settable sector, the count is incremented. If the count reaches 256, the reed relay closes, setting the output voltage equal to the supply voltage. If the windvane is outside the sector, the count is decremented. If the count falls to zero, the reed relay opens, setting the output voltage to zero. If the status of the windvane changes before the count reaches 256 or zero, the count direction changes but the output will not change until the count finally reaches 256 or zero. The microcontroller is programmed such that the counter takes approximately 30 seconds to perform an uninterrupted count from zero to 256. Various LEDs show whether the windvane is above, within or below the sector, and there is an LED which indicates whether the output is on or off.
When the switch is in the 'set' position, the windvane sector may be set or altered. The windvane is held in a position which marks one edge of the sector, and the 'store' push-switch is pressed. The associated LED will flash to indicate that this position has been stored. The windvane is then moved to a position which marks the other edge of the sector, the 'set hi/set lo' switch is toggled and the 'store' switch is pushed again. The LED will again flash, indicating that this second position has been stored. The sector has now been defined and is stored in an EEPROM. The information is retained whether the power is on or off, but can easily be changed by repeating the above steps. The order in which the two positions are entered is irrelevant, as they are shuttled into the correct order by the program. The sector can be checked by putting the status switch into the 'run' position and moving the windvane around - the LEDs showing the vane position will indicate the position of the vane relative to the stored sector.
1. The windvane should be set up so that the notch on the body of the device, indicating the potentiometer deadband, is pointing away from the area of interest.
2. The sector, or acceptance angle should now be set. This procedure is best carried out, if possible, with the windvane in the relative comfort of ground level. Power up the instrument (user to supply power supply within the range 5.5v to 30 vDC). Hold the windvane in a position which marks one edge of the sector, and press the 'store' push-switch. The associated LED will flash to indicate that this position has been stored. Move the windvane to a position which marks the other edge of the sector, toggle the 'set hi/set lo' switch and press the 'store' switch again. The LED will again flash, indicating that this second position has been stored. The sector has now been defined and is stored in an EEPROM.
3. The windvane can now be fitted to the main mast (provided by the user) using the bracket and clamp provided. Point the body of the instrument so that the centre of the arc is pointing in the desired direction, i.e. the deadband notch is pointing away from the area of interest. Put the 'status' switch to the run position and recheck the angles.
There are 7 terminals on the printed circuit board:
Vane 1 - Red wire from windvane
Vane 2 - Blue wire from windvane
Vane 3 - Green wire from windvane
Vin - Input voltage 5.5vDC minimum, 30vDC maximum; need not be regulated
Vo - Controlled output voltage (same voltage as Vin), max current 1 amp
OV - (2 terminals) Zero volts for input and output