View previous topic :: View next topic |
Author |
Message |
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
Davis Instruments Anemometer |
Posted: Tue May 06, 2008 8:41 am |
|
|
Has anyone used a Davis Instruments Anemometer (not sure part number) with a PIC A/D? The wind speed is simple. The wind direction uses a non-linear pot. (Anyone know why?) I use a 4.7K pullup to +5 so I only get a range of 0-828 A/D reading. The Wind direction pot is ~20K pot. Here are some reading:
Code: |
A/D WindDirection
828 000 North
808 045 NE
792 090 East
760 135 SE
752 180 South
652 225 SW
564 270 West
391 315 NW
000 0 North
|
|
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Tue May 06, 2008 9:28 am |
|
|
I do not know the anemometer in question but..
How have you connected it?
Have you connected it as a simple voltage divider with the wiper going to the A/D input, one end of the pot going to ground and the other end of the pot going to the 4.7K resistor?
Why did you use the resistor?
When testing the anemometer did you test for a dead band around 0? If so how wide is the dead band? _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
Guest
|
|
Posted: Tue May 06, 2008 9:48 am |
|
|
Hi,
First, some terminology, an 'anemometer' typically refers to an instrument that measures wind velocity, not wind direction.
You are apparently referring to the Davis wind direction sensor which consists of a 360 degree potentiometer connected to a wind vane. The pot is certainly linear, and you should verify that with an ohm meter (not the PIC A/D) as you rotate the vane. Connect the meter between one end of the pot, and the wiper. It's been a long since I played with this item, so I don't remember the value of the pot. If you tie the low side of the pot to GND, and the high side to +5V, the wiper will vary from 0 to 5V as the vane rotates in the wind. You should be able to connect the wiper directly to the A/D input of the PIC, meaning that the A/D input impedance is high enough that it's not going to effect the operation of the pot.
The anemometer portion of the sensor is a reed switch that closes for each revolution of the wind speed cups. You can use the PIC to measure the closure frequency, and then you can calculate wind speed. I calibrated my unit by mounting the assembly to the roof of a car while moving at known speeds under no wind conditions.
Hope this helps!
Doug |
|
|
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
|
Posted: Tue May 06, 2008 9:48 am |
|
|
I can only connect to the wiper and one end of the pot in the anemometer so I used a pullup to 5v so I can convert between 0 and 4v dc. I graphed it out with better detail and the pot definately has an audio taper to it. I am using a lookup table for now.
Does anyone have a good program to enter in X,Y coordinates and let the PC derive a quadratic equation that will follow the data points? I used to have an old DOS program that did this. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Tue May 06, 2008 10:10 am |
|
|
ljbeng wrote: | I can only connect to the wiper and one end of the pot in the anemometer so I used a pullup to 5v so I can convert between 0 and 4v dc. I graphed it out with better detail and the pot definately has an audio taper to it. I am using a lookup table for now.
Does anyone have a good program to enter in X,Y coordinates and let the PC derive a quadratic equation that will follow the data points? I used to have an old DOS program that did this. |
That is the difficult way of doing this and is why you are getting non linear results. Connect it as I proposed and add a 1M resistor from the wiper to ground. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
|
Posted: Tue May 06, 2008 10:46 am |
|
|
My screw up, I have access to high,low and wiper.... Sorry. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
|
inservi
Joined: 13 May 2007 Posts: 128
|
|
Posted: Wed May 07, 2008 2:31 am |
|
|
Hello,
dyeatman,
When i read the 'detail about how the Davis unit works', I'm surprised because you look to consider than the relation between wind speed and anemometer rotation speed is linear.
mph = 2.25 * Hertz
mps = 1.006 * Hertz
I'm sure that it's not true, it is a logarithm relation. You need either a table or a function to calculate the wind speed from the anemometer rotation speed .
(sorry for my bad English)
Best regards,
dro. _________________ in médio virtus |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Wed May 07, 2008 8:49 am |
|
|
With the Davis unit (of which I have two in operation) I found the non-linearity to be minimal. Both of mine were tested against the NOAA Severe Storms Lab equipment which is near where I live and found to be relatively accurate once I got them calibrated at a single speed (40 mph).
The max error I found at any tested speed was approx .2 m/s. The largest error was seen at the very low end (2-3 mph) and the high end (> 80 mph).
I created an offset error correction constant in the code, then tweaked that during testing to get my unit to match the readings of the NOAA unit. During testing I simply added that value to the multiplier then performed my calculations.
I also found the Wind Vane to be very linear and no table was required for that device either.
Link to a discussion of anemometer error:
www.otechwind.com/downloads/Anemometer%20Calibration%20Uncertainty,%20AWEA%20Windpower%202007.pps |
|
|
inservi
Joined: 13 May 2007 Posts: 128
|
|
Posted: Wed May 07, 2008 11:32 am |
|
|
Hello dyeatman,
Thank you for precisions.
Best regards,
dro _________________ in médio virtus |
|
|
stijn023
Joined: 28 Sep 2010 Posts: 49
|
|
Posted: Wed Jan 19, 2011 10:15 am |
|
|
Quote: | The wind speed is simple. |
Could you post the code for it please?
Thanks for the help |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Wed Jan 19, 2011 3:29 pm |
|
|
Hi,
This is an old thread so the original participants may no longer be here?
This is a relatively simple task to accomplish. Basically, you need code to measure the time between the pulses generated by the switch closure of the anemometer - a tachometer of sorts. The PIC CCP module is ideal for this. Once you know the time period or frequency you just need to make a simple conversion to wind speed using the know scale factor provided in the link shown in a previous reply. Search the forum for 'tachometer' to get yourself started. PCM posted some sample code a while back that with some slight modification (change 'rising edge' to 'falling edge' for example) will get you going!
John |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Wed Jan 19, 2011 3:50 pm |
|
|
To make it real simple.
The number of pulses in 2.25 seconds = the absolute wind speed.
So you set up a timer routine to keep track of 2.25 seconds and count the
pulses during that time interval to determine the speed.
Regardless of what inservi said earlier, the above originally came directly
from a Davis Engineer and has proved to be accurate on two different
systems of mine for many years. _________________ Google and Forum Search are some of your best tools!!!! |
|
|
|