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.

INA226: INA226AIDGSR current calibration and current reading

Part Number: INA226

Hi team,

We are using  INA226AIDGSR in our design to monitor the currents of some of the voltage rails.

One of the voltage rail schematic is attached below:

As seen above,

One of the INA226AIDGSR is monitoring the 3.3V voltage rail generated from TPSM84624MOLR regulator whose max. current is 6A.

The shunt resistor is 0.001ohm or 1mohm.

As per INA226 datasheet

CAL = 0.00512 / (Current_LSB * RSHUNT )

where 

Current_LSB = Maximum Expected Current / (2^15)

Since max current from TPSM84624MOLR is 6A, taking maximum Expected Current as 6A

our 

Current_LSB = 6 / (2^15)  = 0.0001831

Therefore CAL = 0.00512 / (Current_LSB * RSHUNT )   =  0.00512 / (0.0001831 * 0.001 ) = 27,962 approx.

converting 27,962 to Hexadecimal we get 6D3A

Therefore CAL =  6D3Ah

we are using this value to programming the Calibration Register.

when we are reading the current from INA226, we are reading more than 7000mA (7A) which is not possible practically since TPSM84624MOLR can supply 6A max.

Similarly we are using INA226 to monitor some other voltage rails and we are suspecting the same errors in current reading. 

Bus voltage readings are proper as expected but the current readings are not proper.

We are using default value of Configuration Register (4127h).

my queries are:

1. Is my calculations are proper for Calibration Register? 

2. Anything we are missing in programing and reading from INA226? 

--

Thanks in Advance,

Kiran

  • Hi Kiran,

    Thanks for the question and using the E2E forum.

    1. It does appear you are calculating the CAL Register value correctly.

    2. Without knowing what value is in the registers, it'd be hard to tell what could be the issue. Could you show us what values are in the registers dump so we can see what all of them are reading? It does seem very odd that the Current Register is reading a value higher than what is possible.

  • Hi Louis,

    Thank you for the reply, here are the registers dump values:

    INA_CONF_REG :4127
    INA_SHUNT_VOL_REG :2BC
    INA_BUS_VOL_REG :A5C
    INA_POWER_REG :4F6
    INA_CURRENT_REG :2571
    INA_CLIB_EN_REG :6D3A
    INA_MASK_EN_REG :008
    INA_ALT_LMT_REG :0000
    INA_MANU_ID_REG :5449
    INA_DIE_ID_REG :2260
    Shunt voltage:
    since LSB is  2.5 μV/bit for shunt voltage register, we are multiplying the decimal equivalent of SHUNT_VOL_REG: 2BCh = 700d with 2.5
    hence shunt voltage = 1750uV
    Bus Voltage : 
    since LSB is  1.25mV/bit for Bus voltage register, we are multiplying the decimal equivalent of BUS_VOL_REG: A5Ch = 2652d with 1.25
    hence Bus Voltage = 3315mV which is proper
    Current Register:
    the decimal equivalent of CURRENT_REG: 2571h is 9585d or 9585mA
    since expected Max. current is 6A, we have Current_LSB = 6 / (2^15)  = 0.0001831A/bit or 0.183mA/bit
    i think here we are making mistake. we have considered 9585mA as final current value, but i believe we have to multiply the current register reading with Current_LSB value which is 0.183mA/bit to get a final current value. i.e., 9585d x 0.183 =  1754d or 1754mA is the actual current value.
    or
     
    The current calculated by INA226 : 
    Current = (ShuntVoltage*CalibrationRegister) / 2048

    which we read as  2571h = 9585d is the final current value?

    or

    any steps we are missing while computing the current and voltage values?

    --

    Thanks in Advance

    Kiran

  • Hi Kiran,

    You are right, to calculate the final measured current value, you need multiply the Current Register decimal value by the Current_LSB to get the measured current. The example you show is how the INA226 internally calculates the value for the Current Register, the user simply needs to take that last step to multiply that by the Current_LSB.

    Louis

  • Hi Louis,

    Thank you for the reply, will follow the same steps for calculating current of INA226 used for other voltage rails.