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.

INA226: Select the Rshunt for INA226

Part Number: INA226
Other Parts Discussed in Thread: INA199

Hi team,

The customer uses INA226 to measure the current. The current range is from 2uA to 36mA. 

Q1: Would you explain how to select the Rshunt in detail?

I cannot get the Gain value from the datasheet. 

Q2. On page 5 of the datasheet, Shunt voltage input range is –81.9175 ~81.92. Vsense=(VIN+-VIN-). Is the Shunt voltage input voltage =the Vsense?

If not, what the Vsense range is? What is the shunt voltage input range? I would like to get  the Vsense range for INA226  to select the suitable Rshunt.

  • Hello Mickey,

    Thank you for reaching out on our forum.  Your customer will have accuracy issues for their lower range as the input bias for the INA226 is 10uA.

    The shunt voltage input range you quoted above is the Vsense range.

    As for calculating a shunt resistor, you could use the following method, divide the max Vsense voltage of the INA226 (.08192V) by your max current .036A. This will give you a value of 2.276 ohm.

    According to Figure 1 in the datasheet, the gain is 1 up to ~100KHz.

  • Hello Mickey,

    I edited the above post as I previously made a mistake in it.
  • Hi Patrick,

    Q1. Why will the customer have accuracy issues for their lower range as the input bias for the INA226 is 10uA? Would you explain this?

    Q2. In your previous reply, you said as below:
    "As for calculating a shunt resistor, you could use the following method:
    1. calculate the Current_LSB (equation 2 in the datasheet): (Maximum Expected current)/(2^15)=.036/(2^15)=1.0986x10^-6.
    2. calculate the Rshunt with the largest CAL value 0x7FFF, 32767 (equation 1 in the datasheet): 0.00512/(Current_LSB)/CAL = 0.00512/(1.0986x10^-6)/32767=0.14223
    3. Select the nearest real available rshunt value larger than this."

    I don't quite understand why it is wrong.
    If it is wrong, how to use and understand the equation 1 and equation 2 when I help the customer select the shunt resistor?
    why we cannot use the equation 1 and equation 2 to calculate the Rshunt for the customer's
    applicition?

    Q3. In the traing videos, it shows that the max shunt resistor=(Vout/GAIN)/the max load current,
    so I want to get the Gain values. In the figure 1, the Gain is froo 0dB to -60dB, right? is this the
    close gain?
  • Hello Mickey,

    A1. I say they will have accuracy from input bias, because the error in the output from just input bias can be calculated as the (input bias)/(ideal load without input bias)*100= 10uA/2uA*100 = 500%

    A2. Technically you could use the method I used previously. However that utilizes a very small portion of the input range. Along with using a narrower part of the input range is the issue of using a small resistor. While a small resistor is not necessarily bad for every design, it is not advised for your customer’s operating conditions. A smaller resistor equates to a smaller Vsense voltage which will also make the percent measurement error at the lower current range bigger. In this case, the voltage offset will also contribute a large gain error. Error from offset can be calculated as Vos/(ideal Vsense voltage)*100.

    A3. Yes, you are correct. The gain is 1 (20log(1) =0dB) within the bandwidth of the part or before the 3dB rolloff. Have you watched the following tutorial video? This one covers the programmable current shunt monitors like the INA226. 

    https://training.ti.com/getting-started-current-sense-amplifiers-session-15-programming-power-settings?cu=456802

  • Hi Patrick,

    I still don't understand the differences of the two calculation methods.

    Q1: You said if I use the method that is shown in the datasheet, I only utilizes a very small portion of the input range. Why do I only utilize a very small portion of the input range?

    Q2: I wants to get when I can use the method that is shown in the datasheet and when
    I can use the method that you replied, e.g. 08192V/036A=2.276 ohm?

    Q3: What is the CAL in the Equation 1 of the datasheet? You said its largest value is 0x7FFF,

    Does you mean  Full-scale range is 81.92 mV of the Shunt Voltage Register

    when CAL is 0x7FFF?

  • Hello Mickey,

    A1. I say you would be using a small portion of the input range because the resistance I calculated with the previous method (0.14223Ω) multiplied by the max load current (36mA), yields a Vsense voltage of 0.00512V, which is only 6.5% of the total positive Vsense range going from 0V to 0.08192V.

    A2. Refer to answer A3 below.

    A3. CAL is the decimal value corresponding to the hexadecimal value you will need to set in the calibration register. This should be calculated from Rshunt and the current_LSB, rather than be used to calculate the Rshunt. Larger Cal values allow for a larger current measurement range. If you wanted to get to the correct Rshunt from the original method I outlined above you would need to make one major adjustment in that method which would require a lot of additional work. First you would need to plug in a random value (like 0x7FFF=32767) into Cal, then check what max Vsense value that produced with your Rshunt. Thereupon repeat the aforementioned steps with different Cal values and thereby through empirical analysis (many calculations) eventually arrive at the value I got in the second method I posted.
    If you look at page 25 of the datasheet, the calibration register has 16 bits. However, in the table the most significant bit is labeled with a “ - “. This indicates that this bit is ignored in the processing.
    81.92mV is always the full scale upper bound of the shunt voltage register.
  • Hi Patrick,

    Thanks so much for your help. I still have some questions about the current sensing amp as below:

    Q1. For INA226, as you said, we should use Vsense max value(81.92mV)/I load max value to
    calculate the Rshunt, correct?

    Q2. If my above understanding is correct, I want to know why the datasheet shows the Equal 1 and Equal 2 for us? We can calculate the Rshunt value, then why we still need the e Equal 1 and Equal 2.

    To send the Vsense voltage to the the internal ADC?

    Q3. Compare to INA199, the datasheet cannot show the Vsense voltage range.

    The Vsense voltage is from –81.9175mV to 81.92mV.
    So, how to get the Vsense voltage range for INA199 when I calculate the Rshunt?

    The formula of Rshunt =Vout/GAIN/Iload max value, this is shown in the training video.
    So the Vsense voltage range is Vout/GAIN for INA199, correct? I don't quite understand.
  • Hello Mickey,

    A1.  For the best accuracy you should use the max Vsense value of 81.92mV.  However, if you are more concerned about power dissipated through the shunt, then you may decide to use a lower shunt value.  However, that just means lower accuracy for your measurements as only the lower end of the Vsense range is used due to your expected current range.  Lower current measurements always have a larger percentage of error than higher currents.  See image below for reference.

    A2.  The device still needs a properly set calibration register value to give a meaningful current and power measurement.  Thus, Equations 1 and 2 are still important as Equation 2 provides the current_LSB while Equation 1 gives the Calibration register Value from the previously determine Rshunt and current_LSB.

    A3. The INA199 utilizes a different current shunt monitor architecture.  For analog output devices like the INA199, the formula Rshunt =Vout/GAIN/Iload max value is valid. For digital output devices with internal ADCs, there is usually a fixed Vsense max.

  • Hi Patrick,

    So, the Vsense voltage range is Vout/GAIN for INA199, correct?
  • Hello Mickey,

    Yes, If operated correctly, Vsense=Vout/Gain. However, if Vsense*Gain > Swing to V+ power-supply rail , then Vout = Swing to V+ power-supply rail .