I am using a Raspberry PI - B+, although my question is generic to any micro-controller board out there like Arduino. I have a BQ27441EVM-G1B, and I want to communicate with it with my own program, and not the bqStudio. I have got it working with a EV2400 and bqStudio and I can see the reqd voltage and temp values inside bqStudio. Now I want my program to access them.
1. Is there any library for accessing the gauge registers ? I saw one here https://android.googlesource.com/kernel/tegra/+/b445e5296764d18861a6450f6851f25b9ca59dee/drivers/power/bq27441_battery.c
but I dont know if its for general use.
2. Also, I am not able to detect the I2C device on my RPi. For that I am trying the standard command "sudo i2cdetect -y 1" . This outputs a table, and tells the address on which our I2C device is connected. For our gauge, this address should be 0xAA (if we consider 8-bit addressing, although the table only goes to 0x7F, considering 7-bit addressing, the address should be 0x55), but I see the whole table as blank. This command and this I2C bus works as I was getting the correct address and functionality with the BQ-24261 charger (which has a address of 0x6B).
I am not writing any C code yet, as I think it should first be detected and then code should be tried. In either case, a small code sample to test could be great.
My connections are as under:
Gauge -----> Raspberry Pi
VSS Pin 4 (5V)
SCL Pin 5 (SCL1)
SDA Pin 3 (SDA1)
VOUT Pin 6 (GND)
The pin-out diagram for the RPi is attached for your reference. I have tried "detecting" with and without the VSS pin connected to 5V, but to no avail. I am not connecting any pull-up resistors, as I believe there are some in the board.
3. Do I need to make some configurations from inside bqStudio before trying to access this device using a micro-controller ?
Thanks and Regards,