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: INA228

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

Sysconfig is very confusing. I want some clarification on which registers to be configured to read current and power from the sensor,

also the calculations. 

  • Hello Vishal,

    Sorry that you found SysConfig confusing, here is a small tutorial on how to use it, hopefully this helps:

    1. Access the INA228 SysConfig from this link: https://dev.ti.com/sysconfig/index.html?product=ascstudio&module=/ti/sensors/currentsensor/INA228
      1. This link will automatically add the device to the project
    2. Each writable register setting in the datasheet register map can be changed from the SysConfig main window. 
      1. If you don't know what a setting means, you can click the "?" box next to the field name, or go to the device datasheet for more information
    3. When done setting all the options how you want them, you can save the code files with the save icon
    4. When using the code, look in the INA228.c or .h files to find helpful functions for communicating with the device

    As for your specific questions:

    If you want to read the current and power from the sensor, you'll need to:

    1. Make sure conversions are enabled for that channel in the "MODE" field
      1. Make sure that the ADCRAGNE is set appropriately based on your shunt resistor and max current
    2. Set the desired conversion times and averaging (VBUSCT, VSHCT, VTCT, AVG)
    3. Set the SHUNT_CAL and CURRENT_LSB values based on the datasheet equations
    4. Set any other settings and features as desired

    If you would like help with the SHUNT_CAL and CURRENT_LSB calculations, you can use our online tool found here: https://www.ti.com/tool/download/SBOR021. This tool goes hand in hand with this app note: https://www.ti.com/lit/pdf/sboa511

    Please let me know if you have any further questions.

    Regards,

    Mitch

  • hello Mitch,

    Thankyou for the help..!

    Want to check can we use INA228 directly without this sysconfig software. 

    Like in the case of DAC, TI provided some basic registers like (config, gain and out0) such that I can work with out0 and see DAC is working.

    likewise, as of now I don't want full driver. I just want to check current and power (a basic test) with custom software.

    if the registers need to be configured and calculations provided I can do it on my own.

    Thanks,

    vishal.

  • Hey Vishal,

    Correct, you do not need to use SysConfig. The tool is there to help generate C code to expedite the development process if you want it. You can even just use parts of the SysConfig code if you like. For example, you could go into the INA228.c code and copy the functions for parsing data and converting the register values to real world values for power and current. 

    The default settings for the INA228 start a continuous conversion for shunt, bus, and temperature, so after booting it up all you need to do for a basic test is program your SHUNT_CAL value, and ADCRANGE (if changed). Then you can read the result registers and convert based on the LSB. (Note that some result registers have reserved bits at the end of the register that need to be removed).

    Regards,

    Mitch