oresat / oresat-firmware

OreSat firmware based on ChibiOS for M0 and M4 microcontrollers
GNU General Public License v3.0
37 stars 13 forks source link

app_battery: MAX17205 isn't calculating the pack capacity correctly #101

Open andrewgreenberg opened 4 months ago

andrewgreenberg commented 4 months ago

On each OreSat battery card, we have two 2S1P battery packs. Each pack has it's own MAX17205 battery IC which measures voltage, current, and calculates the capacity of the pack it's on.

Voltage, current, and temperature are working just fine.

But for some reason, the capacity measurements (in amp-hours (Ah)) are just terribly off. It's mostly just stuck at either 50% or some very low number. The MAX17205 has two ways of calculating the capacity: by measuring current in and out of the battery, and by measuring the open cell voltage on the cells when it can. Neither method seems to be working correctly.

Some possible ideas: