INA228: Incorrect current reading from current register in INA228.

Part Number: INA228

Hello,

We have used INA228 for a project in my company.

Currently we are facing issue that current readings from current register as compare to Programmable power source & Programmable Load device.

We have given input 5V & 270mA Which is being read by INA228 was 272mA but programmable load was 268.4mA.

It is showing delta of 4mA, Is this delta is acceptable for INA228 reading ?

I have attached screen capture of Programmable power source & programmable load & also attached INA228 console logs for reference.

Power source current reading

INA228 Console Error logs:

root@8JD3NZ3-Desk:/home/jagir/Desktop/SA01/SIE_ACL_Sandbox/SA01-hil/module_app/analog_current# python3 analog_current.py
*********** Scan for ftdi devices ************
 Read Mfg ID
ManuFacture ID: 5449
Read Data in hex: [0020] from reg addr : [0]
Read Data in hex: [f1c7] from reg addr : [1]
current_lsb : [2.0833333333333336e-05]
 Read shunt calib reg
Read Data in hex: [0ea6] from reg addr : [2]
Read shunt calib from reg(dec) : [3750]
Temp coefficient
 Read shunt calib reg
Read Data in hex: [0032] from reg addr : [3]
Read Temp coefficient from reg(dec) : [50]
 Read shunt current
current_lsb : [2.0833333333333336e-05]
          Measured Current : [0.23564583333333336]
 Read Shunt Voltage
         VShunt Data in hex: 0330a0
          Measured VShunt Voltage : [4083125.0]
 Read shunt current in continous mode_1
Current Data hex : [0330a0]
current_lsb : [2.0833333333333336e-05]
          Shunt-Current[0] : [0.2722083333333334]
 Read Shunt Voltage
         VShunt Data in hex: 0330a0
          Measured VShunt Voltage : [4083125.0]
Current Data hex : [0330a0]
current_lsb : [2.0833333333333336e-05]
          Shunt-Current[1] : [0.2722083333333334]
 Read Shunt Voltage
         VShunt Data in hex: 0330a0
          Measured VShunt Voltage : [4083125.0]
Current Data hex : [0330b0]
current_lsb : [2.0833333333333336e-05]
          Shunt-Current[2] : [0.2722291666666667]

  • I have added screenshot of the shunt current & voltage measurement vs DC power supply & Voltage measured by DMM6500 described as below.

    I am using the Adafruit INA228 module.

    Please help to solve this issue of incorrect shunt current & voltage readings.

  • Hi,

    Were the DMM probes placed as close as possible to INA228 input pins? preferably on the pins like below

    Regards, Guang  

  • Hello,

    We are using INA228 Adafruit board.

    We have placed DMM probes to IN+ & IN- pads of INA228 Adafruit board.

    I am also sharing INA228 config register settings for reference.
    1) CONFIG register : Address - 0x00h, Value - 0x0000
    2) ADC_CONFIG register : Address - 0x01h, Value - 0xFB68
    3) SHUNT_CAL register : Address - 0x02h, Value - 0x0EA6

  • Hi,

    Both Config and ADC_Config registers are set to default. SHUNT_CAL doesn’t affect Shunt Voltage measurement (VSHUNT, register 4h), which is one we should focus on for now.

    When reporting VSHUNT corresponding to 1A, is the reading stable if you keep looping a few times?

    The error is too big, considering you already hand measure at the input pins for reference.

    Regards, Guang  

  • Hi Guang,

    Yes, Config and ADC_Config registers are set to default.

    I did not get your question,

    1) Do you mean to measure Shunt Voltage externally as well as VSHUNT - reg 4h when load current of 1A ?

    I should verify above scenario few times & update the results.

    I have a more query to this.

    Does by changing VSHUNT response time & sample average count in ADC_CONFIG register would make significant difference on results ?

    Do we need to perform any kind of calibration on shunt resistor(On-board 15mOhm) while using INA228 IC on Adafruit board ?

    (www.adafruit.com/.../5832)

    Please correct me if am wrong.

  • Hi,

    I apologize if I was not clear.

    At 1A, there is a 2.3mV discrepancy between DMM and INA228, which is too large and I can’t find a proper explanation for it. One thing to rule out is to see if INA228 reading is stable (ie. consistently off by 2.3mV)

    Changing VSHUNT response time & sample average count affects the stability of the readings, but you’re already using fairly long conversions and large # of averaging based on the configuration setting.

    In terms calibration, it can be an option in the future. But we need to figure out the reason behind the large error first. Since the DMM measurements are taken on the INA228 input pins, the shunt resistor shouldn’t be responsible for this error.

    Regards, Guang  

  • Hi Goung,

    As you asked i taken trials for SHUNT voltage at 1A load current.

    I changed connection wires between INA228 board & DC Supply, DC load & manage to read SHUNT voltage across SHUNT resistor and by try N error i calibrated internal value of shunt resistor to get most near results for 1A test.

    Results are as below,

    So Now we are getting better accuracy readings in 1A range.

    But we are not getting proper results in 20 - 100 uA range, & diff is major in this range which too much crucial while working with low power applications. Results are as below for uAmp range.

    Note: We have changed SHUNT resistor(FE & on-board both) to 100mOhm for uAmp readings.

    Please guide us to have better accuracy in this range.

    We need to measure current from 1uAmp to 10 Amp.

    For this range of current measurement, Is it require to change shunt to cover the whole range Or we should be able to calibrate shunt to use in uAmp, mAmp & Amp range of current measurement ?

    Thanks for your guidance to solve issue for 1Amp.

  • Hi Jagir,

    It is great news that you resolved the issue at 1A.

    It is challenging to measure small current as you discovered, let alone over a wide range - i.e. 7-decade from 1uA to 10A. This range has to be broken into a few segments with a different Rshunt for each.

    With calibration and segmentation, it should be possible to cover the entire range though.

    Regards, Guang  

  • Hi Guang, Yes it's right.

    Today i have carried an experiment by changing on-board shunt to 100 ohm & set 99.5 shunt value in FW.

    Results are as below for 1uA to 408 uA range of current.

    So Moral of the story We can not cover current measurement range of 1 uAmp to 10 Amp using a single shunt.

    We need different shunt for different range for accurate results.

    Please let me know for 1uAmp to 1000 uAmp range which value of SHUNT resistor is suitable ?, Does 100 ohms is okay w?

    Please correct me i am wrong.

  • Hi  Jagir,

    100Ohm should be OK, the shunt voltage is still within range at 1mA. But it is about the largest that can be used.

    The % error is always going to be worse toward the lower end, regardless the resistor.

    Regards, Guang  

  • Hi Gaung,

    I was trying to lower the shunt resistor value from 100 ohms to a few ohms.

    for that I used this equation,

    I min = Offset voltage / Shunt resistor.

    i max = Max Shunt voltage / Shunt resistor.

    From datasheet, I found offset voltage as 1 uV & Max Shunt voltage 40.96 mV(for ADCRANGE = 0)

    Using the above equation, For 1 ohm shunt resistor minimum current it should measure is 1 uA & maximum current is 40.96 mA.

    But on the practical, we found very deviation for 1-100 uA current range. Results are as shown below.

    Please correct me if my understanding is wrong, Please guide me with the correct shunt resistor value for 1uA to xx mA range.

  • Hi Jagir,

    The offset of 1uV means the error could be up to 100% when the device measures a 1uA load current over 1Ohm. This error gradually reduces (% accuracy improves) as load current increases.

    Offset is not resolution.

    1uA to 40mA is too wide a range for a single shunt resistor. You’ll need to break it into a few.

    Regards, Guang