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.

INA219: INA219 with different shunt resistor

Part Number: INA219

hello team,

I am working on INA219 current sensor for battery current sensing application.

I have some queries as follows

1) current shunt resistor is of 0.002ohm, 3watt because I don't lower losses.

for coding I have used adafruit INA219 library but unable to do the calculations in the library.

their calculation with 0.1 ohms.

can u give me correction factor that can be directly applied in code?

2) I'm using 14 modules of INA219,one for each battery in the battery management system to know the total current flow and individual?

total voltage 48 volts, max current 6 amperes,  individual cell voltage 3.7 volt, 6 A max current.

any suggestion with different shunt resistor that could help?

  • Hello 5249465,

    I am looking at this right now and will respond shortly.

    Best,

    Peter

  • Hey 5249465,

    Thanks for posting to the forum.

    When using the INA219, it is critical to properly program the calibration register (05h) to read current and power output values. You have mention 2mΩ shunt resistor and 6A maximum expected current. If you follow the steps of section 8.5.1, you will be instructed to calibrate the Cal value. The cal value is what you program into the calibration register. According to equations 1 and 2 of the INA219 datasheet, the Cal value for your system should be calculated as:

    Cal = trunc[0.04096/(Current_LSB*Rshunt), where Current_LSB = Max Expected Current/2^15.

    Given your values, I calculate Cal = 111,848 decimal.

    Then in order to determine system current, you take the value from the current register and multiply it by the Current_LSB. Read section 8.5.1 of INA219 datasheet or watch our free training video for a tutorial on this process.

    https://training.ti.com/getting-started-current-sense-amplifiers-session-15-programming-power-settings?cu=456802

    I am not sure how to approach your second question. I assume all of your batteries are stacked in series to get 48V total. In this configuration, all of the batteries will have the same current flowing through them, so I don’t think you can measure their individual currents, especially with a 2mΩ shunt for each. It seems this would short out the individual battery. Perhaps you are trying to measure the individual charge of each battery? If so you would want to use a larger resistance. While you can certainly make a discrete battery management circuit where you determine the capacity of each cell and charge cells that discharge faster than others, you may want to look into an integrated solution and learn about TI’s technology for battery management with these technical training videos.

    https://training.ti.com/what-gauge-and-why-do-you-need-it?cu=1134734

    If you are just trying to measure total current delivered to your system from all of your batteries, then you only need one 2mΩ shunt resistor; however, the INA219’s operating common-mode input voltage (VCM) is 26V max, so you could not place the 2mΩ shunt at the top of the cell stackup. You could alternatively position the 2m Ω on the low-side (0V) of the stackup where the return current is flowing.

    Choosing the right shunt resistor requires knowing what minimum and maximum currents you need to sense and at what accuracy. This will help you understand the dynamic range of current you need to sense. Because you are sensing 6A max of current with a 2mOhm shunt, this turn into 12mV maximum shunt voltage. So you will want to use the INA219 (or any part) with the lowest gain setting: PGA= /1 (+-40mV). If you choose a higher gain setting like +-100mV, then you will be wasting input dynamic range that you will never need.

    Hope this helps. If you have more questions, please post them with more clarification on your set up and what you are trying to accomplish.

    Peter Iliya