koradctl - Power Supply Control Utility and Library
koradctl is a simple python library to support the control and automation of Korad KAxxxxP series power supplies.
These supplies are also rebadged as other brands including Tenma and Vellerman (see here for a more complete list).
koradctl has been tested with bench power supplies that respond with the following firmware identification.
Please let me know if you have successfully used koradctl with other power supplies.
TENMA 72-2540 V2.1
Install
pip install koradctl
Usage
# Output off
koradctl -e off
# Toggle the output
koradctl -e toggle
# 12v, 400mA, Output on, Monitor with readings once every 10 seconds
koradctl -v 12 -i 0.4 -e on -M -f 10
# 3.3v, 250mA, OCP on, OVP off, Output on, Monitor once
koradctl --ocp on --ovp off -v 3.3 -i 0.25 -e on -m
# 5v, 150mA, Output on, Monitor with default interval, Turn output off on ^C
koradctl -v 5 -i 0.15 -e on -M -o
# further usage information:
koradctl --help
Power Supply API
- Misc
get_identity()is_tested()get_status()
- Output State
get_output_state()set_output_state(enabled)
- Voltage and Over Current Protection
get_ovp_ocp_state()set_ocp_state(enabled)set_ovp_state(enabled)
- Setpoint Control
- Voltage
get_voltage_setpoint()set_voltage_setpoint(voltage)
- Current
get_current_setpoint()set_current_setpoint(current)
- Voltage
- Output Readings
get_output_voltage()get_output_current()get_output_power()get_output_readings()
Development Setup
virtualenv -p python3 venv
. venv/bin/activate
./setup.py develop
Todo
- Local configuration file
- Default Voltage / Current setpoint
- Voltage / Current limits
- Monitor interval
Metadata
Release files for koradctl 0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| koradctl-0.8.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| koradctl-0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / koradctl-0.8.tar.gz
| Download URL | koradctl-0.8.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
973ad92a0476f22a12e1a79be76676d8fbd0cb8b77845aff2335547ce8717023
|
|
BLAKE2b-256 checksum How to use checksums |
41f26b82284094b85beb2605fa52d0e88b570154db575793ef558fe1a2862fa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / koradctl-0.8-py3-none-any.whl
| Download URL | koradctl-0.8-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29693a98f902a9e0febc31ac5dd56df8ce0e68b5a76c28cf95c376a5d8af4ed9
|
|
BLAKE2b-256 checksum How to use checksums |
197a509f7cb75b3d25b2901fb4907134dc358e9b9b722968502c1958a871a8b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|