Hello,
Here are some hints that can help you develop your SW for this.
SOH is the ratio of the current maxium capacity relative to the original battery pack capcity at its beginning of life.
In order to compute SOH, you need to be able to estimate the maximum capacity of the pack during a full discharge cycle, The orginal battery pack capcity being a constant known by the SW.
You can achieve this by using the Coulomb COunting function over a complete discharge cycle. You may need to apply some correction factor depending on the rate of discharge, though to have a more accurate estimation (high discharge current decreases the pack max capacity mainly due to the internal resistance of the pack/cells).
Another option is to measure the impedance of the cell which usually correlates very well with the SOH. This can be done cell by cell by using the synchronous cell voltage and current measurement of the MC33771 or MC33772. You can also use the average feature that is available on revC version to have a more accurate measurement. In this case, you also need to use the CC feature of the IC to be able to average the current measurement of the same period of time that the cell measurement is done. The way to do it is:
1. initialize the CC to zero
2. Start the cell measurement over 32 samples for example
3. When the conversion is complete (ADC_CFG.EOC_N = 0), read the CC
4. Compute the average current based on the CC value
5. Compute the cells impedance based on the cell voltage and the pack current value
Best regards,
Philippe