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.

INA228: does not reading correctly and i don't have a consistent error

Part Number: INA228


Tool/software:

Hello 

I am working with a PCB design using an INA228, and it was working fine until we decide to calibrate them, and discover the error on the measurements that we are having is bigger than we expected, at this moment i am trying to configure it using a shunt resistor of 16mOhm, and trying to read the same load with different voltage, resulting on different currents, and as for compassion I am using a DMM Keithley6 1/2  recent calibrated, 

this is the design that I am using

at 9 V this is my graphic current in mA

at 13.5V this is my graphic  current in mA

and at 16V this is the behavior  current in mA

I already tried to change the value on the ShuntCal to 4025d, 4050d, and 4000d, this for the extra values from the shun 16.1, 16.2 or 16.0

change the number of measurements from 1 to 256, 

change the time to take the measurement to 4120 us

the voltage is almost close I only have 0.1V of difference vs DMM and this is calculated by (VUS_voltage) *  195.3125/1000000 

the LSB current that I declared is 0.000019073486, I got that from 10/2^19

i tried to change the ADC_range to 1, and then according to the data sheet, to establish the SHUNT_CAL, I should multiply by 4 the value, but when I did that, the values were to different, so I leave it by one,

the only thing that I saw is that as i go to higher voltage, the error diminish 

i don't know what else to do, since I don't have an standard offset to add, since each measurement the error is very different 

  • Hi,

    I think it might be a good idea to compare shunt voltage instead of current at this time.

    For that can you please measure at the input pins of INA228 the real input differential voltage, and compare to Vshunt reported by INA228?

    Once we achieve agreement of the two, we can move on to resolving current difference if it is still there.

    Regards

    Guang

  • Hello Guang,

    sorry for the late answer I was performing the modifications on the code to read the shunt voltage, since i hadn't implemented yet, so, I check the shunt voltage give it by the INA228 vs the voltage across the resistance using the DMM, 

    the values are very similar, and almost without difference, the differences that are show I think they are for the change on the power supply or by hand. . . 

    here is the data, I don't know if there is a better way to share this information. 

    Shunt Volatege RAW DMM Shunt Voltage Difference Power Supply
    0.013343 0.010595649 0.002747 8.86
    0.013345 0.007682402 0.005663 8.85
    0.013346 -0.360042016 0.373388 8.86
    0.013347 1.79579548 -1.782448 8.85
    0.013346 0.013395458 -0.000049 8.86
    0.013346 0.013425175 -0.000079 8.86
    0.013348 0.013396614 -0.000049 8.85
    0.013349 0.013403367 -0.000054 8.85
    0.013351 0.013448066 -0.000097 8.85
    0.013353 0.013453783 -0.000101 8.85
    0.013353 0.013441121 -0.000088 8.85
    0.013353 0.013454769 -0.000102 8.83
    0.010581 0.013475598 -0.002895 13.47
    0.008832 0.005852424 0.002980 13.47
    0.008833 0.70859399 -0.699761 13.47
    0.008833 0.008918767 -0.000086 13.47
    0.008833 0.008923868 -0.000091 13.47
    0.008833 0.008932843 -0.000100 13.47
    0.008833 0.0089258 -0.000093 13.47
    0.008833 0.008928197 -0.000095 13.47
    0.008833 0.008935582 -0.000103 13.47
    0.008833 0.008944086 -0.000111 13.48
    0.008833 0.008931331 -0.000098 13.47
    0.008833 0.00892266 -0.000090 13.48
    0.008833 0.008947978 -0.000115 13.47
    0.00884 0.008920495 -0.000080 13.46
    0.00884 0.008922852 -0.000083 16
    0.007544 -0.08208083 0.089625 16
    0.007544 -0.08878507 0.096329 16.01
    0.007544 0.00761904 -0.000075 16
    0.007543 0.007624569 -0.000082 16.01
    0.007543 0.007629033 -0.000086 16.01
    0.007543 0.007624516 -0.000082 16.01
    0.007543 0.007621739 -0.000079 16.01
    0.007543 0.007620835 -0.000078 16.01
    0.007543 0.007621655 -0.000079 16.01
    0.007543 0.007621848 -0.000079 16.01
    0.007543 0.007626821 -0.000084 16.01
    0.007543 0.007627902 -0.000085 16.01
  • Hi Nestor,

    It is good that shunt voltage is almost identical between DMM and INA228, although some differences are quite large, such as the 4th line.

    Next is to correlate your previous DMM current readings with DMM shunt reading divided by 16mOhm. Do they agree? Further correlate both to current reported by INA228. Doing so can reveal if the shunt resistor is accurate, and if there is any math error.

    Regards

    Guang

  • Hi Guang,

    I was checking again at a different test voltage, in this case 9V, and I can se a bigger error, than the one on the 13.5 or 16V which is even weird, but now I compared the shunt voltage read by the DMM, INA228 and also currents and the conversions 

    using the following values., 

    also I was checking that on the program I set the shunt value as 0.0162 ohm, so, when I change that to the spreadsheet, the values between the current obtained by the INA and the one obtained by the Ohm law, are almost the same

    I am adding both tables.

    Shunt Value 0.016 Ohm
    INA 228 DMM
    Voltage Read INA228 Current Read INA228 Shunt Voltage Current by Shunt mA Current read by DMM mA Shunt read by DMM current by shunt mA
    8.8 819.48 0.013276 829.75 850.5629 0.013415 838.4168
    8.8 819.48 0.013276 829.75 850.8193 0.013411 838.1635
    8.8 819.48 0.013276 829.75 850.8242 0.013431 839.4272
    8.8 819.37 0.013274 829.625 850.7852 0.01342 838.7515
    8.8 819.37 0.013274 829.625 851.0354 0.013413 838.2984
    8.8 819.37 0.013274 829.625 851.01 0.013423 838.9198
    8.8 819.74 0.01328 830 851.0544 0.013431 839.4602
    8.8 819.74 0.01328 830 851.2238 0.013442 840.0973
    8.8 819.74 0.01328 830 851.211 0.013454 840.8795
    8.8 819.9 0.013282 830.125 851.1479 0.013422 838.8762
    8.8 819.9 0.013282 830.125 851.2674 0.013424 839.0165
    8.8 819.9 0.013282 830.125 851.2189 0.013427 839.1741
    8.8 819.99 0.013284 830.25 851.1889 0.013406 837.8547
    8.8 819.99 0.013284 830.25 851.381 0.013408 837.9911
    8.8 819.99 0.013284 830.25 851.3989 0.013403 837.6643
    8.8 819.85 0.013282 830.125 851.2842 0.013405 837.8257
    8.8 819.85 0.013282 830.125 851.5042 0.013414 838.3881
    8.8 819.85 0.013282 830.125 851.4465 0.01341 838.1482
    8.8 819.85 0.013282 830.125 851.3886 0.013415 838.4082
    8.8 819.79 0.013281 830.0625 851.5431 0.013408 837.9946
    8.8 819.79 0.013281 830.0625 851.5157 0.013415 838.4247
    8.8 819.79 0.013281 830.0625 851.4237 0.013413 838.3046
    8.8 819.85 0.013282 830.125 851.539 0.013386 836.6251
    8.8 819.85 0.013282 830.125 851.5828 0.013405 837.7948
    8.8 819.85 0.013282 830.125 851.4691 0.013398 837.3539
    8.8 819.97 0.013283 830.1875 851.6177 0.013403 837.6613
    8.8 819.97 0.013283 830.1875 851.6197 0.013414 838.3647
    8.8 819.97 0.013283 830.1875 851.4496 0.013431 839.434
    8.8 820.19 0.013287 830.4375 851.6349 0.013418 838.6478
    8.8 820.19 0.013287 830.4375 851.6473 0.013407 837.9136
    8.8 820.19 0.013287 830.4375 851.5227 0.013416 838.5046
    8.8 820.27 0.013288 830.5 851.7194 0.013409 838.0904
    8.8 820.27 0.013288 830.5 851.7229 0.013404 837.7743
    8.8 820.27 0.013288 830.5 851.4994 0.013406 837.8689
    8.8 820.34 0.01329 830.625 851.7288 0.01342 838.7508
    8.8 820.34 0.01329 830.625 851.7766 0.013423 838.9389
    8.8 820.34 0.01329 830.625 851.5989 0.013419 838.6622
    8.8 820.34 0.01329 830.625 851.8037 0.01344 839.982
    8.79 820.46 0.013292 830.75 851.8261 0.013428 839.229
    8.79 820.46 0.013292 830.75 851.642 0.013422 838.8956
    8.79 820.46 0.013292 830.75 851.8131 0.013424 838.9826
    8.79 820.46 0.013292 830.75 851.8047 0.013425 839.0404
    8.79 820.46 0.013292 830.75 851.6625 0.013436 839.7351
    8.79 820.46 0.013292 830.75 851.7929 0.013425 839.0825
    8.79 820.52 0.013293 830.8125 851.8273 0.013423 838.9606
    8.79 820.52 0.013293 830.8125 851.6894 0.013417 838.5677
    8.79 820.52 0.013293 830.8125 851.7731 0.013426 839.1226
    8.79 820.53 0.013293 830.8125 851.8468 0.013426 839.1492
    8.79 820.53 0.013293 830.8125 851.6481 0.013418 838.5979
    8.79 820.53 0.013293 830.8125 851.8108 0.013422 838.8922
    8.79 820.65 0.013295 830.9375 851.8403 0.013421 838.7907
    8.79 820.65 0.013295 830.9375 851.6998 0.013429 839.296
    8.79 820.65 0.013295 830.9375 851.7599 0.013426 839.1082
    8.79 820.74 0.013296 831 851.8605 0.013452 840.7197
    8.79 820.74 0.013296 831 851.7169 0.013452 840.7529
    8.79 820.74 0.013296 831 851.7956 0.013433 839.5929
    8.79 820.74 0.013296 831 851.8305 0.013425 839.0698

    INA 228 DMM
    Voltage Read Current Read INA228 Shunt Voltage Current by Shunt mA Current read by DMM mA Shunt read by DMM current by shunt mA
    8.8 819.48 0.013276 819.5062 850.5629 0.013415 828.066
    8.8 819.48 0.013276 819.5062 850.8193 0.013411 827.8158
    8.8 819.48 0.013276 819.5062 850.8242 0.013431 829.0639
    8.8 819.37 0.013274 819.3827 850.7852 0.01342 828.3965
    8.8 819.37 0.013274 819.3827 851.0354 0.013413 827.949
    8.8 819.37 0.013274 819.3827 851.01 0.013423 828.5628
    8.8 819.74 0.01328 819.7531 851.0544 0.013431 829.0964
    8.8 819.74 0.01328 819.7531 851.2238 0.013442 829.7257
    8.8 819.74 0.01328 819.7531 851.211 0.013454 830.4983
    8.8 819.9 0.013282 819.8765 851.1479 0.013422 828.5197
    8.8 819.9 0.013282 819.8765 851.2674 0.013424 828.6583
    8.8 819.9 0.013282 819.8765 851.2189 0.013427 828.8139
    8.8 819.99 0.013284 820 851.1889 0.013406 827.5108
    8.8 819.99 0.013284 820 851.381 0.013408 827.6456
    8.8 819.99 0.013284 820 851.3989 0.013403 827.3227
    8.8 819.85 0.013282 819.8765 851.2842 0.013405 827.4822
    8.8 819.85 0.013282 819.8765 851.5042 0.013414 828.0376
    8.8 819.85 0.013282 819.8765 851.4465 0.01341 827.8007
    8.8 819.85 0.013282 819.8765 851.3886 0.013415 828.0575
    8.8 819.79 0.013281 819.8148 851.5431 0.013408 827.649
    8.8 819.79 0.013281 819.8148 851.5157 0.013415 828.0738
    8.8 819.79 0.013281 819.8148 851.4237 0.013413 827.9552
    8.8 819.85 0.013282 819.8765 851.539 0.013386 826.2964
    8.8 819.85 0.013282 819.8765 851.5828 0.013405 827.4516
    8.8 819.85 0.013282 819.8765 851.4691 0.013398 827.0162
    8.8 819.97 0.013283 819.9383 851.6177 0.013403 827.3198
    8.8 819.97 0.013283 819.9383 851.6197 0.013414 828.0145
    8.8 819.97 0.013283 819.9383 851.4496 0.013431 829.0706
    8.8 820.19 0.013287 820.1852 851.6349 0.013418 828.2941
    8.8 820.19 0.013287 820.1852 851.6473 0.013407 827.569
    8.8 820.19 0.013287 820.1852 851.5227 0.013416 828.1527
    8.8 820.27 0.013288 820.2469 851.7194 0.013409 827.7436
    8.8 820.27 0.013288 820.2469 851.7229 0.013404 827.4314
    8.8 820.27 0.013288 820.2469 851.4994 0.013406 827.5248
    8.8 820.34 0.01329 820.3704 851.7288 0.01342 828.3959
    8.8 820.34 0.01329 820.3704 851.7766 0.013423 828.5816
    8.8 820.34 0.01329 820.3704 851.5989 0.013419 828.3083
    8.8 820.34 0.01329 820.3704 851.8037 0.01344 829.6118
    8.79 820.46 0.013292 820.4938 851.8261 0.013428 828.8682
    8.79 820.46 0.013292 820.4938 851.642 0.013422 828.5389
    8.79 820.46 0.013292 820.4938 851.8131 0.013424 828.6248
    8.79 820.46 0.013292 820.4938 851.8047 0.013425 828.6819
    8.79 820.46 0.013292 820.4938 851.6625 0.013436 829.368
    8.79 820.46 0.013292 820.4938 851.7929 0.013425 828.7234
    8.79 820.52 0.013293 820.5556 851.8273 0.013423 828.6031
    8.79 820.52 0.013293 820.5556 851.6894 0.013417 828.215
    8.79 820.52 0.013293 820.5556 851.7731 0.013426 828.7631
    8.79 820.53 0.013293 820.5556 851.8468 0.013426 828.7893
    8.79 820.53 0.013293 820.5556 851.6481 0.013418 828.2448
    8.79 820.53 0.013293 820.5556 851.8108 0.013422 828.5355
    8.79 820.65 0.013295 820.679 851.8403 0.013421 828.4353
    8.79 820.65 0.013295 820.679 851.6998 0.013429 828.9343
    8.79 820.65 0.013295 820.679 851.7599 0.013426 828.7488
    8.79 820.74 0.013296 820.7407 851.8605 0.013452 830.3404
    8.79 820.74 0.013296 820.7407 851.7169 0.013452 830.3733
    8.79 820.74 0.013296 820.7407 851.7956 0.013433 829.2275
    8.79 820.74 0.013296 820.7407 851.8305 0.013425 828.7109
  • Hi Nestor,

    The effective shunt resistance on the PCB matters as you found out. Using a DMM, the three quantities should be able to come together, namely voltage, resistance and current. The same applies to the INA of course.

    Between DMM and INA, shunt voltage should agree when measured at the INA input, which you already confirmed.

    We can say with some confidence that the discrepancy in current is due to the delta between ideal and actual shunt value. This can be compensated for by adjusting in calculation.  

    Regards

    Guang