A tool to meassure average current with a Qoitech Otii instrument.
This is not approved or supported by Qoitech in any way.
Only tested with Otii FW 1.1.2 and with no access to the protocol description.
The program is quite basic. It turns on the power, optionally waits for one (or both) of the digital inputs to go high or low and then measures the current over a specific time period.
The code is an almost direct port of an experimental python script so not much though has been put into its design. The python code's serial library was too slow running on a raspberry pi so this is the result.
Unexpected answers (like over/under voltage during calibration) is silently ignored.
PRs are happily accepted.
otii_measurement --debug output.log --calibrate --wait-for-GPI1 true \
--timeout 20 --measurement-time 60 \
--unit uA -v 3.3
This calibrates the Otii, waits for GPI to be true/high, then measures the current for 60 seconds and reports it in micro ampere.
The communication log is written to output.log
rustup target add armv7-unknown-linux-musleabihf
sudo apt-get install gcc-multilib-arm-linux-gnueabihf musl-tools
cargo build --target armv7-unknown-linux-musleabihf --release
The file is then in ./target/armv7-unknown-linux-musleabihf/release/otii_measurement