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 INA228

  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 (07h) and Power Register (08h) to amperes and watts, respectively.
  4. Input the desired shunt voltage input range based on the expected maximum current and precision required in "ADCRANGE". Selecting 0 sets it to ±163.84 mV, while selecting 1 sets it to ±40.96 mV.

    Here it is set to "0".

  5. Input the desired CURRENT_LSB in “Value of CURRENT_LSB to be used”. Here it is chosen to be 0.0001A/LSB.
  6. The recommended Shunt Resistor value (Rshunt) from the maximum expected current is provided in “Recommended Rshunt Value should be less than <”.
  7. 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.
  8. The tool calculates the value of the Shunt Calibration Register (02h) based on the above inputs and provides it in “SHUNT_CAL[14:0] in Hex”.
  9. The default value of 0xFB68 for ADC Configuration (01h) is chosen here, which configures Continuous bus voltage, shunt voltage and temperature mode, Shunt voltage conversion time, temperature conversion time and Bus voltage conversion time to 1052 µs each and Number of Averages to 1.