Desktop controller for Wanptek DC power supplies via USB/serial (Modbus RTU)
Project description
Wanptek PSU Controller
Desktop application to control a Wanptek DC power supply via USB / serial port. Compatible with Windows, macOS and Linux.
Features:
- Display voltage, current and power in real time
- Adjust voltage and current setpoints
- Enable or disable the output
- Enable or disable OCP (over-current protection)
- Plot measurement history in a live graph window
Interface
The application uses a customtkinter interface with:
- An LCD-style main display
- Two adjustment knobs
- A button bar for Menu, Graph, Lock, OCP and Output control
Requirements
- Python 3.10 or later with
tkinteravailable - A compatible Wanptek DC power supply
- A USB-to-serial adapter recognised by your OS
Installation
Recommended — via pipx (all platforms)
pipx installs the application in an isolated environment automatically, with no need to manage a virtual environment manually.
Install pipx first:
# Windows
winget install pipx
# macOS
brew install pipx
# Debian / Ubuntu
sudo apt install pipx
# Fedora
sudo dnf install pipx
Then install and run the application:
pipx install wanptek-controller
wanptek-controller
Update:
pipx upgrade wanptek-controller
Alternative — via pip with a virtual environment
If you prefer pip, use a virtual environment to avoid conflicts with system packages:
python -m venv ~/.venv/wanptek
source ~/.venv/wanptek/bin/activate # macOS / Linux
.\.venv\Scripts\Activate.ps1 # Windows (PowerShell)
pip install wanptek-controller
wanptek-controller
To launch the application later:
source ~/.venv/wanptek/bin/activate && wanptek-controller # macOS / Linux
Or add an alias to your shell profile (~/.bashrc, ~/.zshrc):
alias wanptek='source ~/.venv/wanptek/bin/activate && wanptek-controller'
From source
Clone the repository and install in a virtual environment:
git clone https://github.com/flkoliv/sw-wanptek-psu.git
cd sw-wanptek-psu
python -m venv .venv
source .venv/bin/activate # macOS / Linux
.\.venv\Scripts\Activate.ps1 # Windows (PowerShell)
pip install -e .
wanptek-controller
Platform notes
Windows
- Install Python 3.10 or later from the official installer and make sure tcl/tk and IDLE is checked
- If PowerShell blocks script execution:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass - Serial ports appear as
COM3,COM4, ...
macOS
- Install Python and tkinter via Homebrew:
brew install python-tk
- Serial ports appear as
/dev/cu.usbserial-XXXXor/dev/cu.SLAB_USBtoUART
Linux
- Install Python and tkinter:
# Debian / Ubuntu sudo apt install python3 python3-venv python3-tk pipx # Fedora sudo dnf install python3 python3-tkinter pipx
- Add your user to the
dialoutgroup to access the serial port:sudo usermod -aG dialout $USER
Reboot or log out and back in for the change to take effect. - Serial ports appear as
/dev/ttyUSB0,/dev/ttyACM0, ...
First-time setup
On first launch:
- Click Menu
- Select the serial port connected to your power supply
- Select the Modbus device address
- Select the baud rate (default: 2400)
- Click Save
The application will then attempt to connect automatically. The status is shown next to the LED indicator (bottom of the knob panel).
Settings are saved to ~/.wanptek_controller/param.
Usage
Main display
Shows:
- Output voltage
- Output current
- Output power
- OCP status
- Output status
Buttons
- Menu — open the serial configuration dialog
- Graph — open the measurement history window
- Lock — enable or disable software control of the setpoints
- OCP — toggle over-current protection
- OUT — enable or disable the PSU output
Voltage / current adjustment
When Lock is active:
- The knobs become interactive
- New values are sent to the power supply
When Lock is inactive:
- The knobs display the current setpoints read-only
Graph
The Graph window shows the last 10 minutes of:
- Voltage
- Current
- Power
Project structure
wanptek_controller/
├── main.py — application entry point
├── PSUModel.py — state and persisted settings
├── PSUController.py — Modbus communication and control logic
├── PSUView.py — graphical interface
├── images/ — icons and logo
└── ressources/ — fonts and sounds
main.py — development shim (calls wanptek_controller.main)
run.pyw — GUI launcher (no console window on Windows)
Troubleshooting
ModuleNotFoundError: No module named 'tkinter'
Your Python installation does not include Tk.
- Windows — reinstall Python with tcl/tk and IDLE checked
- macOS —
brew install python-tk - Linux —
sudo apt install python3-tk(orsudo dnf install python3-tkinter)
PowerShell blocks Activate.ps1 (Windows)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\.venv\Scripts\Activate.ps1
Serial port permission denied (Linux)
sudo usermod -aG dialout $USER
Reboot or log out and back in for the change to take effect.
Application does not connect
- Check that the correct serial port is selected in Menu
- The connection status is shown next to the LED — read the message for details
- Default baud rate is 2400 — adjust in Menu if your device uses a different rate
- Make sure the power supply is switched on
- Check the USB-to-serial cable and driver (CH340, CP210x, FTDI...)
Graph window does not open
The graph only opens once at least one measurement has been received.
License
See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wanptek_controller-0.1.13.tar.gz.
File metadata
- Download URL: wanptek_controller-0.1.13.tar.gz
- Upload date:
- Size: 461.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b790945e0347790929bce9babafc39265e659643758dbdf82bd5fced3adbd1d1
|
|
| MD5 |
71dccc52783adad051434f2e51f02dff
|
|
| BLAKE2b-256 |
85fa28939d2ba339ae88b98cfbb196a9ef65344237bcad1ca912367aef9e505d
|
Provenance
The following attestation bundles were made for wanptek_controller-0.1.13.tar.gz:
Publisher:
publish.yml on flkoliv/sw-wanptek-psu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wanptek_controller-0.1.13.tar.gz -
Subject digest:
b790945e0347790929bce9babafc39265e659643758dbdf82bd5fced3adbd1d1 - Sigstore transparency entry: 1437745697
- Sigstore integration time:
-
Permalink:
flkoliv/sw-wanptek-psu@cea6431e2b6c4348b1b92b3c9874e8fd2e0e3c90 -
Branch / Tag:
refs/tags/v0.1.13 - Owner: https://github.com/flkoliv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cea6431e2b6c4348b1b92b3c9874e8fd2e0e3c90 -
Trigger Event:
push
-
Statement type:
File details
Details for the file wanptek_controller-0.1.13-py3-none-any.whl.
File metadata
- Download URL: wanptek_controller-0.1.13-py3-none-any.whl
- Upload date:
- Size: 471.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb44f74fabd004cc3f8a41d658ff5504bce93d79932b859464f468067d04a41f
|
|
| MD5 |
99c6f9ed688548dd2b2f3c48fa0b8828
|
|
| BLAKE2b-256 |
ae4980e1f1ae566e235437cad9e5ed2402bf76d1d3c377b863ccff91bd1dda0a
|
Provenance
The following attestation bundles were made for wanptek_controller-0.1.13-py3-none-any.whl:
Publisher:
publish.yml on flkoliv/sw-wanptek-psu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wanptek_controller-0.1.13-py3-none-any.whl -
Subject digest:
bb44f74fabd004cc3f8a41d658ff5504bce93d79932b859464f468067d04a41f - Sigstore transparency entry: 1437745706
- Sigstore integration time:
-
Permalink:
flkoliv/sw-wanptek-psu@cea6431e2b6c4348b1b92b3c9874e8fd2e0e3c90 -
Branch / Tag:
refs/tags/v0.1.13 - Owner: https://github.com/flkoliv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cea6431e2b6c4348b1b92b3c9874e8fd2e0e3c90 -
Trigger Event:
push
-
Statement type: