Page 2 of 2

Re: Homebuilt Wind Vane 1deg resolution

Posted: Fri 11 Feb 2011 11:38 am
by Charlie
Gina wrote:That's interesting :) I thought of a light pipe but couldn't think of any way to make it myself.
The simplest way to make something similar to a light pipe is to use cheap plastic optical fiber. I doubt you'd need more than a foot or two...

Re: Homebuilt Wind Vane 1deg resolution

Posted: Fri 11 Feb 2011 3:51 pm
by daedalusminos
I'd go for a wide angle LED to illuminate all phototransistors at the same time, if you've got the luxury of an ADC then you can determine the luminance on each PT. Only drawback of an ADC is conversion/acquisition times, but if you're on a transition does it matter since resolution is 22.5deg? Assuming you correctly correctlyinterpret graycode.

Re: Homebuilt Wind Vane 1deg resolution

Posted: Fri 11 Feb 2011 4:40 pm
by Gina
Super-T wrote:Basically what you are doing is building an encoder. You could print a mask onto clear film and count pulses. You would also need to know the direction that the vane is moving....backwards or forwards and count pulses as appropriate.
I guess this may use too much power but you would have great accuracy, depending on the number of pulses per rev. 360 might be a good number :-)
Yes, this is another way. For my system it would be more difficult. I can count pulses (having found a source of 1-wire counter chips) and even count 2 sets in one chip but detecting the direction would require extra logic - eg. a CMOS chip. Or maybe do it with discrete components. To allow for which way the wind direction is changing would require 2 optical sensors with a hole (or stripe) long enough to cover both sensors, AND gates and 2 counters (or an up/down counter). It's an interesting idea and I'll look into it. A problem might be determining the starting position.

Here is a 1-wire design on the principles I mentioned earlier. Power is derived from the 1-wire network by means of a Schottky diode and electrolytic capacitor. The latter has to be big enough to supply LED current during the ON period without dropping the voltage by more than about a volt. The LEDs are switched by a DS 2413 twin PIO device. Each data line when used as output is capable of switching 28v (we're only using 5v) and 20mA (LED ON current is about 2mA). The 4 photo-transistor outputs drive a DS2450 4 channel D/A converter. The other chip shown counts closures of the anemometer reed switch. It has debounce included and has a pair of 32bit counters.
1-wire_vane_optical-11-02-11-b.png

Re: Homebuilt Wind Vane 1deg resolution

Posted: Fri 11 Feb 2011 5:02 pm
by Gina
daedalusminos wrote:I'd go for a wide angle LED to illuminate all phototransistors at the same time, if you've got the luxury of an ADC then you can determine the luminance on each PT.
I thought of that but they take a lot more current than the ones I'm using and on top of that the increased distance causes considerable light loss. In my setup the LED and PT are almost touching - less than 1mm. I'm using a thin plastic encoder disc.
Only drawback of an ADC is conversion/acquisition times, but if you're on a transition does it matter since resolution is 22.5deg? Assuming you correctly correctlyinterpret graycode.
The voltage is sampled and held while the conversion takes place. There will be a slight delay between sampling each channel but since only one input changes for each 22.5 degree transition, the vane can't move fast enough to change more that one channel in each (4 channel) sampling time.

Re: Homebuilt Wind Vane 1deg resolution

Posted: Fri 11 Feb 2011 7:55 pm
by daedalusminos
OK, managed to get the mechanics finished for the bench test model.

from top down: top plate (with bearing installed), main body, bottom plate, bottom bearing, hall sensor, carbon fibre shaft with magnet holder (to left).
WindVane001.jpg

Re: Homebuilt Wind Vane 1deg resolution

Posted: Sun 13 Feb 2011 7:35 am
by gliderguider
I remember looking at a design over 20 years ago that had the anemometer and wind vane built into one unit. There was a reason for that. the anemometer was mounted on the top and the windvane on the bottom. The anemometer used an optical encoder with 360 slots. There was also a second track that had just one hole in it. this was to provide and index pulse. the windvane had a disk with one hole in it. the unit was designed so that the light fro the index pulse could shine through the hole in the windvane disk. I cant remember the exact details, but the wind direction was measured by counting the number of anemometer pulses between the index pulse from the anemometer disk and the point where the light shone through the anemometer disk through the windvane disk. I seem to remember it needed a large collection of leds to fully illuminate the cavity above the anemometer disk. this was to ensure that whatever position the vane was in, there would always be some light to pass through the 2 disks. I cant remember how the light at the bottom was sensed as the sensor needs to effectively be a ring photosensor so that it will sense any wind direction.

The big advantage with this was that it did produce 1 deg resolution, but on a digital display the numbers just flickered too much. My feeling is that 5deg is probably more than is needed for wind direction.

I know this is difficult to put into words, but if you need any help, I'll try to find the article.

Re: Homebuilt Wind Vane 1deg resolution

Posted: Sun 13 Feb 2011 8:00 am
by daedalusminos
gliderguider wrote:The anemometer used an optical encoder with 360 slots. There was also a second track that had just one hole in it. this was to provide and index pulse. the windvane had a disk with one hole in it.
Sounds like this is back to front, I would expect the windvane to have 360 slots and an index hole.

This would function as an absolute encoder, the index hole is to enable the absolute position of the disc to be determined (say north). The 360 slots allow 1 degree resolution and two sensors placed a small distance apart below allow disc direction to be determined as in a quadrature encoder.

As soon as the index hole is detected, you are able to count 'degree slots' and since you can determine direction, you can add/subtract this from the bearing.

The drawback is that the sensors have to be permanently powered as you have to keep a running total of the bearing since you can't check/correct until the index hole is sensed again.

Re: Homebuilt Wind Vane 1deg resolution

Posted: Sun 13 Feb 2011 9:02 am
by gliderguider
No, I was right in the first place, the slots in the anemometer disk generate wind speed pulses primarily, but the electronics also counted the number of anemometer pulses between an index pulse from the anemometer disk and the point where that index hole passes a reference hole in the windvane disk. The index hole for the anemometer disk generated an index pulse at 0 degrees, and then there was a second pulse generated when it passed the anemometer reference hole. the number of anemometer degree pulses between the index pulses gave you the direction.

Re: Homebuilt Wind Vane 1deg resolution

Posted: Sun 13 Feb 2011 10:56 am
by Gina
I've seen variations on this theme - one using reed switches instead of optical. From my observations, 16 directions - 22.5 degrees resolution should be quite adequate. Unless conditions are very settled, the wind direction varies more than this! If you really want more resolution then double it to 32 (or 10 degrees = 36). It strikes me that going for 1 degree is way OTT. General meteorological standards seem to be to go for 8 or at most 16 points. IMO going for more resolution than that is really just an exercise with little practical benefit.

Re: Homebuilt Wind Vane 1deg resolution

Posted: Sun 13 Feb 2011 11:16 am
by daedalusminos
Gina wrote:1 degree is way OTT
I couldn't agree more, but all that extra resolution effectively came free due to the hall effect sensor I'm using. If nothing else, it will prove useful if filtering the output. Incidentally, here's a BOM of the sensor parts:

AS5134 Sensor: GBP4.20
uController: GBP1.80
Magnet: GBP0.30

Re: Homebuilt Wind Vane 1deg resolution

Posted: Sun 13 Feb 2011 2:26 pm
by gliderguider
I doubt that many of us have an unobstructed area around our instrumentation to get any kind of stable airflow. I know mine is extremely compromised by the terrain and the foliage in our area. Thats a compromise that we make to live the way we want.

Thanks for bringing some sanity back to the discussion Gina.

Re: Homebuilt Wind Vane 1deg resolution

Posted: Sat 26 Feb 2011 9:10 pm
by daedalusminos
Well I managed to source some diametrically magnetised NdFeB magnets and asembled the bench test windvane. I wrote a simple visual basic app to interface to the windvane for testing purposes and after a few teething problems the hall sensor was functioning without problems. I have a magnet-sensor gap of 1.6mm (PCB thickness) and on the default gain setting, the sensor is reporting 25% field strength, this should ideally be closer to 50% so will either change the sensor gain or reduce air gap.

I've sourced some stainless steel bearings for the final mechanics and will finalise design in the next few weeks. Next job is the 2.4GHz wireless link.

Re: Homebuilt Wind Vane 1deg resolution

Posted: Mon 22 Oct 2012 11:25 pm
by sanramonrover
It has been a long time since anyone has mentioned this project. There is new info in the Homebuilt Forum, look for Hall Effect Sensors.