Skip to main content

htop-style terminal monitor and controller for SCPI bench power supplies (Kiprim DC310S / OWON SPE3103)

Project description

psu-top

htop-style terminal monitor and controller for SCPI bench power supplies. Built for and tested on the Kiprim DC310S (a rebranded OWON SPE3103) over USB serial.

 PSU  KIPRIM DC310S  /dev/ttyUSB0  [CONNECTED]   OUTPUT: ON (CV)
┌─ Voltage ──────────────────────────────────────────────────────────┐
│  18.063 V   (set 18.100)                                            │
│                          ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▁▂▃▄▅▆▇█▇▆▅▄ │
└──────────────────────────────────────────────────────────────────────┘
┌─ Current ──────────────────────────────────────────────────────────┐
│   1.077 A   (set 2.100)                                             │
│              ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▁▂▃▄▅▆▇█▇ │
└──────────────────────────────────────────────────────────────────────┘
 Power:  19.45 W
 o Output on/off  v Set voltage  c Set current  r Clear graphs  q Quit

The graphs are rolling, oscilloscope-style strip charts: one sample per column, newest on the right, scrolling left one column per poll. Heights autoscale to the samples currently on screen so low-magnitude signals stay visible.

Install

pip install psu-top

From a checkout, for development:

pip install --user -e .

Usage

psu-top                          # defaults: /dev/ttyUSB0, 115200, 0.3 s poll
psu-top --port /dev/ttyUSB1 --baud 115200 --interval 0.5

Keys: v set voltage, c set current, o toggle output, r clear graphs (empties the trace and rescales fresh), q quit. Values are clamped to 0-30 V / 0-10 A before sending.

Protocol notes (Kiprim DC310S, FW V5.2.0)

  • 115200 8N1 over the built-in CH340 USB serial adapter.
  • Commands MUST be terminated with CR LF (\r\n). LF alone gets no response from this firmware, although other documentation claims LF suffices. Responses end with CR LF. Invalid commands return ERR.
  • Commands used: *IDN?, OUTP?, OUTP <0/1>, VOLT?, VOLT x.xxx, CURR?, CURR x.xxx, MEAS:VOLT?, MEAS:CURR?.
  • CV/CC display is derived (measured current at/near the limit means CC); the device has no documented mode query.
  • Command reference: https://github.com/maximweb/kiprim-dc310s

Linux note: brltty steals CH340 ports

On Ubuntu, brltty claims CH340 adapters and detaches ttyUSB0. Fix:

sudo systemctl mask brltty-udev.service
sudo systemctl disable --now brltty.service

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psu_top-0.1.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

psu_top-0.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file psu_top-0.1.0.tar.gz.

File metadata

  • Download URL: psu_top-0.1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for psu_top-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3dd36503b82171172ea6600da3a6f49e0b6b3c4fac3aa69b469f7f2eb64b3fcf
MD5 ab0606353a043ff04ec49cb9d3ec744a
BLAKE2b-256 fee26de232182f58666a039e04011c5db670c5e28bc42125710fa644a91574d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for psu_top-0.1.0.tar.gz:

Publisher: publish.yml on Nero7991/psu-top

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file psu_top-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: psu_top-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for psu_top-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 775fa28b6bf9656ddc4f20a4c911a861e4e0781a30aa599e3914e5be0d489db9
MD5 d4eabc02b54d54127e9c1ce6314ca24d
BLAKE2b-256 7976bf7a93042ef9a74170f1af8ec098ce9356f3a512d837b1dad6473f05b814

See more details on using hashes here.

Provenance

The following attestation bundles were made for psu_top-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Nero7991/psu-top

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page