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.

INA238: Issue with Inaccurate Current Information Readings on Current Sensor

Part Number: INA238


Hello,

I am using the INA238 current sensor in my project, but I am encountering an issue. The current readings I get from the sensor are different from the actual values I set. I'd like to detail this issue and seek help from the community.

Firstly, for better understanding, here is a comparative table of the current values I set versus the current readings from the sensor:

Set current (mA)

Reading from INA238

0,00

0,643

1,00

1,533

2,00

2,403

3,00

3,274

4,00

4,144

5,00

5,014

6,00

5,856

7,00

6,755687612

Set Current (mA)

Reading from INA238

0,00

0,633

-1,00

-0,234

-2,00

-1,275

-3,00

-2,336

-4,00

-3,387

-5,00

-4,438

-6,00

-5,479

-7,00

-6,521

-8,00

-7,581

-9,00

-8,623

-10,00

-9,674

Next, I am sharing the snippets of the code I used to configure the INA238. These include some crucial register settings:

Configuration (CONFIG) Register: 0x10

ADC Configuration (ADC_CONFIG) Register: 0xAB6F

Shunt Calibration (SHUNT_CAL) Register: 0x3E8

Shunt Overvoltage Threshold (SOVL) Register: 0x4B00

Diagnostic Flags and Alert (DIAG_ALRT) Register: 0x8001

By the way, we are reading the current from the low-side topology.

our battery pack voltage from 75V to 108V

Rsense = 0.2mOhm

VBus pin is connected with Bat - (Or GND)

Can you help me solve this problem I am experiencing in reading current? Also, I am reading the current correctly as it should be in two out of the three prototypes I have. Could the current sensor be getting damaged for some reason? 

  • Hello Batuhan,

    Thank you for using the TI forum. Can you please confirm the maximum expected current value used for calculations? I'm not sure if your SHUNT_CAL value is correct for your setup. Since you are using ADCRANGE = 1, it's possible that you missed this step of the calculation:

    Also, can you confirm the voltage difference across the IN+ and IN- pins of the device directly? It's possible that there is error from your set current or that the shunt resistor variation is causing an unexpected voltage right at pins of the device. 

    Regards,

    Mitch

  • Hello Mitch,

    Firstly, thank you for your interest and guidance.

    After you mentioned it, we carefully inspected it. We made a mistake in this part of our writing (This was a mistake in our documentation, not in our code.)

    Shunt Calibration (SHUNT_CAL) Register: 0x3E8  --> 0xFA0

    Also our max expected current is 200A  which is a peak current for a duration of less than one second.

    0.2mOhm x 200A  = ±40mV (max voltage between IN+ and IN-)

    Looking forward to your advice

    Best Regards,
    Batuhan

  • Hello Batuhan,

    Ok, thanks for updating me on that, I was also thinking that 0xFA0 should be the value used for calibration. It would be good to verify that the ADCRANGE bit is set to 1 in your code, and I'm guessing that it is.

    The next step would be to confirm the voltage difference across the IN+ and IN- by measuring directly across the pins of the device. This would help rule out various hardware related issues that can cause a different voltage at the IN+ and IN- pins than originally expected. 

    Also, if you could share a snip of the schematic section around the INA238 and supporting passives, then I can help verify that as well. 

    Regards,

    Mitch

  • Hello Mitch, 

    I have checked and confirmed that the ADCRANGE bit is set to 1 in the code I wrote :).

    I currently don't have a faulty INA238 integrated circuit on hand. I will try to find this IC, and if I do, I can conduct measurements and share them with you. I had replaced the IC before when it malfunctioned, and it resolved my issue. This has happened on multiple other boards, so I wrote about it on the E2E forum.

    However, I want to mention that in the broken INA238, even when no current is applied, there is still a voltage present, and it actually shows a current in the INA238. For example, even when there was no current in the circuit, I had read 0.126 mV between IN+ and IN-, and I remember seeing the current as 0.633. Below, I am sharing the schematic that includes the surroundings of the IC.

    Additionally, this morning I subjected a working battery in my possession to an ESD shock using an ESD gun (15kV), but the integrated circuit did not get damaged.

  • Hey Batuhan,

    Since you are seeing the voltage on the IN+ and IN- pins of the device, then that means that the device is working as expected but there is something in the system causing there to be extra voltage on the input pins. I recommend checking the rest of the current path to see what is causing the voltage drop across IN+ and IN-.

    Regards,

    Mitch

  • Hi Mitch,

    When the INA238 integrated circuit is removed from the circuit, there's no voltage across the shunt resistor, and replacing the damaged integrated circuit with a new one resolves the issue. Correct readings can be taken from the integrated circuit then.

    Kind Regards, 

    batuhan

  • Hey Batuhan,

    Ok, in that case it does sound like the devices are getting damaged in your system somehow. The 13KV ESD you used is outside the device spec, so maybe that did damage it or cause it to start to get damaged? It would also be good to monitor for any other conditions that go outside the device maximum specifications that could cause damage.

    Regards,

    Mitch