Other Parts Discussed in Thread: SYSCONFIG, INA236
Tool/software:
Hello, I'm an electronics newbie, trying to get INA228 working on my first custom board. My goal is to measure a 12V automotive battery voltage (VBUS) and current (VShunt, mV reading across a shunt resistor, IN+ to IN-)
I'm using the Arduino INA228 library by Rob Tillart to communicate over i2c. The VBUS register is reading as expected, but VSHUNT register is alternating between 0 and 0.33V when I have IN+ and IN- shorted together for debugging. The 0.33V is actually 0.32768V, a number which might give a hint.
The function being used to read register address 4h is as follows:
float INA228::getShuntVoltage()
{
uint32_t value = _readRegister(INA228_SHUNT_VOLTAGE, 3);
value >>= 4;
}
I have not changed any default values in software, and the board layout looks similar to examples.
I am looking for tips on next steps for debugging. I am not 100% certain that the library I'm using actually works, because there is a note about it being un-tested on Github.
Any advice is appreciated, thank you!