|
Post by earlthesquirrel on Jun 17, 2020 18:44:51 GMT -8
Hello,
I've been trying to figure out why my Wind vane just doesn't give correct values. It's the standard gray set of sensors. I'm using a SwitchDoc Labs Pi2Grover shield. Running on top of a Raspberry Pi Zero W. It's a version 2 ( I believe) Weather board. (I was originally running a Version 1 -- with headers only) when I started this. But that was years ago. Anyway, in the past I tweaked the code to get things to line up.
But for this set up, I am determined to get this sorted out, once and for all..
The only things on the weather board are :
1) RJ jack coming down from Anemometer and Wind vane. 2) Grove cable from D20/21 to Anemometer 3) Grove from D12/D13 to Weather Vane 4) Grove from I2C on hat to I2C on weather board. (Just one is connected)
I only have the ADS1015 and RTC installed on the Weather board.
Other sensors are located at different locations. (I'm using a WIONode for them) No rain bucket. May add a 3rd party one later.....wasn't all that happy with random rain readings because of strong wind or movement of mast.
I ran the PiWeatherRackTest and recorded numbers with the wind vane as I placed the indicator in the positions (as best as I could eyeballing it and holding the indicator with my hand)
I get number like this: N
| 4.167
| NNE
| 2.982
| NE
| 3.00
| ENE
| 3.018
|
|
| E
| 0.999
| ESE
| 1.698
| SE
| 1.707
| SSE
| 1.666
|
|
| S
| 2.307
| SSW
| 2.322
| SW
| 3.672
| WSW
| 3.633
| W
| 4.575
| WNS
| 4.440
| NW
| 4.317
| NNW
| 4.323
|
None of these numbers line up with either the code in 3.3v or 5V mode. I'm trying to understand WHAT the voltage would actually be in a "limited" configuration such as mine.
Or whether or not anything resistor wise will be thrown off without other sensors. Also only having 1 I2C Grove cable connected. Would that cause issues?
I really would like to solve this... I've had a weather station set up for a number of years... initially running the V1 weather board connected to an arduino Mega, then converting to the Pi. Then when that died, moving some sensors to the WIO Node (basically sensors on little boards with grove cables to the WIO Node) since that allowed for much easier configuration, easy maintenance and a built in REST interface.
But I like these two wind sensors and have a mast set up for Flight Aware flight tracking which combined very well with the wind sensors. But since I had time during the lockdown I've re-built things and would REALLY like to be able to stop hacking the code and come up with a "real" understanding what is off.
Thanks!
Earl
Attachments:
|
|
|
Post by SDL on Jun 18, 2020 17:39:10 GMT -8
I looked at a couple of your numbers. I've attached the chart from the specification showing what the voltages should be (these are 3.3V but easily converted). Let's look at 0 degrees (N), 45 degrees (NE) and 90 degrees (E). Converting to 5V N - 0 - 3.84V (Compared to yours 4.167V) dividing specification by yours yields a ratio of : 0.92 NE - 45 - 2.26V (Compared to yours 3.0V) dividing specification by yours yields a ratio of : 0.75 E - 90 - 0.46V (Compared to your 0.999V) dividing specification by yours yields a ratio of : 0.46 This isn't making any sense to me. If we had a scale problem, they should all have about the same ratio. Looking at your highest voltage (W at 4.75V) and mine at (W 4.636) ratio of 0.97. Looking at your lowest voltage (E 0.999) and mine (112.5 degrees 0.89V) ration of 0.92. Are your numbers consistent? Every time? I wonder if your ADC is bad. Take a picture of the board and post it. Something is definitely hosed up. BP Attachments:
|
|
|
Post by earlthesquirrel on Jun 18, 2020 19:43:04 GMT -8
First, picture. That's the ADC. It's detected by the code and properly id'ed. So it's not "obviously" broken.
Now -- answers to your questions: 1) I've used this ADC since I first set up the weather station. This problem has seemed to exist since day 1. 2) I'm on my second weather board. The first one I had was just headers (no grove). I had a ADC, FRAM, Temp and humidity, RTC and Lightning sensors hooked up to it. 3) Originally I had that original weather board hooked up to an Arduino. Had problems with wind speed and direction. I think interrrupts were just too much for the arduino. But never could sort out. 4) Temp and Humidity were always ok. 5) Recently went to new grove version (I think I got it as a deal with a 2nd Lightning sensor --- I have had problems with that as well, but that will be next project... I've 3d printed case and have exact set up as this : shop.switchdoc.com/products/copy-of-raspberry-pi-iot-lightning-detector-kit. I got the 2nd sensor because I never could get results that I expected from it. I have similar issues with new set up, and I also bought the Lightning tester from you guys... but again, this I'll bring up on a new thread after I get wind resolved) 6) From original config until now -- Weather board is changed out. Arduino->First Raspberry Pi->Raspberry Pi Zero W. No FRAM. No other sensors, just wind speed and wind direction. 7) The Weather sensors have always been enclosed in some sort of "best-that-I-can" weather resistant enclosure. Can't say weather proof, but reasonably protected. I have got thru some temp and humidity sensors.... Thunder board I thought I had, but now since new Grove one isn't any different, not so sure. 8) Yes the numbers have been consistent. Even since day 1. I've had to re-write the code with new bounds, but when I've done that, it has seemed to be consistent. The numbers never made sense... and at first I thought that one time when the weather vane had popped off that I had put it back on wrongly. But then I realized that the magnet causes it to "self-calibrate", so don't think that's an issue. I know I'm on the 2nd anemometer (the first one the cups got broken off). I don't recall if this is the first or second wind vane. It could be #2.
9) I'd say the numbers may not be exact between runs (but I can't say I can do it exactly the same either) But they're close enough that the code does give consistent N/S/E/W answers that match up with where the wind vane is pointing.
If it's a bad ADC, that's a fairly easy fix. But if so, it's been broken from day 1.... broken but consistent...
Earl
|
|
|
Post by SDL on Jun 21, 2020 12:03:17 GMT -8
Earl, Excellent response. I think we have to determine whether there is a problem with the ADC or with the Wind Vane. Here is what I suggest you do. The following pictures are from the WeatherRack specification: www.switchdoc.com/wp-content/uploads/2015/01/WeatherRack-011514-V1.0.pdfUnplug the Weather Vane. Hook up up the RJ11 plug like this (using 5V): Now take a multimeter and measure the voltage at the output. Just do the 8 cardinal directions. Record it and compare the voltages to the chart (multiplying by 1.52 of course). This will tell you if the wind vane is working correctly. If it is, then maybe the ADC is not working right. Just run the ADC and print out values. BP
|
|
|
Post by earlthesquirrel on Jun 28, 2020 12:58:25 GMT -8
Ok, I didn't have a resistor handy (but do now) so will be trying to wire up as you asked... will take pictures of the rig I set up. In the meantime, I also purchased these two boards: _
Figuring that those along with the Raspberry Pi Grove hat I have (shown below) would be a way to test out the ADC part of the equation.
However when I got them, it wasn't clear how I'd wire these up (I've not found a project on the Switchdoc site that seems to match up to them). I'm assuming the two outputs on the Rainbucket/Windsensors board would somehow hook up to the Analog board. (they're not labeled Digital or Analog on the Rainbucket/Windsensor board, but I'm assuming their Analog outputs.)
I see the I2C interfaces on the ADC board. So that I hooked up to the I2C bus on the Raspberry Pi hat. There also seems to be pins for I2C as well. But no Digital outputs (just A0, A1, A2, A3 on ADC board). Can you point me towards a projects/code that I could use to test this out? Is it all output as I2C data??
I'll make another post with the values of the wind vane after I get that tested.
Thanks in advance for the assistance.
|
|
|
Post by SDL on Jun 29, 2020 15:01:49 GMT -8
Only the Analog output (Wind Vane) would go to the ADC. Download the test program for the ADC board. There is a program for reading the ADC in the repository. github.com/switchdoclabs/SDL_Pi_Grove4Ch16BitADCThe other two signals are digital (although you could read them with an ADC board if you added a pullup to each digital line. BP
|
|
|
Post by earlthesquirrel on Jul 2, 2020 17:56:38 GMT -8
Ok, finally found the volt meter that was hiding and dug up a 10k 1/4w resister.
The values I measured :
Compass — Resistance
0 — 43.3K 90 — 11.0K 180 — 13.93K 270 — 131.5K
I can’t see your table while I type this reply, but I’ll check as soon as I post. I verified the numbers 3 times. They were consistent.
|
|
|
Post by earlthesquirrel on Jul 2, 2020 18:03:39 GMT -8
For the new boards — wind vane/ anemometer RJ jack plugs In to RJ jack. The grove that shows wind vane /anemometer plugs into A0? on ADC board?
I2C grove on ADC board goes into I2C on raspberry pi grove hat ( does it matter which one? )
Where does grove from rain gauge go? How do I get anemometer readings?
Is there another board I’d need?
Thanks
|
|
|
Post by earlthesquirrel on Jul 2, 2020 18:37:02 GMT -8
After checking my numbers vs the table you provided it seems the expected resistance values aren’t matching ( to say the least )
So, is it possible to order just another weather vane? I could add in whatever other Grove board I need ( as per my other question ). I was hoping to get this sorted out over the long weekend but that seems unlikely 😕
|
|
|
Post by SDL on Jul 4, 2020 6:47:29 GMT -8
Have you looked at the WeatherRack specification? That is where the table came from.
It looks like you measured the total resistance (with the 10K ohm resistor in line) and with that it matches the table PERFECTLY! Just subtract 10K. Nothing wrong with your wind vane.
Hook up your Weather Vane to A0 of the ADC (with the I2C plugged into the Pi2Grover I2C port on your PI) and run the example software.
BP
|
|
|
Post by earlthesquirrel on Jul 5, 2020 12:32:29 GMT -8
Hmm, ok well at least "close" when you subtract 10K (I didn't realize you were expecting the values to be off by 10K) The 270 doesn't quite match (131.5 vs 120 -- -10K is 121.5 but close)
So, just hooked up the new boards and with Wind Driver tester, I am getting the correct values (FINALLY!) So wonder if it's the old ADC board? Not sure... (I did order another wind vane, but that is now just a spare part... not a problem)
For the anemometer, which line are you talking about adding a pullup to read the digital values? (and would there be any example code that would work with this?)
I would like to have wind vane and anemometer being read by this... (if I could also add rain gauge that would be a bonus)
FYI -- I tried putting the original board with the RJ Phone connectors and then connecting it to the ADC A0 (from Grove A Wind Vane) and I get bogus values. But the new RJ Phone connector board gives good values. Am I wiring this up incorrectly? ( On the old board, I know how to read the data for the anemometer...)
|
|
|
Post by earlthesquirrel on Jul 7, 2020 11:24:09 GMT -8
Any chance of getting the last questions answered? Need to know which wires I'd put the 10K pull up resistors on. Also, since this is the board I'm using now : 1) shop.switchdoc.com/collections/break-out-boards/products/weatherrack-interface-board-for-grove-pin-headers-rj11 vs. what I had originally: 2) shop.switchdoc.com/collections/weather/products/the-weather-board-w-grove-interface-board-for-weather-instruments-for-raspberry-pi-arduino I'd like to know what is really the differences here. I "thought" that these were very similar, but obviously not, since I get bogus info on #2 but good info on #1. But they are at least different based on at least this info... for #2 : The anemometer and rain bucket pins are pulled to VDD (3.3V or 5V) via a 10K Ohm pullup resistor.
But #1 in the link above says: This board is designed for connecting a SwitchDoc Labs WeatherRack (Anemometer/Wind Vane/Rain Bucket) to Raspberry Pi and Arduino systems. Includes pullups on the Anemometer and Rain Bucket. Analog Wind Vane signal has a pullup also to VDD.
Anemometer - Pullup 47K to VDD
Rain Bucket - Pullup 47K to VDD
WindVane - Pullup 10K to VDD
So, 10K vs 47K. And the WindVane isn't pulled up at all on #2?
As you can tell, it's still somewhat confusing to me what's going on and how I can get the Anemometer AND WindVane both working using just 1 board...
|
|
|
Post by SDL on Jul 8, 2020 6:21:12 GMT -8
You have me lost now. I'm confused.
The reason you read 10K Ohm off is where you measured the resistance. You read through the 10K Ohm resistor. That's OK.
Was it your old ADC? Which ADC were you using? The Adafruit one or the SDL one? Is the Adafruit one an ADC1015 or an ADC1115 (12 bit or 16 bit)?
The breakout board. It has a 10K Pullup resistor on board.
Looking at the spec for the WeatherBoard, the wind vane has a 10K pullup resistor.
BP
|
|
|
Post by earlthesquirrel on Jul 8, 2020 10:46:45 GMT -8
Ok, I had an older Weather board -- shop.switchdoc.com/collections/weather/products/the-weather-board-w-grove-interface-board-for-weather-instruments-for-raspberry-pi-arduinoThat produced bogus wind direction. That I had with the Adafruit ADC board connected to the header for it on the PCB. (with header) I got the newer board -- shop.switchdoc.com/collections/break-out-boards/products/weatherrack-interface-board-for-grove-pin-headers-rj11and a Grove ADC. That combination works (and produces the expected directions using latest code, at least for wind vane). Trying the old board with the new Grove ADC still gives bogus readings (last I checked)
According to your docs : (http://www.switchdoc.com/wp-content/uploads/2016/07/WeatherBoard_CurrentSpecification.pdf ) the old board :
The anemometer and rain bucket pins are pulled to VDD (3.3V or 5V) via a 10K Ohm pullup resistor. Whereas your new docs ( see h ttps://shop.switchdoc.com/collections/break-out-boards/products/weatherrack-interface-board-for-grove-pin-headers-rj11)
Say the new board has :
This board is designed for connecting a SwitchDoc Labs WeatherRack (Anemometer/Wind Vane/Rain Bucket) to Raspberry Pi and Arduino systems. Includes pullups on the Anemometer and Rain Bucket. Analog Wind Vane signal has a pullup also to VDD.
Anemometer - Pullup 47K to VDD
Rain Bucket - Pullup 47K to VDD
WindVane - Pullup 10K to VDD
So, based on this, the old board had 10K pullups on anemometer and rain bucket. New has 47K. Nothing is mentioned about a pull up for the WindVane on the old board.
My questions:
1) Is my reading correct? These two boards are rather different in terms of pullups?
2) If so, then how do I wire the WindVane AND Anemometer off the new board? Since they share a Grove connector, I don't see any way to get at the Digital line for it as I could on the old board. Do I need to build a Y cable or something?
3) The older code handled the Anemometer off the old board just fine. But wit the difference in pull ups, I'm not sure what code to use that will handle both WindVane and Anemometer.
4) If I get both wind sensors working, will the same code also work for adding the Rain Gauge? If so, I see the grove and I suspect I just have to plug it into one of the digital connectors on the Pi Hat and make sure pin number matches in code... correct?
Thanks in Advance!!
|
|
|
Post by SDL on Jul 8, 2020 15:41:46 GMT -8
|
|