HOME > >
SENSING AND CONTROL MAIN PAGE > >
WIRING > >
Dallas / AAG sensor for wind direction and speed
If you have one of these splendid devices, it is probably getting a bit long in the tooth. New parts available!, if you want them. (Not from the editor of this page, and I haven't used the source cited... but I'll be interested to hear of anyone's experiences with the site cited!)
Back when Dallas Semiconductors's 1-Wire chip family was new, the firm produced a few devices to give customers answers to the "What's it good for?" question.
Among them was a cleverly designed, beautifully built sensor module for wind speed and wind direction. It ceased to be available from Dallas (now part of Maxim), but was available from AAG's site. You can also get them on eBay from time to time... but see the note below about versions.
In a moment I will explain the theory of the wind direction sensor's operation... it is quite neat.
But first I need to explain that THEY MOVED MY CHEESE.
It seems that the long time excellent wind speed/direction sensor has been replaced. It was based on a Dallas DS2450, and you can probably still get them via eBay.
The replacement for that, also from AAG, seems to have much more electronics in the sensor head. A good thing in some ways... just be careful that you know WHICH wind speed/direction unit you are working with. For one thing, the new one puts different signals on the pins of the connector... plug in the wrong device, and you could have serious problems. If the unit in question has a clear body, and decorative LEDs, it is the "new" device.
Catching your rabbit: If you want to buy from AAG, you'll have to go to their site and use the menu at the left to navigate. I don't seem to be able to give you links to the device I want to tell you about.
But before that, I want to mention that further down the page, there is a section that owners of the device should consult for some operational details. There is also a section on maintaining the device.
Software is available for the Version 3 sensor module, either free from AAG, or as shareware from the author of this page. I believe that other programs support the unit too... you can see some possibilities at my 1-Wire software page.
One last detour before getting to the main point of this page: A free piece of software is available from the author of this page to help people working with the Dallas / AAG wind direction and windspeed sensor. Read about it, download it at the relevant page of my Delphi tutorials. You don't have to use Delphi to use the tool.
Theory of Operation
While I still think there is Good Stuff in what I wrote below, I must admit that the page by the good people at the Polliniferoused Container project is outstanding. Their write up talks about the "old" AAG wind speed/direction sensor.
The version 3 Dallas/ AAG wind direction sensor implements a delightfully clever way to encode the shaft's position, as I'll outline in a moment. Just before I do, let me mention that earlier versions of the device were much less clever. The shaft had a magnet. There were 8 reed switches. The Version 3 device uses the same magnet and reed switches. However, the early devices were blunt instruments. The system relied on 8 separate chips which were switched on or off by the reed switches closed by the magnet. One bit of "cleverness" was there, and is still part of the system: When the magnet is half-way between two reed switches, they are both switched on, so 8 switches can resolve 16 positions.
The Version 3 system relies on 4 voltage measuring devices (ADCs) to sense the state of the 8 reed switches. No adjacent reed switches are on the same ADC. When no magnet is near one of the switches, the ADC it is connected to "sees" 5 volts. When a magnet is near one of the switches, the ADC "sees" either 0 volts or about 2.5 volts, depending on which switch the magnet is near. For a given ADC, only one switch can be closed at a given moment. Each ADC can "watch" two switches because resistors in the circuits allow the three possible voltages on each ADC monitored line.
Not "important", but maybe interesting: If you think about it, you will notice that this system is using a base 3 number system rather than the common base 2 (binary) system which has made such a difference to what we can do easily, reliably.
Just to fill in the detail: When a switch is open, the input to the ADC is connected to 5v through a resistor. As almost no current flows, the ADC "sees" 5 volts. In one case, the reed switch connects the ADC directly to 0v, so when the switch closes, the ADC "sees" 0 volts. In the other case, the reed switch connects the ADC to 0 volts through a second resistor. This, in combination with the resistor connecting the ADC to 5 volts results in the ADC "seeing" about 2.5 volts.
Thus, the ADC "sees" a high, or low, or "medium" voltage.
Note: The "medium" voltage varies, depending on whether one or two reed switches are creating the "medium" reading. I obtained good results if I set the boundary between "low" and "medium" at 15000, and the boundary between "medium" and "high" at 47000. The units were whatever were used to return values with by the call in my program to the code which read the DS2450.
If you code "high" as "2", "medium" as "1" and "low" as "0", the following shows the values you would see on the four ADC channels of the DS2450, in the order ABCD, if you were to rotate the vane in the direction which it would rotate if the wind went from...
being from the north to....
being from the east to....
being from the south, etc...
2220 (this is not necessarily the code for "North")
The wind speed/ direction sensor on sale from at least January 2003 through the time of writing is "Version 3". Earlier versions used different electronics for sensing the wind direction. Both work, but you have to use the right software for the version you have. Version 3 is better. You can tell one from the other by...
--the markings on the PCB:"Ceprei version 2" (Yes: two)
--By using the iButton Viewer. If there is a DS2450 (ID ends hex 20), the device is version 3.
I am interested in buying any second hand Dallas Rain Gauge or Wind sensor (any version). It must be in reasonable condition mechanically- no cracks or broken bits, but I'm hoping you have one with "dead" electronics, which you are willing to sell for a price that reflects the fact. The "no broken bits" requirement doesn't extend to the electronics. Shipping: It can be to the US or the UK. Please click here for my eddress.
Notes for owners: Configuration, connections to outer RJ-45 contacts
These notes apply only to the Version 3 wind sensor. The PCB is marked "Ceprei ver 2.0" (See the "Versions" section of this page if you are not sure if yours is one. It gives you a way to determine which board you have without opening the module, just by using the iButtonViewer.)
An RJ-11 connector is the 4 conductor connector used for US telephones. The middle two connections, as usual, are used for the Dallas data and ground connections.
N.B.: The outer connectors on the Version 3 Dallas/ AAG wind sensor are used as follows:
If they are connected, to one another, the "Parasitic Power Select" (Vcc) pin of the DS1820 temperature sensor inside the module is tied to the Dallas ground, thus configuring the chip to operate on parasitic power.
AAG supply a RJ11 plug with a wire between the outer connectors. If....
a) You want the DS1820 to be powered parasitically, and
b) You have not connected anything to the outer connectors on plug going into the other RJ-11 socket, then...
...you can plug the AAG-supplied shorting plug into the spare RJ-11 socket on the wind speed/ direction module.
... be very careful that there really is nothing else using the outside wires. The IButtonLink host adapter, for example, at least sometimes, puts 5 volts on one of those wires. Modules from other suppliers sometimes expect voltages to be supplied on them.
The safest course is to sever the wires leading to the outside connectors.
If you would rather power the DS1820 from and external source of 5v, this can be fed in through one of the outside connectors, but I'm not even going to track down which one, because I think it is a bad idea on several grounds:
a) The temperature sensor will almost certainly be in full sun, without good ventilation around it, and with no Stevenson screen or similar. It will also often be above a hot roof, or similar.
b) The sensor will probably be up a pole... and the 5v may have degraded before reaching the module, having to pass thought a longish wire, as it will.
If you don't know what is being carried by the two outside wires, and have not severed the wires, or if you do decide to supply the DS1820 with power via the RJ-11, be sure to remove the shorting plug.
I have done further notes on the question of what signals are in which wire, and the issue of parasitic powering, if you want to read more.
You can take more drastic approaches, as follows:
You could, with some skill and care, cut the traces leading to the DS1820. (It is the one device in a half cylinder (TO92) package). Be careful that in your trace cutting you do not cut the traces in places where they feed not only the DS1820 but other things as well! Even if you do (only) that, you still have the potentially problematic connection to the outside world between the 1-Wire "Zero volts/ Ground" contact in the two RJ-11s. (Cut two more traces, and you've removed that problem, too!) (Every one of the contacts in each of the RJ-11 sockets is connected to the corresponding pin in the other, by the way.) (Those 5 trace cuts, which merely sacrifices the DS1820, would be my choice.)
In all of this, remember that as soon as you modify the board, you set up the danger of someone (even yourself, a few months from now) doing something that would work fine on a "normal" version 3 wind sensor, but won't work in yours. These dangers are magnified if you are messing about with putting power in places it wasn't before.
In an unmodified board, the power-or-select-parasitic pin (Vcc) of the DS1820 is connected to nothing. Leave it like this, and you'll have an unreliable system. If you don't remove the DS1820 from the circuit, as suggested above, you must connect the DS1820's Vcc pin either to 0 volts (thus selecting parasitic power) or to a supply of a regulated 5 volts. It is the outside pin that isn't the Data pin. (See my page on 1-Wire signals if you aren't sure which one that is. There's a note at the bottom about the DS1820's pins.)
In an unmodified board, the outside contact of the RJ-11 beside the "Zero volts/Ground" contact is connected to the same signal as the "Zero volts/ ground" contact. (I know I've repeated this.. but you don't want to miss it!)
There are several ways you can deal with the problem, and two are non-invasive.
PLAN A: As discussed earlier, you can tie the Vcc pin low, selecting the parasitic power mode, by plugging a select-by-cable RJ-11 plug into either of the sockets. The select-by-cable RJ-11 plug merely needs a short between the two outside contacts. Be careful if you adopt this approach that your 1-Wire cabling isn't already doing something with those "spare" outside lines.
PLAN B: Alternatively, you could permanently select parasitic power by soldering a short bit of wire between the two pads on the board. With the board in front of you, components' side up, RJ-11 sockets near you, the pads are just above, just right of the RJ-11s. One is round, the other square, and the solder mask is absent from them for your convenience. While this approach has obvious problems, it does have the virtue of avoiding connections outside the sensor, where weather may get at them.
If you adopt plan B, I would suggest cutting the outside track just below where you soldered the bit of wire. This will leave the outside conductor on ONE side of the RJ-11 NOT connected to ground.
PLAN C: Again repeating myself: To power the DS1820 from off of the wind sensor's board, just feed it in by that outside connector of the RJ-11 which is not already tied to zero volts. Be sure that the link suggested for Plan B wasn't put in by someone previously... unless you want to put a short across your power supply!!!
Notes for owners: Maintenance
The module is beautifully made... but you must expect some maintenance issues with something which is outside in all winds and weathers, and which has moving parts. The anemometer reed switch in one I can look at as I'm writing this on has opened and closed over 100,000 times in just the past few weeks.
Even before you mount your module up it's pole, give it a very careful examination.
If you open the module... as you probably should, note carefully which way "up" the PCB needs to be within the housing. The RJ-11 connectors should be on the "up" side of the board. In a related vein: The anemometer should be at the top of the unit when it is mounted on its mast. Install the board upside down, and your wind direction sensor will give very confused results!
The exact height above the PCB of the rotors with magnets is easily adjusted. Get it right. Again, which way "up" the PCB is will matter. Be sure the nuts are snug. A drop of something to "lock" the nuts might be worthwhile, but be sure whatever you use isn't permanent.
At least one of the "magnets" on the rotor arms is a dummy, there just to keep the system balanced.
You may want to seal the module with silicone bath sealer or similar.... insects and spiders like to invade such places, and their webs and pupae do not help the functioning of the module.
Be sure that the "up" on the anemometer isn't rubbing against the non-moving part of the casing.
You may want to go straight to looking at the results of moving the sensor's vane and cups with the software you will be using to monitor the weather, or you may prefer to use something like the iButtonViewer first. My own software for the unit provides both long term recording, and, in a less than obvious place, I admit, nearly instantaneous readings to help in installation, troubleshooting. It also gives the "raw" Ds2450 (ADC) readings... but, at 8/05, a flaw in the initialization routines means that you must use the iButtonViewer to configure the chip for 5 volt full scale ADC readings before you'll get sensible results from the wind direction parts of my program. Note that you also need to do that initialization before you'll get sensible result from the DS2450 page of the iButtonViewer.
When you come to mount the module out in the weather it is going to monitor, ask yourself whether you've chosen the best site available to you. Consider whether buildings, trees, etc are going to disrupt the "true" winds en route to your sensor.
Devise a mounting solution that is robust but not permanent. You will almost certainly need to take the module down from time to time for inspection or servicing.
Consider the issue of lightning. I don't know enough about it to give you specific suggestions.... but putting a long wire between a point above your house and the back of your computer inside your house does have implications which should be considered. I'm lucky enough to live in a low lightning area! Some people argue that a well installed lightning rod reduces the strike in the space around the rod... but as I said, I'm no expert.
Long discussions in a newsgroup concluded that Vaseline is a terrible substance to use for weatherproofing.
Click this to search this site without using forms, or just use......
The search engine merely looks for the words you type, so....
* Spell them properly.
* Don't bother with "How do I get rich?" That will merely return pages with "how", "do", "I"....
Please also note that I have two other sites, and that this search will not include them. They have their own search buttons.
My site at Arunet.
Ad from page's editor: Yes.. I do enjoy compiling these things for you...
hope they are helpful. However.. this doesn't pay my bills!!! If you find
this stuff useful, (and you run an MS-DOS or Windows PC) please visit my
freeware and shareware page, download something, and circulate it for me?
At least (please) send an 'I liked the parallel port use page, and I'm
from (country/ state)' email? (No... I don't do spam)
Links on your page to this page would also be appreciated!
Click here to visit editor's freeware, shareware page.
This is just one of the guides I have published on the net. Please visit any of the following that relate to interests you have....
Pascal programming tutorials
Electronics for hobbyists and schools
Main Home Page
Click here to learn how to contact this page's editor, Tom Boyd.
Index of sensing and control pages (From there you can also go to other help from the editor of this page.)
-- Page ends --