Tool/software:
Hi Team,
How to calculate the current offset for BQ76907.
Method 1: -5A and -2A Current measurement
Current 1 = -5000mA
Raw Current 1 = -83940 (average of 30 reading)
Current 2 = -2000mA
Raw Current 2 = -30179
Curr Gain = 8192 * [(-5000)-(-2000)]/[(-83940)-(-30179)]
= 8192 * [-3000/-53761]
= 457.1
=> How to calculate the offset based on this 2 current reading?
Method 2: -5A and 0A Current measurement
Current 1 = -5000mA
Raw Current 1 = -83940
Current 2 = 0A
Raw Current 2 = 5500 (average of 30 reading)
Curr Gain = 8192 * [(-5000)-(0)]/[(-83940)-5500)]
= 8192 * [-5000/-89440]
= 457.9
Curr Offset = 5500
The current reading using this Gain and offset is not accurate. Register 0x3A reading for -5A will fluctuate between -5023mA to -5203mA?
During 0A, no discharge register 3A current reading will fluctuate from 10mA to -200mA
=> What causes this?
When CC1 gain and offset were set to the same value,
CC1 Gain = 457
CC1 offset = 5500
The CC1 current register, 0x3C current reading will fluctuate between, -164mA to -193mA at 0A.
Noise is reduce but seems like using the wrong offset value.
=> how to calculate the offset for cc1 current?
When both current and CC1 current gain to set to 32, the raw current, 0x36 readings changed to 2276 instead of 5500.
=> Why the raw current value will change when gain is changed?
Method 3: -5A and -2A Current measurement
Current 1 = -5000mA
CC1 current,0x3c = -341
Current 2 = -2000mA
CC1 current, 0x3c = -131
CC1 Gain = 32 x [(-5000) - (2000)]/[(-341) - (-131)] = 457
Stated in the TRM, to calculate the CC1 offset, set CC1 gain to 32 (cc1 current offset = 0) and read 0x3c CC1 current for 256 samples at 0A and 1A, i get CC1 current offset = 8.
=> why 1A and 0A condition i got the same cc1 offset value as 8?
In my firmware Setting,
CC1 current gain = 457
CC1 current offset = 8
running the code,
=> At 0A, CC1 current, 0x3c fluctuate between 114 to 128mA , why not 0mA?
=> At 1A, CC1 current, 0x3c fluctuate between -872, -885mA, why not 1A?
If i manually changed CC1 current offset,0x3c and current offset, 0x3a from 8 to 2300, the resulting CC1 current, 0x3c, will be close to our set value.
=> Seems our calibrated cc1 current offset(8) is wrong. how to calculate the CC1 current offset?
Looking forward to your quick reply.
Thanks.
Regards,Ferlyn