Getting Particle Battery Diagnostics

We make use of the MAX17043 fuel gauge chip, but not the corresponding BQ24195 battery charge chip in some of our applications, so the device vitals do report our SoC. Is there a way to set the SoC vital from our application code? I was looking thru the PowerManager class in the system_power_manager.cpp file in the device os and it seems to use system_notify_event() to update the battery/power source states, but I couldn’t find where SoC gets updated, nor could I compile my code with the system_notify_event function. (There are some cases where I would like to set the power source/battery state in user firmware)

Is it possible to update the SoC device vital without the battery charge chip?

It looks like the answer is no. This function is what Device Diagnostics calls to find the battery SoC. Since it first checks the battery state (as mostly determined by the PMIC), I suspect that if you don’t have the PMIC the state is probably unknown, and the function returns before checking the fuel gauge.

This obviously isn’t ideal, but there is a feature request to make this more generic, in particular to allow other fuel gauge chips than the MAX17043, which would also likely provide a way to use a non-standard configuration (fuel gauge without PMIC, for example).

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.