|
Post by earlthesquirrel on Jul 8, 2020 18:52:34 GMT -8
A few pictures are worth a few thousand words (and hopefully can help)
1)
From Weather board --> Grove cable from Grove Rain Gauge plug to Grove plug for top digital line.
2)
From Weather Board --> Grove cable from WindVane/Anemometer plug to A0 plug on ADC Grove board.
3) From ADC Grove Board --> Grove cable from I2C to PiHat I2C plug (bottom most one)
So, how do I get to Anemometer line in Grove connector for the combo WindVane/Anemometer? I know there is a 2nd line. PCB on ADC has A0, A1, A2, A3 and I2C. There are pin holes for A0, A1, A2, which is labeled "I2C" on website.
So I know we have Red (Power) Black (ground) and White and Yellow. One of those two is Wind Vane. One is Anemometer... One is fed into ADC and the posted to I2C bus. But I don't get how to get to the other line.
I don't have schematic for ADC board...so unclear to me how to get to which ever (yellow or white) line I need for Anemometer. Perhaps it's the A0 pin? (but if so that's not obvious at all.... and given there is just 1 pin per A(0-3) port, it is not clear to me how to get two wires out one pin :-) ... I was assuming both white and yellow lines from the grove were somehow feed into the ADC. But again, a guess without schematic.
|
|
|
Post by earlthesquirrel on Jul 9, 2020 16:21:21 GMT -8
Did that help? Hoping for a reply so I can get this all installed this weekend.... I just need to know about this last piece and then I can try to finish up the code.
Thanks in advance.
|
|
|
Post by SDL on Jul 13, 2020 12:56:31 GMT -8
Thanks for the pictures. Really helped. OK Rain Gauge is wired up right. I assume that works? The problem is with the Grove Anemometer and Wind Vane. The yellow wire (Pin 1) is the Digital Anemometer line. The white wire (pin 2) is the analog wind vane. Unfortunately, you can't just plug this into the ADC Port A0. It won't work the way you expect. Look at the specification for the ADC board. www.switchdoc.com/wp-content/uploads/2016/05/Grove4ChADC_CurrentSpecification.pdfA0 is a Grove Analog port. That means pin 1 (Yellow) is connected to channel 0 (A0) and pin 2 (white) is connected to channel 1 (A1). You can read your wind vane on channel 1. The problem is with the digital line plugged into channel 0. You can read a one or a zero from the ADC on channel 0, but you can't really hook it up to a level interrupt as we do with a digital input. Soooo, you will have to cut the yellow line, wire it up to another yellow line on another Grove cable and then plug that into a digital Grove port on the Pi2grover board. Then you can read it. Hope that helps. This add on board for the RJ11 was designed to plug into a Mini Pro LP that had a special port (D2/A1) on the board. BP
|
|
|
Post by earlthesquirrel on Jul 13, 2020 14:46:08 GMT -8
So, if I take the yellow wire insert out of the one end and put it by itself ( in the same position) in a grove connector, that’s all I would need to do? ( picture after I do it (
|
|
|
Post by earlthesquirrel on Jul 13, 2020 17:41:41 GMT -8
Ok got wire re-configured and got picture for you...
First, yes I have a rain gauge connected and working. However it's not the little grey one.... that one generated too many errors -- the wind moving the poll or moving the arm caused it to register rain, when in fact there wasn't any. After some digging, I found that NOAA requires 7 inch across (or so) for it to be an "official" rain gauge. So I found one a bit ago, and this past weekend took a piece of phone cord, soldered on a 4 pin male header and then could connect the ridiculously long cord from the new unit. (pictures of it with cover off attached here). According to the docs, it's 0.01 per tip. So found code in SDL_Pi_WeatherRack that was simple to modify for it. Then took the Wind code that I had pulled from SDL_Pi_WeatherBoard and combined the two.
So now I have something that handles WindDirection and Rain (BTW, got a level and shelf for rain gauge that are made for it ... should be here this week so I can install it after the painters come...they're coming to paint back screened in porch). Anyway...
So now to get Anemometer working. First picture here is the modified grove cable. Based on your description I'm hoping that will work as a solution based on what you described.
Next here is the rain gauge with cover off. If you look over to the left you'll see the silver phone cord that I attached the headers to as an "adapter". It plugs in to the RJ jack on the board and allows me to connect the gauge without modifying it (it came with a little "display"... by doing this I could still attach the display if I wanted...)
Here is the cover. You can see the logo, etc. as well. Same sort of mechanism as the grey one, just a LOT larger.
I've got the cable swapped and will let you know once I get some code pulled together...
Earl
|
|
|
Post by earlthesquirrel on Jul 13, 2020 18:46:49 GMT -8
Ok, so not 100% done, but I'm getting data out of all three sensors!
{"dateTime":1594694495, "rain":0.01, "windDirection":225.00, "windSpeed": 4.49,"windGust": 11.10 } {"dateTime":1594694500, "rain":0.00, "windDirection":225.00, "windSpeed": 4.79,"windGust": 7.33 } {"dateTime":1594694505, "rain":0.00, "windDirection":225.00, "windSpeed": 2.69,"windGust": 3.44 }
(I want the rain to reset after each message... I'm going to be feeding this info into a weewx setup... that will do the adding up in the different time windows)
One software question -- Could there be any interrupt conflicts between Rain and Anemometer? With by hand testing something I did on a test run caused windspeed to go to 0 and stick there... Rain was still working though... and so was wind direction...
Earl
|
|
|
Post by SDL on Jul 16, 2020 9:27:44 GMT -8
Earl,
Two separate interrupts. Loved the pictures of you working on your rain bucket. Wait until you see the new WeatherRack2 we are working on.
I'm not sure what you did on your hand testing, but it looks like our software is working. BTW, I don't like the windGust code, works perfectly on an Arduino, but it can be flaky on a Raspberry Pi, due to the Pi having a fully premeptive operating system. Oooooh. I like saying that. The Pi OS will get in the way.
I think it could be rewritten using pigpiod, but it's not on our update list.
BP
|
|
|
Post by earlthesquirrel on Aug 3, 2020 14:21:00 GMT -8
Thanks for all the updates... the system is up and we just had a fairly big storm. Got Wind, Wind Gust (whether or not they were the right values, it looked reasonable) and Rain. (a little over 2 inches). So FINALLY that part is up and operating.... (I'll post a picture tonight when I go take one after checking it out after first storm)
|
|
|
Post by earlthesquirrel on Aug 4, 2020 8:01:21 GMT -8
Here's a picture of the Wind Sensors mounted (the rain bucket isn't in the picture, but it's just mounted via the shelf on the outside railing, you can see part of stair railing in lower left corner... it comes to a flat area around the deck.. the rain bucket is in the far corner... as far away from house as it can be). The two antennas on the sides are for Flight Aware plane tracking...
|
|