Electronic – Do current / power monitoring ICs (e.g. INA219) allow frequent re-reading

datasheeti2cpowersensingsensor

I'm looking at the datasheet for the Texas Instruments INA219 and on page 20 it shows a table for "Shunt ADC Resolution/Averaging", which describes the ADC resolution and averaging settings which can be applied, along with their conversion times.

I'm trying to work out how frequently I can re-read the power value computed by the sensor IC.

As an example, the 12-bit resolution single-sample option (bits: 0X11) has a listed conversion time of 532μs (which is actually listed in the electrical characteristics with a maximum of 586μs). There's then a minimum convert input low time of 4μs, and the time it takes to communicate via I2C (should be sub-microsecond if I'm using high-speed mode).

So, in conclusion, should I expect to achieve 1800 3000 actual sensor readings per second minimum in such a configuration? Or is this likely a more marketing-friendly rate?

Also, as a side note, I notice that configuration options 0X11 and 1000 both result in 12-bit resolution and single-sampling, with the same read rate, but with a difference in which ADCs are used – is there a reason to pick one option over the other?

Best Answer

First, your estimation of the speed of the I2C bus is off. 1uS is one cycle at 1MHz, and the I2C bus in high speed mode is only 2.56MHz maximum. So in 1uS you will be able to transfer under 3 bits over the I2C bus. In 4uS you will only get about 10 bits over the bus, so not enough to read a 12 bit value + transaction overhead.

I have worked with this part before, and you can read it that fast. Use short traces and don't add too much (or any) capacitance between Vin+ and Vin-.

The 0X11 and 1000 settings use the same ADC, the "ADCx" in the table are bit names, not different converters. The two settings are the same, because it appears that clearing ADC4 reduces the resolution by a number of bits by 3-[ADC2...ADC1] while setting it increases the number of averaged samples by 2^[ADC3...ADC1].