|
Post by peterV on Oct 8, 2021 4:37:34 GMT -8
Hello I bought a suncontrol card, a Grove Base Hat (seeed) and use a Raspberry Pi Zero W. No LiPo yet, just installing an checking. Have the SC-boar with USB mini. power LED is red and Charge LED is green. I made an adaption is programs ... Pin_USBControlControl =27 and Pin_WatchDog_Done = 17,(instead of 21 and 13) since my Grovehat does not support pin
my problem is the testprogs gone error message and I seem to be blocked somehow. my question is: can anyone see what could be the cause of this problem.
sudo python testwatchdog gives: Traceback (most recent call last): File "testWatchDog.py", line 43, in <module> sunControl = SDL_Pi_SunControl.SDL_Pi_SunControl(WatchDog_Done=Pin_WatchDog_Done, WatchDog_Wake=Pin_WatchDog_Wake) File "/home/pi/SDL_Pi_SunControl/SDL_Pi_SunControl.py", line 75, in __init__ self._ina3221 = SDL_Pi_INA3221.SDL_Pi_INA3221(addr=self._INA3221Address) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 91, in __init__ self._write_register_little_endian(INA3221_REG_CONFIG, config) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 123, in _write_register_little_endian self._bus.write_word_data(self._addr, register, switchdata) IOError: [Errno 121] Remote I/O error
sudo python testSuncontrol.py gives: Traceback (most recent call last): File "testWatchDog.py", line 43, in <module> sunControl = SDL_Pi_SunControl.SDL_Pi_SunControl(WatchDog_Done=Pin_WatchDog_Done, WatchDog_Wake=Pin_WatchDog_Wake) File "/home/pi/SDL_Pi_SunControl/SDL_Pi_SunControl.py", line 75, in __init__ self._ina3221 = SDL_Pi_INA3221.SDL_Pi_INA3221(addr=self._INA3221Address) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 91, in __init__ self._write_register_little_endian(INA3221_REG_CONFIG, config) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 123, in _write_register_little_endian self._bus.write_word_data(self._addr, register, switchdata) IOError: [Errno 121] Remote I/O error
sudo python SDL_Pi_SunControl.py.....nothing special
sudo nano testSDL_Pi_INA3221.py gives: Traceback (most recent call last): File "testSDL_Pi_INA3221.py", line 30, in <module> ina3221 = SDL_Pi_INA3221.SDL_Pi_INA3221(addr=0x40) File "/home/pi/SDL_Pi_SunControl/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 91, in __init__ self._write_register_little_endian(INA3221_REG_CONFIG, config) File "/home/pi/SDL_Pi_SunControl/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 123, in _write_register_little_endian self._bus.write_word_data(self._addr, register, switchdata) IOError: [Errno 121] Remote I/O erro
pi@raspberrypi:~/SDL_Pi_SunControl/SDL_Pi_INA3221 $ sudo python SDL_Pi_INA3221.py:....nothing special
pi@raspberrypi:~/SDL_Pi_SunControl $ lsmod | grep i2c_ i2c_bcm2835 16384 0 i2c_dev 16384 0
pi@raspberrypi:~/SDL_Pi_SunControl $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- 08 -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- raspberrypi:/ $ sudo modprobe....nothing
please, can anyone give me a clue how to solve this problem? Thanks
|
|
|
Post by SDL on Oct 10, 2021 11:37:04 GMT -8
Looks like a wiring error to me. Thanks for showing the I2C detect. That helps a lot.
Could you post a picture of how you have SunControl wired in? Especially the I2C interfaces.
BP
|
|
|
Post by peterv on Oct 12, 2021 1:46:46 GMT -8
thx for your quick answer i thought the same so I tried to run gpiotest on the zero W( but first on a RB2b). I must also say I soldered the pins of the zero myself, not entirely smooth process! Bumped into this error on the RB2B: raspberrypi@raspberrypi initInitialise: bind to port 8888 failed (Address already in use) spent an afternoon looking for the origin of this, found some possible solutions that didn't work and finally, after some not entirely reproducible actions (trying to kill processes, trying to change adresses, etc) I did somehow change port 8888 (make it free) and managed to get GPIOtest working on the RP2B. everything OK there. Then when trying to do the same on the zero, discovered that my ssh was gone. tried all kinds of things to recover this (new ssh file in root etc) but no succes. I blame it on my fumbling with PID and processes, adress. PS: to get GPIO working and later port changed I followed this:https://github.com/joan2937/pigpio/issues/14 and this:https://raspberrypi.stackexchange.com/questions/69123/how-to-open-a-port Working without monitor, keyboard and ssh on a zeroW is not amusing. finally decided to make a new installation (from Buster to Lite) and restart at zero (0). But don't get Wifi working so far so now waiting for a HDMImini and USB mini adaptor to h I also attach a photo of my grove and Suncontrol connections. as I said before this Grove has no 13 and 21 (on D16 and D 26) so I changed the pin in the software to 17 and 27.   Hope you can find a needle in this messed up haystack. THX, Peter
|
|
|
Post by peterv on Oct 12, 2021 1:49:50 GMT -8
PS2: By the way I have no I2C things attached so far...just the Suncontrolboard.
|
|
|
Post by peterv on Oct 13, 2021 9:50:13 GMT -8
update hello Installed a fresh ima with Rasp Pi imager this time. got ssh and wifi back and succeeded in testing GPIO pins Testing... Write 1 to gpio 17 failed. Pull up on gpio 17 failed. Skipped non-user gpios: 0 1 28 29 30 31 Tested user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Failed user gpios: 1 One fails (17) and that is one I changed in the software. 13 for 17 and 21 for 27, because of my Grove-board) But still the testing gives errors. for instance: est SDL_Pi_INA3221 Version 1.0 - SwitchDoc Labs Sample uses 0x40 and SunAirPlus board INA3221 Will work with the INA3221 SwitchDoc Labs Breakout Board Program Started at:2021-10-13 18:31:55 Traceback (most recent call last): File "testSDL_Pi_INA3221.py", line 30, in <module> ina3221 = SDL_Pi_INA3221.SDL_Pi_INA3221(addr=0x40) File "/SDL_Pi_SunControl/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 91, in __init__ self._write_register_little_endian(INA3221_REG_CONFIG, config) File "/SDL_Pi_SunControl/SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 123, in _write_register_little_endian self._bus.write_word_data(self._addr, register, switchdata) IOError: [Errno 121] Remote I/O error I'am not sure what the pin adressment system is on Groveboard etc. is pin 16: * Physical/Board pin 36 * GPIO/BCM pin 16 * Wiring Pi pin 27 (according pinout.xyz/pinout/sdio)So I am also reluctant in marking other pin (s) in the software in fear of messing the Pi Zero up. Anyway....I don't see an explanation for the persisting problem...maybe someone has a tip? Thx Peter
|
|
|
Post by SDL on Oct 15, 2021 9:52:10 GMT -8
The error is from the fact that you haven't connected the I2C port. Send me a picture.
BP
|
|
|
Post by peterv on Oct 16, 2021 0:48:09 GMT -8
I connected grove I2C on Suncontrol board to one of the I2C ports on the Grove hat that sits itself on the pi zero. So this should make the I2C connection. pi@raspberrypi:~/SDL_Pi_SunControl $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- 08 -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- probably 08 shows the connection?  
|
|
|
Post by SDL on Oct 16, 2021 8:06:36 GMT -8
No, it should be 0x41 or 0x40 on Sun Control.
I'm not familiar with the hat you are using. That could be the problem.
Would you post a picture that shows the entire wire going from SunControl to your Pi so I can trace it?
BP
|
|
|
Post by peterv on Oct 16, 2021 9:58:50 GMT -8
Hi
yes, that’s what I see in the software….instead of 08
the complete assembly of the wires can be seen on the pictures in my first post a week ago. Or isn’t this sufficient.
grove board Suncontrol board
D16 to Watchdog D 26 to Grove Usb control I2C to Grove I2C
On grove board D16 (16,17,3V3,ground) Ye, wh, red, black) D26 (26,27,3V3,ground)
i changed in software the pin adressing from 13 and 21 to 17 and 27. afterwards noticed pin 17 on raspberry fails (with GPIOtest) Kind regards
|
|
|
Post by SDL on Oct 16, 2021 12:56:21 GMT -8
Unplug everything from the I2C bus and run this command:
sudo i2cdetect -y 1 and post the results.
I don't know what 0x08 is.
BP
|
|
|
Post by peterv on Oct 17, 2021 4:04:34 GMT -8
it looks like 08 is the grove hat. found a link of producer Grove board that states this. they state that: due to recent shortage in STM32F030F4P6TR-chip, they use now a MM32F031F6P6 tip.the dress of the first one is 0x04 and the dress of the second one is 0x08. Seems to me I have the new chip.strange enough the version date is from 2018...not quite recently.
unplugging only Grove I2C on Grove hat produces: pi@raspberrypi:~ $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- 08 -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
unplugging only Watchdog gives: the same
unplugging only Grove USBcontrol same
and unplugging all gives: pi@raspberrypi:~ $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- 08 -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
seems to me the grove board connects correctly to pi but the sun control doesn't connect to the Grovebord and Pi. I use a 5 V~2A Huaweicharger to power the Suncontrol. red light ..power good = on green ligt...chargegood=on Have no LiPo battery yet and no other things connected. the 5Volt switch is in position off. (direction to inside board)
three questions; 1. Should I leave SW1 - Turn 5V Voltage Booster in on or off position? 2 Should I power the Pi zero with USB-output on Suncontrolboard? 3. Should I try and change to a dress 0x41 in the software?
Hope to hear soon, Kind Regards
|
|
|
Post by SDL on Oct 17, 2021 8:55:51 GMT -8
WE don;'t know anything about that Grove Hat. We do know that previous products from Seeedstudio (GrovePi for example), screw with the bus on the Pi and cause all sorts of issues. That's why we have Pi2Grover which requires NO drivers and doesn't get in the way.
What is the Grove USBcontrol?
1) SW1 should be in the on position to power the I2C devices.
Make sure it is in the on position, plug in the I2C bus on SunControl and then re-run sudo i2cdetect -y 1.
2) Sure. that's the idea.
3) NO. It should show up on I2C detect. If you don't see it there, then addresses make no difference.
BP
|
|
|
Post by peterv on Oct 17, 2021 11:28:44 GMT -8
That's why we have Pi2Grover which requires NO drivers and doesn't get in the way. answer: is this Pi2 Grover for sale in Europe? Buying it from USA costs about $52 extra on shipping! I am flabbergasted that these Groveboard apparently aren't standardized by the way.
What is the Grove USBcontrol? answer: That is the name of the connection (near JP10) on the Suncontrolboard...you certainly must know that?
Make sure it is in the on position, plug in the I2C bus on SunControl and then re-run sudo i2cdetect -y 1. answer: same old song...only 08 shows up.
2) Sure. that's the idea. answer: trying to power the pi via the USB port on the Suncontrol doesn't work. No led, no startup of the pi. So I used the standard power supply of the raspberry in the minus of the Pi again to power up.
So, maybe I should forget using Grove and use Dupont connectors and GPIO/BCM pins. 1. Could you tell me what pins I should connect with the Grovepins on the SCboard? However pin 17 seems to be out of function on my Pi. 2. Or Is there another possibility to solve this puzzle?
Kind regards peter
|
|
|
Post by SDL on Oct 17, 2021 11:55:54 GMT -8
1) Understand the shipping problem of small things to Europe from our website. Bug in the system from Shopify and we are waiting for a resolution. Should less than $10.
Some parts are standardized, such as the plugs and the wiring. But the use of hats is not and it is all over the map. That is why we developed the Pi2Grover board.
2) Oh, I thought you were talking about another board and not a plug. When you do the I2C test, don't have anything else plugged into the hat or SunControl.
3) Please send me a picture of the entire system for the I2C test powered up. I want to see the wiring, the switches and the LEDs. Remember, I can't see what you see.
4) Do you have a battery plugged into SunControl? you need to have a LiPo battery in the system. It won't power a PI unless you do.
I don't think this is a Grove problem. If you don't have a battery plugged in, this could explain everything.
BP
|
|
|
Post by peterv on Oct 18, 2021 12:19:46 GMT -8
1. So I’ll wait for the solution. Will it be resolved this week?. 2. But with nothing plugged in suncontrol, how is info from Suncontrol possible? At least i need connection to groveboard? Anyway, just the groveboard on to of pi and noting else gives: pi@raspberrypi:~ $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- 08 -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- I’ll start by buying a Lipo. But still would like to know a working connection with dupont female to grove connections to from pi to suncontrol Would this simply be: Suncontrol Pizero I2Cgrove Ground Ground 3V3 3V3 White Pin 27 SDA ID SD Yellow Pin 28 SCL ID SC Watchdog 16 GPIO16 = pin 36 13 GPIO13 = pin 33 3V3 Pin ground) Pin Grove UsBcontrol 26 GPIO 26 21 GPIO 21 3V3 3V3 ground) Ground I use this layout, sadly enough there are numurous versions of layout.: www.google.nl/url?sa=i&url=https%3A%2F%2Fwww.hackster.io%2FVishalsoniindia%2Fsmallest-cpu-using-raspberry-pi-zero-w-raspberrypi-imager-bbabed&psig=AOvVaw2MwfaV3vAhDlxNa0JS92ia&ust=1634672266597000&source=images&cd=vfe&ved=0CAsQjRxqFwoTCMjChfDa1PMCFQAAAAAdAAAAABBiKR PeterV
|
|