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.

BQ27741-G1: Gauge is not tracking battery capacity correctly

Part Number: BQ27741-G1
Other Parts Discussed in Thread: BQSTUDIO, GPCCHEM, BQ24295, BQ27426

Tool/software:

I am trying to get the bq27741-G1 gauge working with a Honcell Li-ion Polymer 5200mAh battery.  I have ported the bq27x00 linux driver to the 335x 3.2 kernel and can read the gauge from Android just fine.  However, the gauge is not tracking the battery capacity correctly, and is behaving strangely.

We setup a charge-discharge cycle and tracked the gauges values during it.  Strangely during the charge cycle, the gauge thinks it hits full 5200mAh super early, and after that point, the charge_now stops increasing and the charge_full parameter starts increasing. I'm not sure why the gauge would decide to increase the charge_full and not also the charge_now...  Not to mention that its not a 10,000 mAh battery.

Also odd, during discharge the charge percentage dropped from 30% to 0%, even though the reported charge_now still had plenty of mAh left.

https://docs.google.com/spreadsheets/d/1huvOK4QCPwcxbDyibm2bQVjTazWd1aJs2AXCHgr5Gr8/edit?usp=sharing

The kernel driver on probe, checks if the gauges design capacity is set to the default 1000mAh and if it is, programs the gauge with the following values.  Let me know if you see any obvious mistakes or if I've missed a register I really need to set.

#define CHEM_ID_VALUE 	100 // - default
#define DESIGN_CAP		5200

static struct dm_reg bq277xx_dm_regs[] = {
	{48, 06, 2, 3700},		/* Design Voltage */
	{48, 19, 2, 4860},		/* CC Threshold = 0.9 * Design Cap */
	{48, 23, 2, DESIGN_CAP},/* Design Capacity */
	{48, 25, 2, 19240},		/* Design Energy = Design Cap * 3.6V */
	{48, 44, 1, 1},			/* Design Energy Scale */

	{49,  0, 2, 520},		/* SOC1 Set Threshold */
	{49,  2, 2, 780},		/* SOC1 Clear Threshold*/
	{49,  4, 2, 104},		/* SOC2 Set Threshold */
	{49,  6, 2, 260},		/* SOC2 Clear Threshold */

	{64,  0, 2, 0x0171},	/* Pack Configuration */
	{64,  2, 1, 0xa7},		/* Pack Configuration B */
	{64,  3, 1, 0x98},		/* Pack Configuration C */
	
	{68,  2, 2, 15},		/* Power Sleep Current */

	{80, 0, 1, 0x01},		/* Load Select - Default. Present average discharge current: This is the average discharge current from the beginning of this discharge cycle until present time. */
	{80, 1, 1, 0x01},		/* Load Mode - Default Constanst Power -  */
	{80, 67, 2, 3200},	    /* Terminate Voltage */

	{82, 0, 2, DESIGN_CAP},			/* Qmax */

	{83, 0, 2, CHEM_ID_VALUE},	/* Chem ID */
};

  • Hello Jonathan,

    Can you explain what each column of the log file represents in terms of the register name from the gauge. I am unfamiliar with the naming convention you used (like charge_now and capacity_level).

    Also, about the problem where the SOC dropped from 30% to 0% please read over this document. https://www.ti.com/lit/an/sluaa45/sluaa45.pdf

    Regards,

    Nick Richards

  • The naming conventions come from the kernel's battery gauge subsystem.

    voltage_now - VOLT
    current_now - AI
    capacity - SOC
    capacity_level - Set based on flags FC, SOC1, SOCF
    charge_now - NAC
    charge_full - FCC
    charge_design_full - DCAP
    health - Set based on flags SOCF, OVERHEAT

    Also, about the problem where the SOC dropped from 30% to 0% please read over this document. https://www.ti.com/lit/an/sluaa45/sluaa45.pdf

    From the document:

    > But gauge is forced to report SOC=0% once the voltage hits the EDV, causing a 40% drop of reported SOC at the EDV.

    Note that we are running our test at room temperature and when the SOC drops to 0% we are around 3.6V so there is still a lot of distance to the 3.2V EDV.

  • Hey Jonathan,

    Are you able to share you gg file or configuration file for all of data memory. I will need to review it to see what the root cause is.

    Regards,

    Nick Richards

  • Thanks Nick.

    I found this debug code in the kernel driver. While I figure out how to call it, can you confirm if this will dump all the info you'd need?

    static void dump_rom_gauge_dm(struct bq27x00_device_info *di)
    {
    	// int i;
    	u8 buf[32];
    
    //	dev_err(di->dev, "%s()\n", __func__);
    
    	if (di->chip != BQ277XX) // Only tested on the BQ27741
    		return;
    
    	if (is_it_sealed(di))	
    	{
    		if (!unseal(di, BQ277XX_UNSEAL_KEY)) 
    			dev_dbg(di->dev, "%s: couldn't unsea!\n", __FUNCTION__);
    //		dev_err(di->dev, "%s: Unable to dump flash configuration data\n", __func__);
    		return;
    	}
    
    	/* Now lets dump the battery data  */
    
    	dev_err(di->dev, "%s:Sub Class 2 -\n", __func__);
    	read_dm_block(di, 2, 0, buf);
    	print_buf(di, __func__, buf);		
    
    	dev_err(di->dev, "%s:Sub Class 34 -\n", __func__);
    	read_dm_block(di, 34, 0, buf);
    	print_buf(di, __func__, buf);		
    
    	dev_err(di->dev, "%s:Sub Class 36 -\n", __func__);
    	read_dm_block(di, 36, 0, buf);
    	print_buf(di, __func__, buf);		
    
    	dev_err(di->dev, "%s:Sub Class 48 -\n", __func__);	// This one needs a second buffer
    	read_dm_block(di, 48, 0, buf);
    	print_buf(di, __func__, buf);		
    
    	dev_err(di->dev, "%s:Sub Class 49 -\n", __func__);
    	read_dm_block(di, 49, 0, buf);
    	print_buf(di, __func__, buf);		
    
    	dev_err(di->dev, "%s:Sub Class 56 -\n", __func__);
    	read_dm_block(di, 56, 0, buf);
    	print_buf(di, __func__, buf);		
    
    	dev_err(di->dev, "%s:Sub Class 57 -\n", __func__);
    	read_dm_block(di, 57, 0, buf);
    	print_buf(di, __func__, buf);		
    
    	dev_err(di->dev, "%s:Sub Class 58 -\n", __func__);
    	read_dm_block(di, 58, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 59 -\n", __func__);
    	read_dm_block(di, 59, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 60 -\n", __func__);
    	read_dm_block(di, 60, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 64 -\n", __func__);
    	read_dm_block(di, 64, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 68 -\n", __func__);
    	read_dm_block(di, 68, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 80 -\n", __func__);	// This requires 4 buffers
    	read_dm_block(di, 80, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 81 -\n", __func__);
    	read_dm_block(di, 81, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 82 -\n", __func__);
    	read_dm_block(di, 82, 0, buf);
    	print_buf(di, __func__, buf);
    
    	dev_err(di->dev, "%s:Sub Class 83 -\n", __func__);
    	read_dm_block(di, 83, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 88 -\n", __func__);
    	read_dm_block(di, 88, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 89 -\n", __func__);
    	read_dm_block(di, 89, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 104 -\n", __func__);
    	read_dm_block(di, 104, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 107 -\n", __func__);
    	read_dm_block(di, 107, 0, buf);
    	print_buf(di, __func__, buf);	
    
    	dev_err(di->dev, "%s:Sub Class 112 -\n", __func__);
    	read_dm_block(di, 112, 0, buf);
    	print_buf(di, __func__, buf);
    
    	seal(di);
    }

  • Hey Jonathan,

    I am not too familiar with the commands used in that script. However, based on the function name, it should output the relevant information I need.

    Regards,

    Nick Richards

  • Do the different subclasses it's dumping mean anything to you?  It seems to be skipping some so I wasn't sure if that was important or not.

  • Yes, I am able to correlate the Sub class number with the sub class ID on BQStudio.

    Regards,

    Nick Richards

  • dump.txt
     rom_mode_gauge_dm_initialized: Chem_Id - 100, Design Cap - 5200
     dump_rom_gauge_dm()
     is_it_sealed: ret - 0000400c
     dump_rom_gauge_dm:Sub Class 2 -
     read_dm_block: subclass 2 offset 0
     bq: dump_rom_gauge_dm buf: 
     02 26 05 01 f4 02 58 05 02 26 02 58 03 02 26 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 34 -
     read_dm_block: subclass 34 offset 0
     bq: dump_rom_gauge_dm buf: 
     10 68 ff ce 02 26 00 00 00 00 00 00 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 36 -
     read_dm_block: subclass 36 offset 0
     bq: dump_rom_gauge_dm buf: 
     00 64 00 19 00 64 28 63 5f ff 62 00 32 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 48 -
     read_dm_block: subclass 48 offset 0
     bq: dump_rom_gauge_dm buf: 
     00 64 01 b0 00 0a 0e 74 f6 fe 0c 00 31 00 00 00 
     01 00 30 12 fc 5a 64 14 50 4b 28 fe 70 50 78 78 
     dump_rom_gauge_dm:Sub Class 49 -
     read_dm_block: subclass 49 offset 0
     bq: dump_rom_gauge_dm buf: 
     02 08 03 0c 00 68 01 04 32 09 c4 02 0a 28 11 94 
     02 11 30 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 56 -
     read_dm_block: subclass 56 offset 0
     bq: dump_rom_gauge_dm buf: 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 57 -
     read_dm_block: subclass 57 offset 0
     bq: dump_rom_gauge_dm buf: 
     09 00 bc cb 10 e4 00 00 04 12 00 00 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 58 -
     read_dm_block: subclass 58 offset 0
     bq: dump_rom_gauge_dm buf: 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 59 -
     read_dm_block: subclass 59 offset 0
     bq: dump_rom_gauge_dm buf: 
     00 00 01 f4 0a f0 10 68 00 00 00 00 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 60 -
     read_dm_block: subclass 60 offset 0
     bq: dump_rom_gauge_dm buf: 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 64 -
     read_dm_block: subclass 64 offset 0
     bq: dump_rom_gauge_dm buf: 
     01 71 a7 98 03 00 14 04 00 00 00 00 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 68 -
     read_dm_block: subclass 68 offset 0
     bq: dump_rom_gauge_dm buf: 
     0a f0 00 0f 05 00 32 01 c2 14 14 00 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 80 -
     read_dm_block: subclass 80 offset 0
     bq: dump_rom_gauge_dm buf: 
     01 01 02 bc 01 2c 00 1e 00 c8 c8 14 08 00 3c 0e 
     10 00 0a 46 05 0f 05 0f 0a 03 20 00 64 46 50 0a 
     dump_rom_gauge_dm:Sub Class 81 -
     read_dm_block: subclass 81 offset 0
     bq: dump_rom_gauge_dm buf: 
     00 3c 00 4b 00 28 00 3c 3c 01 01 90 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 82 -
     read_dm_block: subclass 82 offset 0
     bq: dump_rom_gauge_dm buf: 
     14 50 00 10 5d fe d5 fb 95 00 02 02 bc 00 32 03 
     e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 83 -
     read_dm_block: subclass 83 offset 0
     bq: dump_rom_gauge_dm buf: 
     00 64 10 63 10 48 10 2d 10 15 0f fc 0f e6 0f d0 
     0f bc 0f a8 0f 96 0f 84 0f 74 0f 65 0f 56 0f 45 
     dump_rom_gauge_dm:Sub Class 88 -
     read_dm_block: subclass 88 offset 0
     bq: dump_rom_gauge_dm buf: 
     ff 55 01 97 01 97 01 8c 01 ad 01 1f 00 ec 00 f9 
     00 fc 00 d3 00 bd 00 ee 01 19 02 30 05 c3 09 2e 
     dump_rom_gauge_dm:Sub Class 89 -
     read_dm_block: subclass 89 offset 0
     bq: dump_rom_gauge_dm buf: 
     ff ff 01 97 01 97 01 8c 01 ad 01 1f 00 ec 00 f9 
     00 fc 00 d3 00 bd 00 ee 01 19 02 30 05 c3 09 2e 
     dump_rom_gauge_dm:Sub Class 104 -
     read_dm_block: subclass 104 offset 0
     bq: dump_rom_gauge_dm buf: 
     80 74 1f 21 95 08 98 c0 05 87 58 00 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 107 -
     read_dm_block: subclass 107 offset 0
     bq: dump_rom_gauge_dm buf: 
     ef 05 22 05 01 00 00 10 01 00 3c 00 50 3c 00 64 
     3c 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 
     dump_rom_gauge_dm:Sub Class 112 -
     read_dm_block: subclass 112 offset 0
     bq: dump_rom_gauge_dm buf: 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    

  • Thank you, please allow me some time to review the registers. I should hopefully get back to you tomorrow.

    Regards,

    Nick Richards

  • Hello,

        I am writing on Jon's behalf. We noticed the gauge's current readings seemed to be off by a factor of 2, so we ran the current calibration procedure outlined in section A.8 of this document. We updated the following values with the results:

    CC Gain: 0x7f746cf0 # Corresponds to 0.477386935

    CC Delta: 0x940b0c89 # Corresponds to 569544.572864322

    CC Offset: 1408

    Board Offset: -48

    While not perfect, these updated values improved the current readings immense, (now seemingly within 10-20 mA). However, the charging cycles still seem to be off. This document shows results for a few charging cycles. Do you have some recommendations to move forward?

    Thank you,

        Joshua Bourgeot

  • Additionally, here is a rom dump of the gauge in it's current state, should that prove to be useful.

    gauge_rom_dump.txt
    <3>[    1.716430] bq27x00-battery 1-0055: dump_rom_gauge_dm()
    <3>[    1.742401] bq27x00-battery 1-0055: is_it_sealed: ret - 0000400c
    <3>[    1.748748] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 2 -
    <3>[    1.755340] bq27x00-battery 1-0055: read_dm_block: subclass 2 offset 0
    <3>[    1.774505] bq27x00-battery 1-0055: bq27x00_battery_status: Charging
    <3>[    1.839385] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    1.845458] bq27x00-battery 1-0055: 02 26 05 01 f4 02 58 05 02 26 02 58 03 02 26 00 
    <3>[    1.853576] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    1.861694] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 34 -
    <3>[    1.868530] bq27x00-battery 1-0055: read_dm_block: subclass 34 offset 0
    <3>[    1.936859] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    1.942932] bq27x00-battery 1-0055: 10 68 ff ce 02 26 00 00 00 00 00 00 00 00 00 00 
    <3>[    1.951049] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    1.959167] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 36 -
    <3>[    1.966003] bq27x00-battery 1-0055: read_dm_block: subclass 36 offset 0
    <3>[    2.036743] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    2.042816] bq27x00-battery 1-0055: 00 64 00 19 00 64 28 63 5f ff 62 00 32 00 00 00 
    <3>[    2.050933] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.059051] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 48 -
    <3>[    2.065887] bq27x00-battery 1-0055: read_dm_block: subclass 48 offset 0
    <3>[    2.136810] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    2.142883] bq27x00-battery 1-0055: 00 64 01 b0 00 0a 0e 74 f6 fe 0c 00 31 00 00 00 
    <3>[    2.150970] bq27x00-battery 1-0055: 01 00 39 12 fc 5a 64 14 50 4b 28 fe 70 50 78 78 
    <3>[    2.159118] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 49 -
    <3>[    2.165954] bq27x00-battery 1-0055: read_dm_block: subclass 49 offset 0
    <3>[    2.237335] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    2.243408] bq27x00-battery 1-0055: 02 08 03 0c 00 68 01 04 32 09 c4 02 0a 28 11 94 
    <3>[    2.251525] bq27x00-battery 1-0055: 02 11 30 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.259613] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 56 -
    <3>[    2.266479] bq27x00-battery 1-0055: read_dm_block: subclass 56 offset 0
    <3>[    2.336975] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    2.343048] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.351165] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.359283] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 57 -
    <3>[    2.366119] bq27x00-battery 1-0055: read_dm_block: subclass 57 offset 0
    <3>[    2.437561] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    2.443664] bq27x00-battery 1-0055: 21 00 bc cb 10 e4 00 00 04 12 00 00 00 00 00 00 
    <3>[    2.451782] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.459869] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 58 -
    <3>[    2.466705] bq27x00-battery 1-0055: read_dm_block: subclass 58 offset 0
    <3>[    2.537322] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    2.543395] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.551513] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.559600] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 59 -
    <3>[    2.566436] bq27x00-battery 1-0055: read_dm_block: subclass 59 offset 0
    <3>[    2.636993] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    2.643096] bq27x00-battery 1-0055: 00 00 01 f4 0a f0 10 68 00 00 00 00 00 00 00 00 
    <3>[    2.651184] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.659301] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 60 -
    <3>[    2.666137] bq27x00-battery 1-0055: read_dm_block: subclass 60 offset 0
    <3>[    2.737030] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    2.743103] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.751220] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.759307] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 64 -
    <3>[    2.766143] bq27x00-battery 1-0055: read_dm_block: subclass 64 offset 0
    <3>[    2.837463] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    2.843536] bq27x00-battery 1-0055: 01 71 a7 98 03 00 14 04 00 00 00 00 00 00 00 00 
    <3>[    2.851654] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    2.859771] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 68 -
    <3>[    2.866607] bq27x00-battery 1-0055: read_dm_block: subclass 68 offset 0
    <3>[    2.977935] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    2.984069] bq27x00-battery 1-0055: 0a f0 00 0f 05 00 32 01 c2 14 14 00 00 00 00 00 
    <3>[    2.992187] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    3.000274] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 80 -
    <3>[    3.007110] bq27x00-battery 1-0055: read_dm_block: subclass 80 offset 0
    <3>[    3.077392] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    3.083465] bq27x00-battery 1-0055: 01 01 02 bc 01 2c 00 1e 00 c8 c8 14 08 00 3c 0e 
    <3>[    3.091552] bq27x00-battery 1-0055: 10 00 0a 46 05 0f 05 0f 0a 03 20 00 64 46 50 0a 
    <3>[    3.099670] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 81 -
    <3>[    3.106506] bq27x00-battery 1-0055: read_dm_block: subclass 81 offset 0
    <3>[    3.180694] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    3.186798] bq27x00-battery 1-0055: 00 3c 00 4b 00 28 00 3c 3c 01 01 90 00 00 00 00 
    <3>[    3.194915] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    3.203033] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 82 -
    <3>[    3.209838] bq27x00-battery 1-0055: read_dm_block: subclass 82 offset 0
    <3>[    3.277313] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    3.283447] bq27x00-battery 1-0055: 14 50 00 10 68 fe d5 fb 95 00 02 02 bc 00 32 03 
    <3>[    3.291534] bq27x00-battery 1-0055: e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    3.299652] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 83 -
    <3>[    3.306488] bq27x00-battery 1-0055: read_dm_block: subclass 83 offset 0
    <3>[    3.378082] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    3.384216] bq27x00-battery 1-0055: 00 64 10 63 10 48 10 2d 10 15 0f fc 0f e6 0f d0 
    <3>[    3.392303] bq27x00-battery 1-0055: 0f bc 0f a8 0f 96 0f 84 0f 74 0f 65 0f 56 0f 45 
    <3>[    3.400421] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 88 -
    <3>[    3.407257] bq27x00-battery 1-0055: read_dm_block: subclass 88 offset 0
    <3>[    3.522399] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    3.528472] bq27x00-battery 1-0055: ff 55 01 97 01 97 01 8c 01 ad 01 1f 00 ec 00 f9 
    <3>[    3.536590] bq27x00-battery 1-0055: 00 fc 00 d3 00 bd 00 ee 01 19 02 30 05 c3 09 2e 
    <3>[    3.544708] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 89 -
    <3>[    3.551513] bq27x00-battery 1-0055: read_dm_block: subclass 89 offset 0
    <3>[    3.647613] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    3.653717] bq27x00-battery 1-0055: ff ff 01 97 01 97 01 8c 01 ad 01 1f 00 ec 00 f9 
    <3>[    3.661834] bq27x00-battery 1-0055: 00 fc 00 d3 00 bd 00 ee 01 19 02 30 05 c3 09 2e 
    <3>[    3.669952] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 104 -
    <3>[    3.676879] bq27x00-battery 1-0055: read_dm_block: subclass 104 offset 0
    <3>[    3.747283] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    3.753387] bq27x00-battery 1-0055: 7f 74 6c f0 94 0b 0c 89 05 61 d0 00 00 00 00 00 
    <3>[    3.761474] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    3.769592] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 107 -
    <3>[    3.776519] bq27x00-battery 1-0055: read_dm_block: subclass 107 offset 0
    <3>[    3.847320] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    3.853424] bq27x00-battery 1-0055: ef 05 22 05 01 00 00 10 01 00 3c 00 50 3c 00 64 
    <3>[    3.861541] bq27x00-battery 1-0055: 3c 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    3.869659] bq27x00-battery 1-0055: dump_rom_gauge_dm:Sub Class 112 -
    <3>[    3.876586] bq27x00-battery 1-0055: read_dm_block: subclass 112 offset 0
    <3>[    3.947357] bq27x00-battery 1-0055: bq: dump_rom_gauge_dm buf: 
    <3>[    3.953460] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    <3>[    3.961547] bq27x00-battery 1-0055: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    

  • However, the charging cycles still seem to be off.

    Just to clarify, here I am referring to how the reported capacity hits 100% 2-3 hours before fully charged, the reported capacity does not discharge in a straight line below 20%, and the charge full seems to fluctuate weirdly, even though to my understand it should be relatively constant. Are these things we can fix or are they to be expected.

    Thank you,

        Joshua Bourgeot

  • Hi Joshua,

    I have read through your past post, and it seems like here have been a handful of issues. First can I verify a few things to better understand where we are at in the debug process.

    1 Please verify that the device is calibrated properly, this is very important because any data we collect with an uncalibrated device will be useless. Please verify the gauge is seeing expected current, voltage and temperature.  (+) BQ34Z100-G1: Commands for calibration procedure - Power management forum - Power management - TI E2E support forums

    2 Which ChemID is being used? How was this ChemID selected? Ideally the ChemID is supposed to be selected using the GPCCHEM tool, with a DOD% error of 3% or less, GPCCHEM Application software & framework | TI.com

    3 Was a learning cycle completed? What is update status?

    Regards,

    Evan

  • Hi Evan,

    Joshua and I were looking at the Temp calibration and it looks like the hardware team hooked up the thermistor to the battery charger IC (bq24295) and not the battery gauge.  How much is this going to mess with the gauge, can we work around it?

    Note the bq27741 users guide, in section 2.6 says the thermistor should be between VCC and TS, but in the ref schematic in chapter 6, its connected between REG25 and TS.  I assume the reference schematic is correct?

    Note our battery pack connects its thermistor to CELL-, so not sure how we would hook it up.

    The schematic looks like this:

  • Hi,

    The thermistor needs to be located on the batter pack and the gauge needs accurate temperature readings to calculate SOC. The TS pin is for the gauge thermistor.

    reg25 outputs 2.5V so as long as a voltage is applied across the thermistor it should function. 

    I could not find where it said to tie the thermistor to gnd, can you point it out please.

    Thanks,

    Evan

  • I could not find where it said to tie the thermistor to gnd, can you point it out please.

    Hmm, I didn't write gnd.  I wrote VCC and TS.

    The thermistor needs to be located on the batter pack and the gauge needs accurate temperature readings to calculate SOC. The TS pin is for the gauge thermistor.

    Hmm, how inaccurate would it be?  Is this going to be more of an issue if we are below or above room temp?

    We can mod the board, however, I'm not sure how to connect the battery packs TH pin to the TS pin of the gauge. Since TH is tied to Pack- instead of reg25.

    Here is the schematic from the battery pack.  Not sure if I can share the whole datasheet.

  • Hi,

    My mistake, please connect the thermistor to Reg25 as seen in the EVM.

    The temperature of the battery pack is very important for the Impedanct Track algorithm. As the temperature of the battery pack changes due to the temperature of the environment and the pack being charge, discharged, relaxed, this will alter the ocv curve of the battery and needs to be accounted for.

    I recommend using a thermistor external to the battery pack and the gauge and place the thermistor on the battery pack. Some of our newer gauges such as the BQ27426 can use this type of thermistor on the pack but for this older device you will need to connect the thermistor to Reg25 and the TS pins.

    Regards,

    Evan