| name | kiprim-psu |
| description | Use when controlling a KIPRIM DC310S or DC605S bench power supply (rebranded OWON SPE3103/SPE6053) connected over USB serial — reading voltage/current/power, setting output setpoints or OVP/OCP limits, enabling/disabling the output, or logging measurements from a script or the shell. |
KIPRIM DC310S / DC605S bench PSU control
Overview
kiprim_psu.py drives a KIPRIM DC-series bench power supply over its CH340
USB-serial bridge. It auto-detects the model from *idn? and sets the guard
ceilings to match (DC310S = 30 V/10 A, DC605S = 60 V/5 A). Only pyserial is
required; the macOS CH340 driver (AppleUSBCHCOM) is built in, so no driver
install is needed.
Protocol: 115200 baud 8N1, command terminated with LF, ASCII response
terminated with CRLF, case-insensitive, invalid command returns ERR.
Tool: kiprim_psu.py in this skill directory.
Invoke: python3 ~/.claude/skills/kiprim-psu/kiprim_psu.py <command>
Safety
- The output is NEVER enabled without confirmation: both
output on and a
raw command that enables the output prompt unless --yes is passed.
set-voltage / set-current are rejected above the model ceiling, or above
a tighter --max-voltage / --max-current guard you pass; NaN, infinity and
negatives are refused.
raw sends a verbatim SCPI command and otherwise bypasses the setpoint
guards, use it deliberately.
- Setting setpoints while the output is OFF is safe and energizes nothing.
Verify with readback before enabling.
Quick reference
| Command | Purpose |
|---|
status [--json] | model, setpoints, OVP/OCP limits, live V/I/P |
measure [--json] | live voltage / current / power |
get <key> | one raw value: voltage, current, vlimit, climit, mvoltage, mcurrent, mpower, output, idn |
set-voltage <V> | set voltage setpoint (guarded) |
set-current <A> | set current setpoint (guarded) |
set-vlimit <V> / set-climit <A> | set OVP / OCP protection |
output on|off [--yes] | enable/disable output (confirm before enabling) |
monitor [--interval S] [--duration S] [--csv F] | poll V/I/P in a loop, optional CSV |
raw "<cmd>" | send an arbitrary SCPI command |
Global flags: --port (default: auto-detect the CH340), --max-voltage,
--max-current, --baud. Run --help for details.
Typical: give a current, then measure
psu="python3 $HOME/.claude/skills/kiprim-psu/kiprim_psu.py"
$psu set-current 0.5
$psu set-voltage 5.0
$psu output on --yes
$psu measure
$psu output off
Scriptable single values: $psu get mcurrent prints just the measured amps.
Common mistakes
- Two CH340 devices attached at once → auto-detect refuses; pass
--port /dev/cu.usbserial-XXXX.
--json applies only to status and measure, and goes AFTER the
subcommand (... measure --json).
- This tool controls only the PSU's CH340 port. Other USB-serial instruments
(e.g. on an FTDI bridge) are untouched; pass
--port to be explicit when
several serial devices are attached.