Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roopej/dps-control
Simple application to control DPS-type power supply though Modbus
https://github.com/roopej/dps-control
dps dps5005 linux mac modbus powersupply windows
Last synced: about 23 hours ago
JSON representation
Simple application to control DPS-type power supply though Modbus
- Host: GitHub
- URL: https://github.com/roopej/dps-control
- Owner: roopej
- License: mit
- Created: 2024-10-11T09:46:37.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-08T10:35:02.000Z (about 2 months ago)
- Last Synced: 2024-11-08T11:28:58.368Z (about 2 months ago)
- Topics: dps, dps5005, linux, mac, modbus, powersupply, windows
- Language: Python
- Homepage:
- Size: 693 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# dps-control
## DPS5005 Control ApplicationSimple application with GUI and CLI to control DPS5005 power supply unit. CLI version does not require X or graphical
environment, you can use it in terminal-only hosts. The application has been developed and tested in *Linux* environment.
There should be no problem to run it on macOS and maybe even Windows is possible as the communication with DPS5005
device is handled by the simple minimalmodbus library.![](./images/dps-control-gui.png)
## Configuration
### Requirements
The application has been tested with Python 3.11.9. It will run (probably) on any version where PySide6 dependency can
be installed. The latest Python 3.13 has still problems with PySide and will be supported in near future.### General
Please check first `dps_control.cfg` file. It has very few settings but they are important as you need to tell the
CLI in which tty port your DPS5005 device is and what its slave number is. Configuration file also includes setting for used
baud rate. It is *highly recommended* to use 9600 as other values may not work properly.Also, please set the maximum voltage and current according to your power supply specs.
There is setting `start_power_off` which is True by default. This ensures that starting the dps-control application
first switches power off for safety reasons.### Linux
In Ubuntu the port is usually `/dev/ttyUSB0`
or `/dev/ttyUSB1` or similar. If you do not know which port your device is in, you can plug it in and
check `sudo dmesg` log which shows you where it mounted the device.If you get permission errors about your tty port it might be that your user needs to be added to the `dialout` group.
`sudo usermod -aG dialout $(whoami)`Other Linux distributions may use different tty naming scheme and default user groups, please adjust accordingly.
### macOS
macOS has not been tested yet. Will test in near future.
### Windows
Windows has not been tested yet. Most probably it will require some changes to Modbus communication, mainly closing
port after each call. Will look into it if there is demand for Windows functionality.## Running
You can run the GUI in virtual python environment with script `./setup.sh` in Linux.
This will create `virtualenv` folder, install requirements there run the application. Once your environment is
set up correctly you can also run the application by### GUI
`python main.py`
### CLI
`python main.py --cli`
## Usage
### GUI
The leftmost panel is for connectivity settings and status display. Connectivity fields are not editable in GUI, they
should be set in `dps_control.cfg` configuration file before application launch. The middle panel is for controlling
the output values. You can either turn the dials, drag the bar display up or down or enter the desired value in
the edit box. However, the change is not committed to the DPS5005 device in real-time, you need to hit the *Set* button
to commit the values. Values cannot be set if there is no verified connection to the device.On the right hand side panel the current output voltage, current and power are shown in addition on input voltage.
*Power* button switches DPS5005 output on or off.
### CLI
Type `h` to get help, while there are very few commands available. You can control the voltage and current of the
device by running commands:`v 2.32` This will set the output voltage to 2.32 V
`a 4.23` This will set the output current to 4.23 A
`va 1.2 0.5` This will set the output voltage to 1.2 V and current to 0.5 A
You can toggle power output ON and OFF by `x` command.
If you want to start live monitoring, you can use `l` command
which shows you identical readings as you have on your DPS5005 device screen.## Feedback
Feedback through Github Issues is highly encouraged.
## Disclaimer
You should be familiar with your own power supply and what output settings it is able to withstand.