SPRAD70 March   2023 AM2631 , AM2631 , AM2631-Q1 , AM2631-Q1 , AM2632 , AM2632 , AM2632-Q1 , AM2632-Q1 , AM2634 , AM2634 , AM2634-Q1 , AM2634-Q1

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2Applications
  5. 3Usage With AM263X
    1. 3.1 Obtaining the Register Values to Program in INA226
    2. 3.2 Programming the Register Values Using the Provided I2C Code in INA226
    3. 3.3 Obtaining the Register Values to Program in INA228
    4. 3.4 Programming the Register Values Using the Provided I2C Code in INA228
  6. 4References

Obtaining the Register Values to Program in INA226

  1. Determine the maximum current that needs to be sensed on each of the voltage rails, from the AM263x Sitara™Microcontrollers Data Sheet. (For 1.2 V, it is VDD + VDDARn = 2.5A).
  2. Input this value in the cell “Max Expected Current” on the excel tool.
  3. Based on the input from the previous step, the tool calculates the smallest allowable Current_LSB value “Recommended value of CURRENT_LSB”.
    1. While this value yields the highest resolution, it is common to select a value for the Current_LSB to the nearest round number above this value to simplify the conversion of the Current Register (04h) and Power Register (03h) to amperes and watts, respectively.
  4. Input the desired CURRENT_LSB in “Value of CURRENT_LSB to be used”. Here it is chosen to be 0.0001 (100 µA).
  5. The recommended Shunt Resistor value (Rshunt) from the maximum expected current is provided in “Recommended Rshunt Value should be less than <”.
  6. Choose the nearest available resistor value and input the value in “Actual value of Rshunt used in design”. In this example, 10mΩ resistor is chosen.
  7. The tool calculates the value of the Calibration Register (05h) based on the above inputs and provides it in “Calibration register value in Hex”.
  8. The default value of 0x4127 for Configuration Register (00h) is chosen here, which configures Continuous shunt and bus measurement mode, Shunt voltage conversion time and Bus voltage conversion time to 1.1 ms each and Number of Averages to 1.
    Note: The project can also be modified to monitor multiple voltage rails by defining the I2C Slave addresses of the Instrumentation Amplifier (INA) devices monitoring the other rails and using those addresses in the I2C transactions.
    Note: The Alert pin of the INA device can be connected to a GPIO on the AM263x, which provides a response to a single user-defined event or to a Conversion Ready notification, if desired.