5
\$\begingroup\$

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?

\$\endgroup\$
3
  • \$\begingroup\$ This IC is flexible with tradeoffs between 12bit rates thru to 9 bit rates. 1st define your requirements then make your choices and iterate specs until you have all your requirements and priorities clearly understood. again define 1st= Cost vs performance vs functions.... Looking at the datasheet example -15dB at 3kHz an additional filter is needed to meet your SNR spec \$\endgroup\$
    – D.A.S.
    Commented Nov 17, 2016 at 1:04
  • \$\begingroup\$ how did you get 3000 samples/s out of 538 us conversion rate? I got about 1800 s/s... and if you want to get computed power, it will be at least half of that. \$\endgroup\$ Commented Nov 17, 2016 at 1:46
  • \$\begingroup\$ @AliChen You're right, I was tired when I wrote this. \$\endgroup\$
    – Polynomial
    Commented Nov 17, 2016 at 11:21

1 Answer 1

2
\$\begingroup\$

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].

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.