Can't read the current value of Lead-acid battery using FRDM33771CSPEVB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't read the current value of Lead-acid battery using FRDM33771CSPEVB

1,599 Views
Zyuan17
Contributor III

Hi Staff:

I am currently using the FRDM33771CSPEVP to verify my SOC estimation algorithm. But I encountered a problem with the current measurement.

Mc circuit is:

BMSNotebook-43.jpg

I am testing one Lead-acid battery (From EnerSys Cyclon 2 Volt 2.5Ah sealed-lead rechargeable battery). Since the voltage is 2.4V, it is not enough to let the chip work. So I use an external power supply and set it to 12 V then connect it to the X1-25 pin. And the CT01 and CTREF pins are connected to the positive and negative terminals of the battery respectively. The chip can read the correct battery voltage at about 2V and it is the same as the voltmeter showed. But when I connect X2 in parallel with the shunt resistor. The voltage it measures is only 0.07mV in charging mode and 0.130mV in discharging mode. These two voltages should be the same. I have checked the voltage across the shunt resistor using a voltmeter, and the voltage is 100mV.

Is there anything wrong with the connection? What should I do if I only want to test a few batteries?

Best,

Zhe

#MC33771C

0 Kudos
Reply
7 Replies

1,520 Views
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

Please accept my apologies for the delayed response.

Note that the current measurement is the most sensitive measurement on the board. Please review the questions below:

  1. Are you adding an LPF filter as close as possible to the current sense inputs of the BCC?
  2. Note that the current measurement chain is not enabled by default and needs to be enabled by setting SYS_CFG1[I_MEAS_EN]. Are you enabling such bit?
  3. I assume that you are reading the MEASE_ISENSEx (signed 19-bit value) register. Could you please confirm that you are reading such register as the example below? Could you please share your calculations?

 

Regards,

David

0 Kudos
Reply

1,518 Views
Zyuan17
Contributor III
Hi David,
1. I didn't attached the LPF to the current sensor. I directly connected the X2 pins in parallel with the battery through jumper cables. According to the schematic of the board, it seems like the LPF is already embedded on to the board.

2. The register is enabled.

3. These are my codes:
/*!
* @brief This function reads values measured and provided via SPI
* by BCC device (ISENSE, cell voltages, temperatures).
*
* @return bcc_status_t Error code.
*/
static bcc_status_t updateMeasurements(void)
{
bcc_status_t error;

/* Step 1: Start conversion and wait for the conversion time. */
error = BCC_Meas_StartAndWait(&drvConfig, BCC_CID_DEV1, BCC_AVG_1);
if (error != BCC_STATUS_SUCCESS)
{
return error;
}

/* Step 2: Convert raw measurements to appropriate units. */
error = BCC_Meas_GetRawValues(&drvConfig, BCC_CID_DEV1, measurements);
if (error != BCC_STATUS_SUCCESS)
{
return error;
}

/* You can use bcc_measurements_t enumeration to index array with raw values. */
/* Useful macros can be found in bcc.h or bcc_MC3377x.h. */
cellData[0]= BCC_GET_STACK_VOLT(measurements[BCC_MSR_STACK_VOLT]);
cellData[1]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT1]);
cellData[2]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT2]);
cellData[3]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT3]);
cellData[4]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT4]);
cellData[5]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT5]);
cellData[6]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT6]);
cellData[7]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT7]);
cellData[8]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT8]);
cellData[9]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT9]);
cellData[10]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT10]);
cellData[11]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT11]);
cellData[12]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT12]);
cellData[13]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT13]);
cellData[14]= BCC_GET_VOLT(measurements[BCC_MSR_CELL_VOLT14]);
cellData[15] = BCC_GET_IC_TEMP_C(measurements[BCC_MSR_ICTEMP]);

/* ISENCE data (current measurement) */
cellData[16] = BCC_GET_ISENSE_AMP(DEMO_RSHUNT, measurements[BCC_MSR_ISENSE1], measurements[BCC_MSR_ISENSE2]);
isenseVolt = BCC_GET_ISENSE_VOLT(measurements[BCC_MSR_ISENSE1], measurements[BCC_MSR_ISENSE2]);

if (isenseVolt > ISENSETHRESHOLD){
currentDirectionFlag = 0; // Discharge
chargingDischargingFlag = 0;
}
else if(abs(isenseVolt) <= ISENSETHRESHOLD){
currentDirectionFlag = 2; // Open circuit
}
else{
currentDirectionFlag = 1; // Charge
chargingDischargingFlag = 0;
}

return BCC_STATUS_SUCCESS;
}
0 Kudos
Reply

1,510 Views
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

I hope all is great with you.

We do have an application note in which the current is measured using the correct formula. I can gladly share such information once an NDA is signed. The material mentioned is confidential.

Please submit a new ticket in case you do not have an NDA number.

 

I hope this information is useful for you.

Regards,

David

0 Kudos
Reply

1,559 Views
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

I hope all is great with you.

The FRDM33772BSPIEVB supports current sense function with off-board shunt resistor. The off-board shunt resistor shall be connected between X1-31 (IS_P) and X1-32 (IS_N).

diazmarin09_0-1671645212558.png

 

Could you please confirm that you are trying the measure the current sensing properly?

Please let me know if I am misunderstanding your question.

Regards,

David

0 Kudos
Reply

567 Views
sondt308
Contributor II

Let me ask, I am connecting FRDM33772BSPIEVB to a 6-cell LiFePo4 battery, but I can't find it. I looked in the circuit but couldn't find CT01, CT02,... So when connecting the battery to FRDM33772BSPIEVB, I only connect to CT01 [2], CT02 [2],... right?

0 Kudos
Reply

1,553 Views
Zyuan17
Contributor III
The board I am using is FRDM33771CSPEVB, it only has 26 pins and the X2 is used for current measurement. I have connected the VPWR to an external power supply which has 12V. And CT1 is connected to the positive terminal of the battery. And CELL_REF is connected to the negative terminal of the battery. The ISENSE+ and ISENSE- are connected to the shunt resistor. I thought this configuration could allow me to measure the voltage and current of the battery, but actually I can only measure the voltage of the battery and the current measurement is not stable and it is also incorrect.
0 Kudos
Reply

1,556 Views
Zyuan17
Contributor III
Hi David,

As you can see from the scheme I draw. I have already connected the X2 to a shunt resistor. The question I have is how can I measure the voltage and current of one battery. The configuration of my current circuit is the schm I draw.
0 Kudos
Reply