|
Post by 556duckvader on Feb 10, 2020 9:04:25 GMT -8
Would anyone be able to tell me in what function does the wind speed and direction get calculated? I am using a Davis Anemometer and I need to adjust the wind factor so I get the right speed. I know in the PI software its in SDL_Pi_WeatherRack.py but I can't seem to find it in the Arduino code.
Thanks!
|
|
|
Post by SDL on Feb 10, 2020 16:02:04 GMT -8
What Arduino code are you looking at? Give the link please.
BP
|
|
|
Post by 556duckvader on Feb 12, 2020 9:57:02 GMT -8
|
|
|
Post by SDL on Feb 12, 2020 14:31:20 GMT -8
SDL_ESP32_OurWeather/SDL_Weather_80422.cpp
BP
|
|
|
Post by 556duckvader on Feb 12, 2020 18:50:01 GMT -8
New question. I have the Davis Anemometer connected and I appear to be getting wind speed reading but the vane isn't telling the direction. I have taken a volt meter and on pin 5 I can see the voltage swing from 0V to 3.26V when I spin the vane around. What would be causing the ADC to not read the voltages?
|
|
|
Post by SDL on Feb 13, 2020 11:14:45 GMT -8
I would guess you don't have it hooked up right. We don't know anything about the Davis anemometer. Run an ADS1015 test program and look at the channels. That should help.
BP
|
|
|
Post by 556duckvader on Feb 14, 2020 6:23:43 GMT -8
Can you tell me if the ADC that is right behind the Anemometer/Wind Vane is the same ADC that the RJ11 ports use?
|
|
|
Post by 556duckvader on Feb 14, 2020 8:26:28 GMT -8
It looks like the ADC is reading the voltages. Here are the voltages I am getting using a volt meter measuring from AN1 to ground and resistance I am getting on the wind vane.
Direction (Degrees) Resistance (Ohms) Voltage (V=3.3v, R = 10KOhms) 0 0 3.27V 22.5 1.25K 0.37V 45 2.56K 0.67V 67.5 3.89K 0.92V 90 5.24K 1.13V 112.5 6.61K 1.32V 135 8.03K 1.47V 157.5 9.46K 1.61V 180 10.89K 1.73V 202.5 12.51K 1.84V 225 13.88K 1.92V 247.5 15.27K 2.00V 270 16.54K 2.06V 292.5 17.88K 2.13V 315 19.28K 2.18V 337.5 20.6K 2.23V
|
|
|
Post by 556duckvader on Feb 14, 2020 13:50:58 GMT -8
I also checked the ADC and I am getting readings from 0 to 1088 as I spin the wind vane around.
0 = 1088 90 = 384 180 = 578 270 = 689 355 = 751
|
|
|
Post by SDL on Feb 15, 2020 14:28:24 GMT -8
Yes, the ADC on the board is the one that reads the wind direction. It looks like it is working.
John
|
|