Hi,
using s3k144 Board want calculate the SOC for 6AH Battery .but i am getting Coulomb Count measurement result as 2136050216.
and calculated the I_AVG using the formula below.
#define BCC_GET_COULOMB_CNT(coulombCnt1, coulombCnt2) \
((int32_t)(((uint32_t)((coulombCnt1) & BCC_R_COULOMB_CNT_MSB_MASK) << 0xFU) | \
(((uint32_t)(coulombCnt2) & BCC_R_COULOMB_CNT_LSB_MASK)))
rawVal = (int32_t)BCC_GET_COULOMB_CNT(measurements[BCC_MSR_COULOMB_CNT1],
measurements[BCC_MSR_COULOMB_CNT2]);
I_AVG = (rawVal - COULOMB_CNT_old)/(measurements[BCC_MSR_CC_NB_SAMPLES] -CC_NB_SAMPLES_old); // this is average current
COULOMB_CNT_old = rawVal;
CC_NB_SAMPLES_old =measurements[BCC_MSR_CC_NB_SAMPLES];
or
I_AVG = rawVal/measurements[BCC_MSR_CC_NB_SAMPLES] ;
test results as follows
###############################################
| Cell 1 Voltage | 3322 mV |
| Cell 2 Voltage | 3322 mV |
| Cell 3 Voltage | 3322 mV |
| Cell 4 Voltage | 3347 mV |
| Cell 5 Voltage | 3286 mV |
| Cell 6 Voltage | 3314 mV |
| Cell 7 Voltage | 3323 mV |
| Cell 8 Voltage | 3315 mV |
| Cell 9 Voltage | 3317 mV |
| Cell 10 Voltage | 3317 mV |
| Cell 11 Voltage | 3317 mV |
| Cell 12 Voltage | 3122 mV |
| Coulomb Count | 2131001874|
| CC Samples | 31553 |
| I_AVG | 67537 |
| Current | -50 mA |
| StackVoltage | 39584 mV |
| Temperature | 25 degC |
###############################################
1. 6 Ah = 6*3600 = 21600 Coulombs = 100% SOC
2. So 1% SOC = 21600/100 = 216 Coulombs
But when i measure CC i am getting as 67537 coulombs for 6Ah battery unable to calculate the correct SOC.
Please support this issue to solve how to calculate exact values.