I'm using a INA233 from an INA233EVM Kit.
I connected the board to a Mikrocontroller (nRF9160) via I2C.
The chip runs at 3.3V and monitors the power supply of the nRF9160 (VBUS also 3.3V, shunt 100mOhm, I between 25µA and 200mA).
I've setup to read VBUS and VSHUNT every 0.588ms, no average filter.
Except reading EIN that works well.
But EIN behaves very strange. I tried out both modes, with "READ_EIN Autoclear" enabled and not, but both modes don't operate well.
it works several times reading EIN, but sometimes, it seems to stick to old values (even with autoclear or explicitly CLEAR_EIN). That may occurs sometimes for 1 read sometimes for 2 or 3.
Afterwards, you either get "valid new values" (means sample counter and time are matching the configure frequence) or "continued values" (means, the sample counter is pretty high and seems to be not related to the time period since the last (sticky) read). I also read status register (INPUT, CML, MFR) but they never indicated an error nor warning.
Questions:
- are there some special preconditions which must be meet to read EIN?
- are some conditions under reading EIN doesn't clear EIN in "autoclear" mode?
Example
bat
I 19.925 : INA233 STATUS OK
I 19.925 : INA233 3305 mV (BUS)
I 19.925 : INA233 420 µV (SHUNT)
I 19.925 : INA233 4200 µA
I 19.925 : INA233 14375 µW
I 19.925 : INA233 EIN 4777865, samples 651903, (rollovers 72)
I 19.926 : INA233 4375 µW / 1323 µA, 718868 ms (906 samples/s)
I 19.926 : INA233 3145 mWs 951 mAs
I 19.926 : 3305 mV
OK
bat
I 24.415 : INA233 STATUS OK
I 24.415 : INA233 3303 mV (BUS)
I 24.415 : INA233 270 µV (SHUNT)
I 24.415 : INA233 2925 µA
I 24.415 : INA233 9375 µW
I 24.415 : INA233 EIN 4777865, samples 651903, (rollovers 72)
I 24.415 : INA233 4375 µW / 1324 µA, 4490 ms (145189 samples/s)
I 24.415 : INA233 19 mWs 5 mAs
I 24.415 : 3303 mV
OK
(about 4.4s later, reading the same values from EIN)
bat
I 62.469 : INA233 STATUS OK
I 62.469 : INA233 3302 mV (BUS)
I 62.469 : INA233 332 µV (SHUNT)
I 62.469 : INA233 3325 µA
I 62.469 : INA233 11250 µW
I 62.469 : INA233 EIN 253337, samples 34574, (rollovers 3)
I 62.469 : INA233 4375 µW / 1324 µA, 38126 ms (906 samples/s)
I 62.469 : INA233 166 mWs 50 mAs
I 62.469 : 3302 mV
(here next read returns valid data)
bat
I 68.542 : INA233 STATUS OK
I 68.542 : INA233 3303 mV (BUS)
I 68.542 : INA233 277 µV (SHUNT)
I 68.542 : INA233 2775 µA
I 68.542 : INA233 9375 µW
I 68.542 : INA233 EIN 40418, samples 5507, (rollovers 0)
I 68.542 : INA233 4375 µW / 1324 µA, 6072 ms (906 samples/s)
I 68.542 : INA233 26 mWs 7 mAs
I 68.542 : 3303 mV
OK
bat
I 55.674 : INA233 STATUS OK
I 55.674 : INA233 3302 mV (BUS)
I 55.674 : INA233 237 µV (SHUNT)
I 55.674 : INA233 1475 µA
I 55.674 : INA233 8125 µW
I 55.674 : INA233 EIN 578433, samples 79015, (rollovers 8)
I 55.674 : INA233 4375 µW / 1324 µA, 87133 ms (906 samples/s)
I 55.674 : INA233 381 mWs 115 mAs
I 55.674 : 3302 mV
OK
bat
I 58.409 : INA233 STATUS OK
I 58.409 : INA233 3302 mV (BUS)
I 58.409 : INA233 215 µV (SHUNT)
I 58.409 : INA233 2150 µA
I 58.410 : INA233 6875 µW
I 58.410 : INA233 EIN 18232, samples 2480, (rollovers 0)
I 58.410 : INA233 4375 µW / 1324 µA, 2735 ms (906 samples/s)
I 58.410 : INA233 11 mWs 3 mAs
I 58.410 : 3302 mV
OK
bat
I 76.684 : INA233 STATUS OK
I 76.684 : INA233 3302 mV (BUS)
I 76.684 : INA233 222 µV (SHUNT)
I 76.684 : INA233 2225 µA
I 76.685 : INA233 6875 µW
I 76.685 : INA233 EIN 18232, samples 2480, (rollovers 0)
I 76.685 : INA233 4375 µW / 1324 µA, 18347 ms (135 samples/s)
I 76.685 : INA233 80 mWs 24 mAs
I 76.685 : 3302 mV
OK
(here too few samples)
bat
I 84.622 : INA233 STATUS OK
I 84.622 : INA233 3303 mV (BUS)
I 84.622 : INA233 447 µV (SHUNT)
I 84.622 : INA233 4475 µA
I 84.622 : INA233 14375 µW
I 84.622 : INA233 EIN 121539, samples 16638, (rollovers 1)
I 84.622 : INA233 4375 µW / 1324 µA, 7938 ms (2095 samples/s)
I 84.622 : INA233 34 mWs 10 mAs
I 84.623 : 3303 mV
OK
(next too many samples)