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 Sample data

Part Number: INA238
Other Parts Discussed in Thread: SYSCONFIG, INA226

Tool/software:

Hello Team,

We're using INA238 to measure the bus voltage.To implement code, i got some driver from ASC-STUDIO-INA238 and ported the INA238_getVBUS_V part alone to Simplelink . Since the hardware is yet to be received, i just wanted to test if the calculations in the code is fine. But i'm not sure what could be the hex data for the VBUS voltage?

Can you please give me some examples for the same?

Thanks in advance.

  • Mp,

    Thank you for your patience. Due to the U.S. holiday, the team is out of the office, but will reply when we return on Tuesday, 1/21.

    Louis

  • Hello Mp,

    There are actually some examples in the datasheet that have example hex values and their calculated real world values. This all in section 8.2, which shows a typical application with a design example. The calculated return values are in section 8.2.2.5:

    Note that this example shows the decimal version of the VBUS result, which in hex would be: 0x3C00.

    Regards,

    Mitch

  • Hello Team,

    We have received the hardware, just started testing. So initially i wanted to check for manufacturer or device id, which will be predefined. I just directly wrote 0x3F or 0x3E and read the data. But i'm getting only 0s.

    Can you please tell if there is any configuration required to read these predefined data as well?

    Thank you

  • Hello Mp,

    No, there is no configuration required before being able to read these registers. It would be good to look at a scope shot of the communication to make sure all the logic levels and timing requirements are within spec. Also, if you are interested, you can look over or use our example code via SysConfig, found here:

    https://dev.ti.com/sysconfig/index.html?product=ascstudio&module=/ti/sensors/currentsensor/INA238

    SysConfig helps generate C code based on your desired configuration, and also has convenient functions for reading and parsing register data.

    Regards,

    Mitch

  • Hello Mitch,

    Okay got it.

    We tried probing the issue, The ACK bit is high(NACK) from the slave.

    We have connected this INA238 chip with a isolator as below

    We checked the slave address and the voltage as well, everything seems to be fine and firmware is also right(works for other slaves). But still not sure what could be the reason for NACK.

    Could you please help us to debug this further?

    Thank you.

  • Hello Mp,

    The problem is most likely a logic level issue between the Isolator and the INA. Check the logic thresholds (especially logic low thresholds) to make sure your isolator is compatible. Note that most isolators have different specs for each side of the isolator. When using an isolator, it is usually best to put a cap to GDN on the communication lines on both sides of the isolator (~33pF). I have seen this fix the communication problem on multiple occasions. Here is a reference design you can look at: https://www.ti.com/tool/TIDA-01608.

    If the isolator is not compatible, you can get a different isolator, or use logic level shifters on the I2C lines to fix the problem. One fairly quick test you could do to see if this is the problem is swap out the INA238 with the INA226 and see if that works. The INA226 has wider logic tolerances than the INA238, as the INA238 is designed to be compatible with 1.8V logic circuits.

    Regards,

    Mitch