Electronics Q: Wind direction sensing - how does it work

skyflyer

Well-Known Member
Joined
26 Jan 2011
Messages
1,433
Location
Worcester, UK
Visit site
My ancient masthead anemometer outputs different voltages on three wires depending on the angle of the vane. typical values are given (for testing purposes) as per this diagram, (shown only in part) but of course the voltage varies infinitely as the angle changes, not in steps as per the table


[table="width: 500, class: grid, align: left"]
[tr]
[td]Angle[/td]
[td]Green[/td]
[td]White[/td]
[td]Yellow[/td]
[/tr]
[tr]
[td]0[/td]
[td]0[/td]
[td]9[/td]
[td]9[/td]
[/tr]
[tr]
[td]30[/td]
[td]1.6[/td]
[td]6[/td]
[td]10.4[/td]
[/tr]
[tr]
[td]60[/td]
[td]3[/td]
[td]3[/td]
[td]12[/td]
[/tr]
[tr]
[td]90[/td]
[td]6[/td]
[td]1.6[/td]
[td]10.4[/td]
[/tr]
[tr]
[td]120[/td]
[td]9[/td]
[td]0[/td]
[td]9[/td]
[/tr]
[tr]
[td]150[/td]
[td]10.4[/td]
[td]1.6[/td]
[td]6[/td]

[/tr]
[/table]

etc.

I'm trying to work out why the sensor needs three inputs (voltage) as on the face of it the vane angle can be calculated from any two wires. Maybe there's some addition or subtraction or other mathematical function between the three values that gives a direct output of angle.

This is needed in order to make a small box of tricks using (e.g.) an Arduino to output the angle to another device as a digital figure.

Any electronic or mathematical experts out there?

TIA
 
Don't know about your specific sensor. However it would appear to be a continuous 360degree variable resistor. it is likely that this is matched to a readout a bit like a 3 phase motor having a permanent magnet rotor and 3 coils 120 degres apart to bring the needle around to replicate the position of the wiper on the resistor at mast head.
I understand you want to convert this into digital format. I can only suggest using the arduino and producing a look up table using the 3 inputs. Sorry don't know any more.
Another form of direction repeating is/was used in aircaft using AC syncro. This is a bit like a3 phase generator but with AC usually 400hertz fed to a rotort that is attached to the wind pointer. An identical syncro is fed with the 3 wires connecting the 3 windings at the dial end. again a rotor fed with AC. Interesting with this system is that it can work backwards. ie turn the dial pointer and the wind vane would turn. These were used for all sorts of readouts like oil pressure so you don't have oil in the cockpit, also remote gyro readouts. There are now available chips to convert AC syncro data to digital outpt. But clearly yours is not one of these types. It might be worth searching for a converter chip.
I have often wondered about an arrangement using a temp dependant resitor which is heated. Airflow would cool it so measuring wind speed. Another 3 or 4 could conceivably measure direction. The whole having no moving parts so much more reliable. Currently I would never have wind speed and direction instruments on my boat due to unreliability especially with birds destroying mast head parts. good luck olewill
 
I think you need to try curve fitting sin and cos to it, maybe squares thereof.
Looks like first step is to subtract 6V.
Some of these sensors have a bunch of coils in them and a rotating ferrous core.

It's more accurate to use 3 phases than straight sin and cos.
I would knock up a spreadsheet and try some numbers.
 
....I have often wondered about an arrangement using a temp dependant resitor which is heated. Airflow would cool it so measuring wind speed. Another 3 or 4 could conceivably measure direction. The whole having no moving parts so much more reliable. Currently I would never have wind speed and direction instruments on my boat due to unreliability especially with birds destroying mast head parts. good luck olewill
That's been done.
Hot wire anemometers are quite common.
I saw an array of hot wires used to give direction years ago, seems to have gone the way of many great ideas?
 
I've done some more reading. Looks like the sensor is a "Hall effect" type which gives out a sinusoidal wave form. My last boat had a Raymarine ST50 and this had two sensors at right angles which is indeed enough to resolve any position. It looks like this one has three sensors at 120 deg intervals.
The issue with a look up table is that the voltages specified are nominal. The Hall effect produces a very very small voltage so tee masthead transducer circuit board presumably includes an amplifier.
There will then be voltage loss in the cable run from mast to below decks, so the actual voltage will be probably quite different.
One option would be to measure the actual peak voltage by turning the wind vane to create a tailored look up table, but I wonder if even that would vary depending on battery voltage on the day (i.e. voltage supply TO the transducer?)
What i may need therefore is a way of calculating the angle from the phase difference that doesn't rely on absolute values of voltage!
Might be easier to buy a new wind instrument!
 
Could you post make/model.

Here is an explanation of how the Raymarine units work.

My masthead unit was misbehaving this summer so I tried this out using a 9V battery, plotting at 30 deg intervals. Here's the result:

windangle 1_s.jpg

Not the ideal sine curves at 90deg phase. New pcb??
 
Its a Stowe unit

The full table is about halfway down their FAQ page here

Given the probability that the sensor uses Hall Effect then the wave form should be sinusoidal. I suspect the table given by the manufacturer suffers from rounding errors as it is only provided for owners to quickly test that they are getting something sensible down each wire when the unit is in place, i.e. they cannot turn the vane (without going up mast!) they have to accept whatever angle it is at and read the voltages off each wire.

Raymarine do it with two sensors at right angles. For some strange reason Stowe seem to use 3.
 
3 wires can be much more accurate when you allow for DC offset errors etc.
It's a well established concept.
May not involve hall effect, it may be a voltage induced in a coil which is rectified.
Or it can be variation in the inductance of a coil as a lump of ferrite is moved in the coil.
There are a lot of variations!
I had a B'n'G one apart once, managed to fix it without really getting into the detail of how it worked.....
 
OK, heres the algorithm for using look up tables.
Compile your raw data with many many duplicates of many many orientations, if you could set up a motor to drive the sensor (and log its position) I would do it, leave it turning for a few days gathering data.
For each orientation average the data and smooth to sine wave iF it really looks like a sine wave, just because there are magnets and hall effect sensors it does not necessarily mean you expect a sine wave output.
Take each orientation of the data and divide the middle value by the largest, this is the entry in the table. your table should repeat 6 times, use only the first set of values.
For the live readings again divide the middle value by the largest, this will remove cable and thermal resistance errors as well as drive voltage variations.
You will now have the angle within a sextant (like quadrant, but theres 6 in a circle). To determine the sextant consider the ordering of the 3 readings...
if a > b > c == sextant 0
if a > c > b == sextant 1
etc.


fred drift. Having seen many projects on the RPi forum, I am amazed and a bit disappointed by the number that take the vastly capable RPi and tack on an Arduino, the RPi can do all this stuff easy.
 
Just re read the thread and cant find why I thought a RPi was involved. Oh hum (suffering the PC vs mac in a small computer fashion I guess)


Can still do multi channel ADC with the RPi for pence per channel :P
 
It's 3 analogue inputs, a few sums and a bit of memory.

How often do you want the answer? a few times a second?
Plenty of processors under $1 will do that.
 
Its a Stowe unit

.

Very old Stowe units did use a very peculiar dual wiper continuous rotation potentiometer, I never did manage to understand quite how! Spares not available.
Later ones changed to Hall effect but I think compatibility with the instrument head was maintained somehow.
 
Very old Stowe units did use a very peculiar dual wiper continuous rotation potentiometer, I never did manage to understand quite how! Spares not available.
Later ones changed to Hall effect but I think compatibility with the instrument head was maintained somehow.

The 3 phase DC sine output from the Stowe wind unit CAN be decoded by Arduino, but the precision is not great. You also need to carefully scale the signal (either high precision resistors or 3 multiturn potentiometrs) to get it under the 3.3V or 5V maximum allowed by Arduino Analogue inputs. You also need to decide how you get any resultant number out! Serial to a PC or maybe a small LCD? I got it working but the averaging time needs some thought. I think the original Stowe decoder/ display unit had a 10 to 15 second buffer to stop the numbers jumping around.
Graeme
 
The 3 phase DC sine output from the Stowe wind unit CAN be decoded by Arduino, but the precision is not great. You also need to carefully scale the signal (either high precision resistors or 3 multiturn potentiometrs) to get it under the 3.3V or 5V maximum allowed by Arduino Analogue inputs. You also need to decide how you get any resultant number out! Serial to a PC or maybe a small LCD? I got it working but the averaging time needs some thought. I think the original Stowe decoder/ display unit had a 10 to 15 second buffer to stop the numbers jumping around.
Graeme
What method did you use to calculate the angle?
What kind of precision did you achieve?

The cunning comes in to getting the best answer when there is some error in one or more of the voltages and allowing for user calibration.
IMHO we want accuracy of better than a degree around 'close hauled' but everywhere else a couple of degrees would be good enough.
Interesting little problem!

You could just ADC the three lines on a scale of 0 to 1023 and have a GB of lookup table.
That would have been expensive when the original design was done!
 
Top