Other Parts Discussed in Thread: BQSTUDIO
Hello;
I never received answers to these question...I pasted the links and hope they work.
I need these resolved.
Thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello;
I never received answers to these question...I pasted the links and hope they work.
I need these resolved.
Thanks
#1: Board Offset: This is not designed to calibrate a large offset like 49mA (or even 12mA). Note the units in the Calibration Class for Board Offset: it's [Num], not [mAh]. What this means is that the gauge stores this in units of raw coulomb count (from the ADC). This ADC returns a signed integer, which corresponds to the accumulated charge over 1 second and can be converted to mAs with a scaling factor (based on the CC_Gain parameter). Because it's a defined 1s measurement period, it's then also possible to calculate a current, with this current is also being affected by the scaling factor, while Board Offset is in units of raw coulomb count.
Board Offset (just like CC Offset) is a signed 8-bit integer, hence its range is limited to -128 to +127 units of raw coulomb count. The offset calibration routine will add up the raw coulomb data over 16 seconds and store this in Board Offset. If you apply 49mA, then, depending on the sense resistor, this will result in a number that is 16 * current/gain (=raw coulomb count). The default gain is 0.47095 so this would be 16 * 49 / 0.47095 = 1665, so way exceeding the 8 bit signed integer space so this won't work.
--> You can't calibrate 48mA current with Board Offset. This is not a bug, it's just not within the capabilities of the gauge. The board offset is intended to calibrate a slight offset that exists because of a problem on the board that adds a tiny voltage to the measurement over the sense resistor. It's not intended to subtract a significant current.
#2: The Voltage Divider parameter is the inverse of the scaling factor that is necessary to convert the max. stack voltage to 900mV.
With Voltage Divider = 1000 * Vmax [mV] / 900mV.
For example, for 1s, using the internal divider, the max. stack voltage is 4500mV. Hence the Voltage Divider is 1000 * 4500mV / 900mV = 5000.
For a max. stack voltage of 62000mV, this would be 1000 * 62000mV / 900mV = 68889, which exceeds max. unsigned int16 (65535), hence bqStudio throws an error.
The TRM has the language: "The nominal value for this parameter is the maximum expected value for the stack voltage. The calibration routine adjusts the value to force the reported voltage to equal the actual applied voltage."
Key word being "nominal", with the calibration process modifying this accordingly. That will work all the way up to a max. stack voltage of 65535*0.9V = 58981mV but not 62000mV. So this isn't a bug either but the TRM could be a bit clearer.