doug
New Member
Superannuated but still learning and making
Posts: 9
Raspberry Pi: Yes
|
Post by doug on Jan 2, 2018 18:33:05 GMT -8
I have a PiZeroW it has two I2C devices running currently. They work fine. I copied the RPi_AS3935 code over and ran your test script but it can't see the board. The LED on the board is lit but SMBus sees nothing on bus 1 at address 0x02 or 0x03 I tried SMBus directly looking with your line of code read_i2c_block_data(0x02, 0x00) and it errors on IO SMBus does see my A1332 chip using the same line of code.
Doug
|
|
|
Post by SDL on Jan 5, 2018 15:11:09 GMT -8
Doug,
Do you have another Raspberry Pi you could test it on? Are you using a Pi2Grover board? How are you connecting the board?
BP
|
|
doug
New Member
Superannuated but still learning and making
Posts: 9
Raspberry Pi: Yes
|
Post by doug on Jan 6, 2018 10:56:07 GMT -8
Editing...
I just tried it in an RPi3 and the board was seen. (added note: the Pi3 also has a BME280 connected) This is curious, the connection to I2C is exactly the same with the same sort of I2C buffer board But it was not seen on the PiZeroW.
I have another PiZeroW still unboxed and may try that but would first like to hear if you have tried it on a PiZeroW with success. =========new edit========== I just tried it on another PizeroW with no joy. It seems it might be fine with a Raspberry Pi 3 but something in the make-up of a Raspberry Pi Zero W will not recognize the 0x02 address that this board uses. I will try and find out more, could you please let me know if you find out anything about this.
This is not (IMO) a deal breaker for the Thunder Board. It seems to work fine with the RPi3 and I will be a happy funding supporter with that. Besides, we don't get enough lightning on Puget sound to be that big a thing <laugh>
I do hope I can get it to work on the Zero as that is the basis for my weather station. The weather station will when complete have a BME280 temp,baro,humidity, an A1332 for wind direction, one MCP23017 for an anemometer and another for a tipping bucket rain gauge, a luminosity sensor and a UV sensor. And of course any other environmental sensor I feel would add to it.
=====================previous part of post==================== I will try it on another to be sure. I do not have a Pi2Grover. It is wired to the I2C bus as are the other I2C devices the Pi is reading. On the bus currently besides the Thunder Board, there is an I2C MCP23017 at address 0x23 and an A1332 Hall effect device on address 0x0c.
In order to rule out any fault in the connection, I connected a BME280 to the same cable the Thunder board was tested on and it worked fine, reconnected the Thunder Board and no joy. I haven't gone looking for a schematic for the Thunder Board, is one available?
Is there some reason it would not work with other I2C devices or on one RPi I2C bus and not another?
|
|
|
Post by SDL on Jan 8, 2018 6:04:19 GMT -8
Doug,
We have seen issues with the RPi Zero in the past with these devices (not just our board - other AS3935 boards too), but we felt we had fixed it. It's some kind of a timing thing I would guess.
I don't have a RPI Zero here right now, but we will get one ordered immediately.
BP
|
|
doug
New Member
Superannuated but still learning and making
Posts: 9
Raspberry Pi: Yes
|
Post by doug on Jan 8, 2018 13:27:33 GMT -8
Since I retired, I no longer have all the lab equipment available to me. I do have one of those cheap digital oscilloscopes and it sees the timing of the other I2C devices. However I am new to I2C and you would probably run circles around me in testing. I think you have my email, could I ask you to please email me if you find a solution? Like I said, this in no way affects my satisfaction in the funding. I think you have created a fine device and hope you keep up the work. Doug Wyman Post Script: The weather station I have designed and am refining is in no way a competitor to yours.
|
|
|
Post by SDL on Jan 9, 2018 8:59:59 GMT -8
What a class setup! I'm very impressed
I just found a Raspberry Pi Zero in my drawer ( just after I ordered another one, of course) and so I will hook it up this afternoon and figure out what is going on.
I'll drop and email to you and add the results here too!
BP
|
|
doug
New Member
Superannuated but still learning and making
Posts: 9
Raspberry Pi: Yes
|
Post by doug on Jan 9, 2018 19:13:39 GMT -8
I only have PiZeroW devices and I understand there are some differences. I have an A+ somewhere if you want me to see if it is discovered by it. I wish I had spotted your fused quartz windows before I ordered from off-shore. Not that everything doesn't come from off-shore. Oh, the photo, I think I will make the Anemometer on mine a separate module as yours is. Same PVC and brass design just put the weather vane on another arm. This is all for our new home we are building on Hidden Ridge. Doug (rambling on old man)
|
|
doug
New Member
Superannuated but still learning and making
Posts: 9
Raspberry Pi: Yes
|
Post by doug on Jan 10, 2018 15:12:50 GMT -8
I found this: "The Broadcomm BCM2835, which is used on the Raspberry Pi, has a serious bug in its I2C implementation, which can (a) prevent I2C communication with some devices and (b) lead to data corruption (both in read and write direction). As a result, do not use I2C-devices which use clock-stretching directly with the Raspberry Pi directly or any other Broadcomm BCM2835-based device." www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.htmland on the AS3935 datasheet I found "To transfer bytes from consecutive addresses, SPI master has to keep the CS signal low and the SCLK clock has to be active as long as data need to be read." Yes, this the SPI master the data sheet talks about but I wonder if it also does clock stretching on the I2C
|
|
doug
New Member
Superannuated but still learning and making
Posts: 9
Raspberry Pi: Yes
|
Post by doug on Jan 11, 2018 14:09:36 GMT -8
I found my Raspberry Pi model A Plus and it sees the Thunder Board just fine. And it also seems to use the BMC-2835 so that article might be a wild goose chase to follow.
|
|
|
Post by SDL on Jan 12, 2018 6:37:58 GMT -8
I'll have to get to the bottom of this. I've got my Pi Zero all ready to plug the Pi2Grover board into it and test it. Should be this afternoon. BP Attachments:
|
|
doug
New Member
Superannuated but still learning and making
Posts: 9
Raspberry Pi: Yes
|
Post by doug on Jan 13, 2018 12:01:01 GMT -8
Looking at the board, it looks like a PiZero not a Pi Zero W if it has built in WiFi it is a w. As I said, I have only tried it on the PiZeroW. If you are unable to get one, I have one I can send to you.
|
|
|
Post by SDL on Jan 14, 2018 12:46:26 GMT -8
No problem. We have both now. But thank you very much! Will be testing on Monday.
Best regard, BP
|
|
doug
New Member
Superannuated but still learning and making
Posts: 9
Raspberry Pi: Yes
|
Post by doug on Jan 14, 2018 16:20:27 GMT -8
I have been experiencing other unusual (I2C communication?) problems with other sensors. They will work fine individually but as the buss is populated, some stop working and others get erratic. Now this is using the QIIC buss connections from Sparkfun and I have a lot of my spare funds invested in using it but may have to change.
One large problem is size. The weather station has little room.
I think the problems I am seeing are due to either voltage drop or pull-down problems on the data and/or clock lines.
I am going to breadboard up a buffer fan-out with some I2C buffers I have. This will also allow me to give closer examination to your board with my scope (cheap as it is)
I was so spoiled by my career. Faraday shielded testing labs and an environmental testing chamber Scopes capable of amazing resolution capable of producing court admissable evidence.
I hope you have all the toys that make life enjoyable and the funding to make it possible. It's all about the budget and the cost benefit analysis.
|
|
|
Post by doxidad on Jan 15, 2018 5:17:51 GMT -8
Just to confirm the observation. My thunderboard is not seen on my Raspberry Pi Zero W running GroveWeatherPi or the thunderboard test program.
I moved it to a Pi 3 and it is recognized. Was hoping to use the pi zero. Oh well.
I seem to have 3 different variants of the Pi Zero. I can test on the other 2 to see if this is a Pi Zero problem or just specific to the Pi Zero W.
I'll post the results when I get a chance to test them.
|
|
|
Post by SDL on Jan 16, 2018 8:50:52 GMT -8
Thank you! Now, the hard part is figuring out why. I need to get down the logic analyzer and hook it up to the Raspberry Pi Zero and the Lightning Board.
BP
|
|