dp100-studio

Native Linux app (GTK4/libadwaita) and Rust protocol library for the ALIENTEK DP100 USB-C bench power supply

Rust created updated
  • alientek
  • dp100
  • gtk4
  • hid
  • libadwaita
  • linux
  • power-supply
  • rust
readme · slastra/dp100-studio

DP100 Studio

A native Linux app for the ALIENTEK DP100 USB-C bench power supply, built with GTK 4 and libadwaita.

[!WARNING] Early development. The protocol library, CLI and desktop app work: live readouts and graph, controls, presets, logging and sequences. Packaging is next.

What's here

Crate What License
dp100 Protocol library and dp100 command-line tool MIT OR Apache-2.0
dp100-studio The desktop app (in progress) GPL-3.0-or-later

The protocol is documented in docs/PROTOCOL.md.

Device access

The DP100 shows up as a hidraw node that only root can open. Install the udev rule so the logged-in user can:

sudo install -m 644 data/udev/70-dp100.rules /etc/udev/rules.d/
sudo udevadm control --reload

Then unplug and replug the DP100. Put it in USBD mode (double-tap ◀ on the panel) so it talks to the computer.

App

cargo run -p dp100-studio              # finds the DP100 on its own
cargo run -p dp100-studio -- --simulate  # a simulated DP100, no hardware needed

It connects read-only: opening the app never changes anything on the supply. Turning the output on always asks first; turning it off never does, and F9 does it from anywhere. Only one program can talk to the DP100 at a time, so the app waits while the CLI has it and connects as soon as it is free.

While the app is connected the DP100's own buttons are locked (the firmware does this whenever a computer is polling it). Use Release Front Panel in the menu to hand the panel back, and Reconnect to take it again.

Sequences

A sequence is a list of steps: set the voltage and current, turn the output on or off, wait, ramp a setpoint, wait until a measurement meets a condition (say, current below 50 mA for 30 s), and repeat blocks. They're edited on the Sequences page and stored as TOML; see examples/sequences for the format.

Before a run, every step is checked against the DP100's protection trips, its range, and the sequence's own limits. A step above any of them is an error, not something quietly clamped. A run stops at once on Stop, F9, a protection trip, lost input power, an unplug, or the output being changed from elsewhere, and then turns the output off unless the sequence says to leave it.

CLI

cargo run -p dp100 --features cli -- status
input    9.10 V (max output 8.81 V)
output   off  0.000 V  0.000 A  0.000 W  [off]
preset   0  set 2.49 V 0.500 A  ovp 30.50 V  ocp 5.050 A
temp     28.1 / 27.6 °C   5V rail 5.07 V   fault ok

dp100 --help lists the rest: watch streams measurements at up to 100 Hz, set changes setpoints, on asks before it enables the output.

Safety

The library never changes device state on its own. Opening, reading and watching send only read requests; setpoint changes leave the output as it was; on is never implied by anything else. Even so, this is unofficial software driving a power supply. Check what's connected before you enable the output.

Building

Rust 1.88 or newer. The library needs nothing else. The app needs GTK 4.14 and libadwaita 1.5 or newer.

cargo test --workspace

Credits

The protocol was pieced together by others first; see docs/PROTOCOL.md.

Not affiliated with or endorsed by ALIENTEK. DP100 and ALIENTEK are trademarks of their respective owners.