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.

INA237: POWER reading too high?

Part Number: INA237
Other Parts Discussed in Thread: INA228,

Hi!

With CURRENT_LSB=0.001A and Rshunt=0.505,371R and ADCRANGE=1 I get SHUNT_CAL=0x0678.

Then I get the readings, that I copied to the appendix. (nota bene: My MCU converts the 2s-complement values to biased unsigned integers by adding 0x8000.)

When I convert it, then the POWER reading of 0x431B7/521 converts to 0.106W, but I expected not more than 0.025W.

Is equation (4) in section 8.1.2 of the datasheet (page 29) not quite right for ADCRANGE=1?

The other conversions make sense to me...

PS: With higher current (appr. 0.5A) equation #4 works much better.

Thx.

Bye.

appendix:

sample count=521
{431B7/2A9>173 O:0 F:0.000200}                                  P     0.074..    0.106..    0.136W i=58
{1048001/8001>8000 O:FFFF8000 F:0.001250}                  Ushunt     0.000..    0.000..    0.001mV i=66
{11BA660/8B60>8B60 O:FFFF8000 F:0.007812}                       T    22.750..   22.750..   22.750°C i=74
{3A81AB/1CC0>1CBE O:0 F:0.003125}                            Ubus    22.994..   22.998..   23.000V i=82
{1047FE2/8001>7FFF O:FFFF8000 F:0.001000}                       I    -0.001..   -0.000..    0.001A i=90
  • oops... Rshunt is 0.000,505,371R

  • Hello Arne,

    Thank you for using the TI forum.  With the same settings you mentioned above, I calculate a shunt cal of 0x6780, not 0x0678. So maybe that is the problem? You can check your calculation using our configuration tool inside the EVM GUI, even if you don't have an EVM (https://dev.ti.com/gallery/view/4910879/INA228_229_237_238_239EVM_GUI/). Just go to the tab that looks like a gear icon, put in an arbitrary hardware switch setting (since you won't have hardware connected), and then fill in the values you want into the calculator. (If you don't have a specific max current, but have a desired current LSB then you do not need to put in the max expected current value).  (note, Rshunt will be be in mΩ).

    Also, make sure you are using the latest datasheet, as some of the old datasheets do have incorrect equations.

  • Hi Mitch!

    Do u really mean Current_LSB? I set Current_LSB to 0.001A = 1mA.

    And Rshunt is approximately: 0.000,505,371R = 505.371uΩ.

    Then SHUNT_CAL is 819.2*10^6*0.001*0.000505371*4 =1655.999,692,8 ~=~ 0x0678

    How did u compute SHUNT_CAL?

    Are you sure, that Rshunt is in "mR" and not in "R"? I my initial post, Rshunt was in "mR" (but i wrote "R). And in equation (1) Rshunt should be in "R", I think. In the example on page 33: 819.2*10^6*0.0003051758*0.0162 = 4050.000,248,832

    Thx.

    Bye.

  • Oops! I meant shunt cal... I have fixed it above to be less confusing. I meant that R shunt is in mΩ in the online calculator, not the datasheet equations, sorry for that confusion.  

    Also, I accidentally calculated from the INA228 equations, not the INA237... sorry about that, 0x0678 is correct. (turns out that the GUI calculator without and EVM may or may not work based on which device you are using....) I'll look over the values you sent again and see if I can see anything.

  • So, it looks like there might be an error in your power calculation.  Here is my power calculation:

    Register value 0x431B7 to decimal = 274871.  Then convert to power: 274871*0.2*0.001= 54.9742 W

    So maybe this is the problem? Unless I am not seeing your register value properly. 

  • the 0x431B7 is the sum of 521 samples... 54.974,2W/521=0.105,516,...

  • Ok, I missed the summing aspect. Can you send a register dump for a known current for a single measurement case? This way we can see if the calculated power is what is expected.  This will help us see if the error is in the code doing the summing/data collection, or if there is a measurement error due to some hardware factor such as leakage current.

  • 1. ohoh... now i marked it as resolved... can i undo that somehow? because: it is not resolved...

    2. i cant do that experiment for some time... furthermore i had to change the firmware...

    3. but we can assume the best case: minimum power(0x173 or >=0x172.8) and maximum current(1LSB or <1.5LSB)&voltage(0x1CBE or <0x1CBE.8)

  • Hello Arne,

    I am not sure if you can unmark it as resolved.... maybe try the "more" tab and see if you have the option? or try clicking on the checkbox on the far right and see if it gets unmarked.

    I understand that you can't do the experiment now, so once you have finished your firmware and are at a point where you can test the device again then try the experiment.  It's possible that things will work as expected after the firmware change, but come back here if you are still having problems.