Python library and CLI tools for DL24 electronic load device.
It is recommended to set a virtual Python environment up before installing packages.
virtualenv env
source env/bin/activate
pip install -U git+https://github.com/KrystianD/dl24-electronic-load
tools.manage
module is used to send commands to the DL24 device over serial port link.
# Read settings and measurements
dl24-manage -p /dev/ttyUSB0 read
# Set the parameters up and start
dl24-manage -p /dev/ttyUSB0 set-current 10
dl24-manage -p /dev/ttyUSB0 set-voltage-cutoff 10.7
dl24-manage -p /dev/ttyUSB0 enable
Command | Description |
---|---|
set-current <amps> |
set discharging current |
set-voltage-cutoff <voltage> |
set voltage at which discharging will stop |
set-timer <seconds> |
set maximum discharging time |
enable |
enable discharger |
disable |
disable discharger |
reset |
reset cumulative statistics |
read -f [text,json] |
read current settings and measurements |
$ dl24-manage -p /dev/ttyUSB0 read -f json
{
"enabled": true,
"voltage": 11.809,
"current": 9.999,
"energy": 19.841,
"charge": 238.5,
"time": "01:59:03",
"temperature": 35,
"current_limit": 10.0,
"voltage_cutoff": 10.7,
"timer": "00:00:00"
}
tools.monitor
module displays real-time discharging data and can save discharging charts.
# View real time measurements
dl24-monitor -p /dev/ttyUSB0
# View real time measurements and save to test.csv file
dl24-monitor -p /dev/ttyUSB0 -o test.csv
dl24-monitor -p /dev/ttyUSB0 -o test.csv --append
$ dl24-monitor -p /dev/ttyUSB0
12.06 V | 10.00 A | 120.67 W | 91.30 Wh | 7.51 Ah | 0d 00:45:05 | 37 °C
tools.plotter
module plots charts using matplotlib from the CSV file saved with tools.monitor
.
python -m tools.plotter test.csv