|
Post by lbendlin on Feb 6, 2019 6:55:22 GMT -8
How long does it take for the INA3221 to react to changing input conditions? I am measuring battery voltage with solar charging applied, then remove the solar cells and measure battery voltage again. If I do that immediately one after the other I still get the same measurement. If I add a 1 second delay I get the expected results.
What's the shortest delay I should use?
|
|
|
Post by SDL on Feb 6, 2019 18:03:27 GMT -8
Lutz,
Here is the information from the INA3221 Specification. It depends on how you have programmed it and other considerations:
Device Functional Modes (continued) 8.4.2.2 Averaging and Conversion-Time Considerations The INA3221 has programmable conversion times for both the shunt- and bus-voltage measurements. The selectable conversion times for these measurements range from 140 μs to 8.244 ms. The conversion-time settings, along with the programmable-averaging mode, enable the INA3221 to optimize available timing requirements in a given application. For example, if a system requires data to be read every 2 ms with all three channels monitored, configure the INA3221 with the conversion times for the shunt- and bus-voltage measurements set to 332 μs. The INA3221 can also be configured with a different conversion-time setting for the shunt- and bus-voltage measurements. This approach is common in applications where the bus voltage tends to be relatively stable, and allows for the time focused on the bus voltage measurement to be reduced relative to the shunt-voltage measurement. For example, the shunt-voltage conversion time can be set to 4.156 ms with the bus-voltage conversion time set to 588 μs for a 5-ms update time. There are trade-offs associated with the conversion-time and averaging-mode settings. The averaging feature significantly improves the measurement accuracy by effectively filtering the signal. This approach allows the INA3221 to reduce the amount of noise in the measurement caused by noise coupling into the signal. A greater number of averages allows the INA3221 to be more effective in reducing the measurement noise component. The trade-off to this noise reduction is that the averaged value has a longer response time to input-signal changes. This aspect of the averaging feature is mitigated to some extent with the critical-alert feature that compares each single conversion to determine if a measured signal (with noise component) has exceeded the maximum acceptable level.
BP
|
|
|
Post by lbendlin on Feb 8, 2019 16:57:34 GMT -8
Interesting. So maybe the issue is with Python on the Pi somewhere. If I read so close after instantiation I get much higher current values than when I read after a one second pause. I don't help it by abandoning and then reinstantiating the INA3221 every five minutes, but I can't justify keeping the app running at all times.
|
|
|
Post by SDL on Feb 10, 2019 10:37:46 GMT -8
Are you sure it is worth it turning the INA3221 off?
BP
|
|
|
Post by lbendlin on Feb 10, 2019 11:33:48 GMT -8
no, not really. I'll try without that and see if it improves the readings.
|
|