Post by sprucecurrent on Dec 10, 2017 15:28:52 GMT -8
Hello,
I've wired a SunControl board with 100mA PV and 2500mAh LiPo battery to a Raspberry Pi. The board is powered with the usb plug and successfully charged the LiPo battery. The wiring to the pi is as follows:
SCL I2C1_SCL (GPIO/5) Grove I2C Plug (Pin 1 Yellow)
SDA I2C1_SDA (GPIO/3) Grove I2C Plug (Pin 2 White)
Power 3.3V (GPIO/1) Grove I2C Plug (Pin 3 Red)
GND GND (GPIO/6) Grove I2C Plug (Pin 4 Black)
USB CONTROL (Optional) GPIO 21 (GPIO/12) Grove USB Control Plug (Pin 1Yellow)
USB ENABLE (Optional) GPIO 26 Grove USB Control Plug (Pin 2 White)
GND GND (GPIO/9) Grove USB Control Plug (Pin 4 Black)
(Since the Grove USB Control has 4 pins I applied the red wire to Power 3.3V (GPIO/1) (Pin 3 Red)
sudo i2cdetect -y 1
yields
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
So this may be my problem, that the raspi does not see any i2c devices. I followed the adafruit configuring i2c tutorial. I tried to connect the Grove i2c by it self and the raspi didn't detect it either.
When I run sudo python testSunControl I get:
Test SDL_Pi_SunControl Version 1.0 - SwitchDoc Labs
Program Started at:2017-12-10 18:07:42
Traceback (most recent call last):
File "testSunControl.py", line 45, in <module>
sunControl = SDL_Pi_SunControl.SDL_Pi_SunControl(INA3221Address=INA3221Addresble=Pin_USBControlEnable, USBControlControl=Pin_USBControlControl, WatchDog_Done one, WatchDog_Wake=Pin_WatchDog_Wake)
File "/home/openhabian/SDL_Pi_SunControl/SDL_Pi_SunControl.py", line 73, in __i
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_
self._bus.write_word_data(self._addr, register, switchdata)
IOError: [Errno 121] Remote I/O error
Any help in pointing me in the right direction would be appreciated.
Thanks much,
I've wired a SunControl board with 100mA PV and 2500mAh LiPo battery to a Raspberry Pi. The board is powered with the usb plug and successfully charged the LiPo battery. The wiring to the pi is as follows:
SCL I2C1_SCL (GPIO/5) Grove I2C Plug (Pin 1 Yellow)
SDA I2C1_SDA (GPIO/3) Grove I2C Plug (Pin 2 White)
Power 3.3V (GPIO/1) Grove I2C Plug (Pin 3 Red)
GND GND (GPIO/6) Grove I2C Plug (Pin 4 Black)
USB CONTROL (Optional) GPIO 21 (GPIO/12) Grove USB Control Plug (Pin 1Yellow)
USB ENABLE (Optional) GPIO 26 Grove USB Control Plug (Pin 2 White)
GND GND (GPIO/9) Grove USB Control Plug (Pin 4 Black)
(Since the Grove USB Control has 4 pins I applied the red wire to Power 3.3V (GPIO/1) (Pin 3 Red)
sudo i2cdetect -y 1
yields
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
So this may be my problem, that the raspi does not see any i2c devices. I followed the adafruit configuring i2c tutorial. I tried to connect the Grove i2c by it self and the raspi didn't detect it either.
When I run sudo python testSunControl I get:
Test SDL_Pi_SunControl Version 1.0 - SwitchDoc Labs
Program Started at:2017-12-10 18:07:42
Traceback (most recent call last):
File "testSunControl.py", line 45, in <module>
sunControl = SDL_Pi_SunControl.SDL_Pi_SunControl(INA3221Address=INA3221Addresble=Pin_USBControlEnable, USBControlControl=Pin_USBControlControl, WatchDog_Done one, WatchDog_Wake=Pin_WatchDog_Wake)
File "/home/openhabian/SDL_Pi_SunControl/SDL_Pi_SunControl.py", line 73, in __i
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_
self._bus.write_word_data(self._addr, register, switchdata)
IOError: [Errno 121] Remote I/O error
Any help in pointing me in the right direction would be appreciated.
Thanks much,