Author Topic: Davis VP2 anemometer wind speed curve  (Read 29786 times)

0 Members and 1 Guest are viewing this topic.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Davis VP2 anemometer wind speed curve
« Reply #100 on: July 14, 2017, 12:36:17 PM »
I've noticed that southerly winds really cause the directional vane to bounce around. Now I can see proof for my hypothesis that it's the mounting solution. That's too bad because up here we get a lot of winds from the south to southwest, especially in the summer. I use 10 minute directional averages which usually resemble actual wind bearings, but still... that's a lot of noise in the velocities, especially during wind storms.

All these errors are accounted for in the firmware of the console/Envoy, so if you're using factory equipment, you shouldn't worry about them at all. Although as you mentioned noise is definitely more pronounced around 180°. I think for 5-min averages it evens out but gusts can be hurt.

I had read somewhere you can, with a bit of rewiring of the RJ-11 connector, plug this into a Davis ISS (provided you have power available): http://www.youngusa.com/products/7/5.html Does anyone have suggestions for plug-and-play replacements of the VP2 anny?

Looking at the manuals these either emit AC or DC (depending on model) voltage proportional to wind speed. Direction sensing is similar to the Davis one using a potmeter. I don't think you can attach these to a SIM board without active conversion electronics. And then you need to deal with the error corrections that are automatic but only applicable to Davis anemometers.

However there's a universal anemometer interface by Davis but this is now discontinued. I'd probably just make a simple transmitter for it...

Offline openvista

  • Forecaster
  • *****
  • Posts: 481
    • marquetteweather.com
Re: Davis VP2 anemometer wind speed curve
« Reply #101 on: July 14, 2017, 12:48:27 PM »
However there's a universal anemometer interface by Davis but this is now discontinued. I'd probably just make a simple transmitter for it...

You're right, I remember now, that's the missing piece! Well, as you said, for those of us using factory equipment, we're probably OK anyway for the most part.

I should also point out that for those, like me, who are obsessed with obtaining accurate wind data... if you live in a suburban or urban environment, your anny is most likely mounted within the roughness sublayer (RSL). In other words, unless you meet the siting guidelines for wind (being 10x the horizontal distance from the height of the nearest obstruction), you've already got plenty of noise in your data that a better anemometer is not going to remove.  Food for thot.
Davis Vantage Pro2 AC FARS | https://marquetteweather.com | EW7933

Offline ra1nb0w

  • Member
  • *
  • Posts: 2
Re: Davis VP2 anemometer wind speed curve
« Reply #102 on: October 23, 2021, 09:35:11 AM »
Actually, I have no problems sampling the 20k pot in any position. It's the 909k R causing headaches. What I did is that I put a 47k (arbitrary, this looked OK for the purpose) R in series with the swiper wire of 20k pot. I power the anemometer assembly through the 47k, read a sample, then power it normally and read another sample (this latter is the "real" value). With some juggling with the readouts it's easy to tell when the swipe is in the blind zone. I use 2 digital pins for the 2 different Vcc inputs. This is a hack but works with a sigle additional resistor. (I hope I succeeded in explaining what I did without schematics.)

Since I am facing the same problem I would to be sure to have correctly understand what you did.
Is it something like this
Code: [Select]
D7 -> Vcc wire
D6 -> 47KOhm -> swiper wire
A0 -> swiper wire
GND -> ground wire
First, put HIGH D6, read A0 then put D6 in high impedence. Put D7 HIGH and then read A0. Put D7 to high impedence.
If D6/D7 have not enough current you need to use PMOS o inverter plus NMOS.

Am I wrong? thank you

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Davis VP2 anemometer wind speed curve
« Reply #103 on: October 23, 2021, 10:08:30 AM »
Is it something like this
Code: [Select]
D7 -> Vcc wire
D6 -> 47KOhm -> swiper wire
A0 -> swiper wire
GND -> ground wire
First, put HIGH D6, read A0 then put D6 in high impedence. Put D7 HIGH and then read A0. Put D7 to high impedence.
If D6/D7 have not enough current you need to use PMOS o inverter plus NMOS.

As I said, I had no problems sampling the analog pin. Your description seems OK, though it's a little bit more sophosticated in my code, see it here.

Offline ra1nb0w

  • Member
  • *
  • Posts: 2
Re: Davis VP2 anemometer wind speed curve
« Reply #104 on: October 23, 2021, 10:33:46 AM »
As I said, I had no problems sampling the analog pin. Your description seems OK, though it's a little bit more sophosticated in my code, see it here.
Sure, I was concise. Thank you!

Offline Bra1nsen

  • Member
  • *
  • Posts: 12
Re: Davis VP2 anemometer wind speed curve
« Reply #105 on: June 10, 2022, 01:04:24 PM »
ladies and gentlemen

is there any arduino code ready to copy which considers the wind curve error?

happy greetings
paul

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Davis VP2 anemometer wind speed curve
« Reply #106 on: June 10, 2022, 01:11:00 PM »
is there any arduino code ready to copy which considers the wind curve error?

See here, it's in windcal.dat in binary form. Read some of the source beside that file to see exactly how data is arranged. It's not Arduino code tho, but I think you manage starting from here.

Offline Bra1nsen

  • Member
  • *
  • Posts: 12
Re: Davis VP2 anemometer wind speed curve
« Reply #107 on: June 10, 2022, 01:25:28 PM »
I can't find any function of a correction in the code  :-|

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Davis VP2 anemometer wind speed curve
« Reply #108 on: June 10, 2022, 01:28:23 PM »
You really should look harder.

Offline Bra1nsen

  • Member
  • *
  • Posts: 12
Re: Davis VP2 anemometer wind speed curve
« Reply #109 on: June 10, 2022, 01:32:56 PM »
I can not do anything with that.
I measure the revolutions (count) per unit of time. I just want to use it in a function, which then calculates the speed for me. I took a close look at your monster code..

Offline Bra1nsen

  • Member
  • *
  • Posts: 12
Re: Davis VP2 anemometer wind speed curve
« Reply #110 on: June 10, 2022, 01:36:34 PM »
I don't understand this windcal.dat either

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Davis VP2 anemometer wind speed curve
« Reply #111 on: June 10, 2022, 01:48:56 PM »
I can not do anything with that.

Maybe try a bit harder?

I took a close look at your monster code..

What the hell is a monster code? It's a VP2 driver for radio packets coming in via serial. It's not exactly trivial. The original code is not mine BTW, but I've made numerous fixes and changes to it to better suit our use case. There's no need to qualify other's work this way.

I don't understand this windcal.dat either

If you not familiar with the radio packet data of the station: there's a single byte for direction, representing the full 360° span and there's a byte for the raw wind speed in mph. The code is looking up a calibrated wind speed value in that table using these 2 values. Sounds pretty simple to me.

Offline Bra1nsen

  • Member
  • *
  • Posts: 12
Re: Davis VP2 anemometer wind speed curve
« Reply #112 on: June 10, 2022, 02:17:59 PM »
ok I understand that. I haven't worked with dat. files until now. I'll see how to integrate it into arduino. thanks first of all

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Davis VP2 anemometer wind speed curve
« Reply #113 on: June 10, 2022, 02:24:33 PM »
It's a simple binary file. The extension is irrelevant and arbitrary but often used for such data. You can write a short program in any language to generate a .h or similar file, maybe on an ESP32 or similar device you can just copy it to the FS and use from there as is.

Offline Bra1nsen

  • Member
  • *
  • Posts: 12
Re: Davis VP2 anemometer wind speed curve
« Reply #114 on: September 28, 2022, 09:21:50 AM »
Ok I readout the arduino with a Raspberry Pi. I use a python script, where i got raw_mph and raw_angle. Now I would like to load the windcal.dat file and look up the real windspeed. but how?

Code: [Select]
        windcal_filename = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'windcal.dat')
        windcal_file = open(windcal_filename, 'rb')
        self.windcal_tab = bytearray(windcal_file.read())
        windcal_file.close()
        loginf('using wind calibration file %s' % windcal_filename)
        self.lastWindRaw = -1  # for wind gust spike filtering

       # Use lookup table to correct raw wind speed errors
        def calc_wind_speed_ec(self, raw_mph, raw_angle):

            # some sanitization: no corrections needed under 3 and no values exist above 150 mph
            if raw_mph < 3 or raw_mph > 150:
                return raw_mph

            return self.windcal_tab[(raw_mph - 1) * 256 + raw_angle]

something like that?

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Davis VP2 anemometer wind speed curve
« Reply #115 on: September 28, 2022, 09:39:20 AM »
Yeah, something like that should be fine.

 

anything