cancel
Showing results for 
Search instead for 
Did you mean: 

I am using STC3115AIQT GAS GAUGE IC for battery monitoring...but i am not able to detect the current value even though i have resistor connected to CG and GND...i am getting only the voltage value....can i get solution for this

Gk.1
Associate II
 
7 REPLIES 7
Winfred LU
ST Employee
  1. Check if the sense resistor is placed and soldered well. Please refer to AN4324, section 5.2
  2. Check if STC3115 is in mixed mode. Set VMODE = 0

Thank you for the reply...i checked with both of your points..It has been correctly soldered...and VMODE has been set to 0..still not able to read the current value...what can be the issue?

Winfred LU
ST Employee

The sense resistor must be placed between the battery minus pin and the application ground.

Could you please check if the sense resistor impedance is selected correctly accordingly the application need.

The sense resistor impedance depends on the application maximum current and the STC3115 Vin_gg input voltage range:

Vin_gg = Rcg x IMax

Where Rcg = sense resistor value in mΩ and IMax = application peak current in A

Vin_gg must be within the range 40 mV to -40 mV (below 40 mV for IMax charging and above -40 mV for IMax discharging)

Actually I am able to read the current value now....But not getting the SOC %....I am using the library provided by ST...What can be the issue?​

Good to know current sensing works for you now.

Do you mind sharing how you fixed the issue to help the others as well ?

For the SOC, please refer to AN4324: STC3115 system integration and doubly check your configurations.

Gk.1
Associate II

After making below changes im getting current values,but still even after going through  AN4324: STC3115 system integration i am not getting the soc value...can i get help regarding this?

We are facing below issues

1> Not getting(get zero values for all) Voltage, Current and Battery State of Charge(battery percentage) with ST's library. Please refer below code.

status = GasGauge_Initialization(&STC3115_ConfigData, &STC3115_BatteryData);

status = GasGauge_Task(&STC3115_ConfigData, &STC3115_BatteryData); /* process gas gauge algorithm, returns results */

if (status > 0) //OK, new data available 

{

sprintf(cbuf,"Vbat=%d mV I=%d mA Batt SoC=%d\r\n",STC3115_BatteryData.Voltage,STC3115_BatteryData.Current,(STC3115_BatteryData.SOC * 0.1));

addToDebugQ(cbuf, 1);

printDebugQ();

}

2> With some changes(Additional code) in code of library we are getting Voltage and Current but not Battery percentage. Please refer below code

status = GasGauge_Initialization(&STC3115_ConfigData, &STC3115_BatteryData);

/*************Additional code******************/

cbuf[0]=0x00;

cbuf[1]=0x10;

I2C_Write(2, STC3115_REG_MODE , &cbuf);

/*******************************/

status = GasGauge_Task(&STC3115_ConfigData, &STC3115_BatteryData); /* process gas gauge algorithm, returns results */

if (status > 0) //OK, new data available 

{

sprintf(cbuf,"Vbat=%d mV I=%d mA Batt SoC=%d\r\n",STC3115_BatteryData.Voltage,STC3115_BatteryData.Current,(STC3115_BatteryData.SOC * 0.1));

addToDebugQ(cbuf, 1);

printDebugQ();

}

Note: Writing 1 byte with I2C_Write in additional code doesn't work it has to be 2 bytes write operation with I2C_Write

For the added code:

cbuf[0]=0x00;
cbuf[1]=0x10;
I2C_Write(2, STC3115_REG_MODE , &cbuf);

Setting Mode Register (offset 0) to 0 means to set VMODE = 0, which is exactly step to set STC315 to mixed mode.

But setting Control and Status Register (offset 1) to 0x10 means to perform software reset, which shall only be used when there is a abnormal situation.

Could you read the status before resetting it, to check what was going on ?