Since version 0.3.0 of the opendaq-python library, it includes an additional utility that facilitates calibration and testing of equipment.
This utility was originally designed to be used during the assembly and testing of the hardware, but it may be useful for any user of the equipment.
The opendaq-utils tool is installed automatically with the rest of the package, and is therefore automatically referenced in the PATH of the operating system to allow calling directly from the command line in any folder of the system.
Once the opendaq library has been istalled in the system, the script can be called directly from command promt:
The script needs some arguments and uses sub-commands to control the specific actions to be executed:
Usage: opendaq-utils [-h] [-p PORT] [-m METER] (info, calib, serial, test, set-voltage)
Optional arguments: -h, --help show help message -p PORT, --port PORT select serial port (default: /dev/ttyUSB0) -m METER, --meter METER Use a digital multimeter for fully automated test Subcomands: info Show device information and versions calib Calibrate the devices test Test device calibration set-voltage Set DAC voltage serial Read or write the serial number [opendaq-utils calib] optional arguments: -l, --log generate log file -r, --reset reset the calibration values -d, --dac Apply only DAC calibration and exit -f FILE, --file FILE Select fiel source to load DAC parameters (default: calib.txt) -s, --show Show calibration values -a, --auto Use the external USB multimeter to perform automated calibration [opendaq-utils test] optional arguments: -l, --log generate log file -a, --auto Use the external USB multimeter to perform automated calibration [opendaq-utils set-voltage] optional arguments: -i, --interactive Interactively ask for voltage values [opendaq-utils serial] optional arguments: -w SERIAL, --write SERIAL Write a new serial number
Please note that for calibrating the device, you should follow these instructions:
You will need an external multimeter or any instrument capable of reading voltages.
All the analog inputs will be calibrated, as well as the analog output (DAC). The easiest way is to connect all of them in between (all the AIN and the DAC together).
Reset the old calibration:
opendaq-utils calib -r.
Apply some different output voltages (
opendaq-utils set-voltage -i) and anotate them in a file (
calib.txt). They will be used for DAC calibration.
Execute full calibration script:
opendaq-utils calib -l. Using the values from the file, and if the DAC output is correctly connected to all the inputs, the system will calibrate itself.
You can execute a test to check the accuracy of the new calibration:
opendaq-utils test -l