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.

# TIDA-00449: How to calculate ISENSE current on MCU?

Part Number: TIDA-00449
Other Parts Discussed in Thread: BQ76930

I can't find any codes of calculating ISENSE on the firmware. it has just the code to read ISENSE.

Anyone, please let me know how to calculate ISENSE.

The part of TIDA00449's schematic below is the one to read ISENSE which is connected to MSP430's 10bits ADC.

regards.

lee

• Hi Sungu,

TIDA-00449 supports an external circuit to read current with MCU ADC. Since pack current is bi-directional while MCU ADC can only read positive voltage, so we design Q17, R63, R64, and R67 circuit to read pack current with MCU.

Another way to read pack current is to utilize BQ76930, it integrates a 16bit ADC which is much easier to read current value.

Best Regards,

Ryan

• Also, please note that Q17 has wrong direction, source should be connected to REGOUT and drain should be connected with R62.

with regard to the direction problem, I already knew through other posts.

Problem is, I am a software engineer. so I couldn't understand that part. I mean Q17, R63, R64, and R67 parts.
can you explain how to calculate pack current using the parts that you mentioned in detail for me? equations or something.

cause I eventually have to implement the firmware codes of that.

regards.

lee.

• Hi Lee,

You can use below formula to calculate:

V_ISENSE = V_ISNESE1*Ra/(Ra+R63) + V_REGOUT*Rb/(Rb+R62);

Ra = R62*R67/(R62+R67)

Rb = R63*R67/(R63+R67)

Best Regards,

Ryan Tan

• Hi Ryan Tan

Thank you very much.

let Ra/(Ra + R63) be Ra' and Rb(Rb+R62) be Rb'

then, the formula becomes V_ISENSE = V_ISENSE1 * Ra' + V_REGOUT * Rb'

MCU can calculate V_ISENSE = (10bits value *  V_REGOUT) / (2 ^ 10) and we already know Ra' and Rb'

in V_ISENSE1 = ( V_ISENSE - V_REGOUT * Rb' ) / Ra'

we can get V_ISENSE1.

thus, Current I = V_ISENSE1 / Ra'.

Did I make the right calculation?

Kind regards

lee

• Hi Lee,

Most of them are correct I think. Only some comments as below:

sungu lee said:

let Ra/(Ra + R63) be Ra' and Rb(Rb+R62) be Rb'

then, the formula becomes V_ISENSE = V_ISENSE1 * Ra' + V_REGOUT * Rb'

MCU can calculate V_ISENSE = (10bits value *  V_REGOUT) / (2 ^ 10) and we already know Ra' and Rb'

Here you need to use the ADC reference, maybe is V_REGOUT. Just a soft reminder.

in V_ISENSE1 = ( V_ISENSE - V_REGOUT * Rb' ) / Ra'

we can get V_ISENSE1.

thus, Current I = V_ISENSE1 / Ra'.

Here Ra' should be current sensing resister, 0.5m ohm in TIDA-00449.

Did I make the right calculation?

Kind regards

lee