Control By Design

Electronic Hardware, Embedded Firmware and Control Systems; Design with Intent

English 中文

DROK Voltage Supply Software

This program turns a PC into the front panel of a DROK DKP6012 buck power module (0-60 V / 0-12 A / 720 W) over a USB serial cable. You can set the output voltage and current limit, switch the output on and off, watch the measured voltage and current in real time, run scripted voltage profiles from CSV files, and log everything to CSV for later analysis. It is a Python/Tkinter application; a packaged Windows executable is provided below - no Python install needed.

This is a hobby project that I worked on to make improvements and automation for my other work. If you're interested in doing this yourself, a quick web search will show you that there are also many libraries out there on GitHub that let you automate talking to the DROK controller.

DROK Voltage Supply app, Voltage Supply tab: ON/OFF button, CV/CC lamps, setpoint steppers, red 7-segment measured displays and command log A real bench DC power supply with red 7-segment LED voltage and current readouts

Download

Download the Windows release (compiled executable + sample profiles):

VoltageSupply-win64.zip

The zip contains VoltageSupply.exe (single file, no installer, no Python required) and the profiles/ folder with ready-made test profiles. The app icon and the built-in user manual are bundled inside the executable. Extract the folder and double-click VoltageSupply.exe.

Hardware

The DROK DKP6012 is a bare buck converter module: it needs a DC input supply (10-65 V), its output wires go to your load, and a USB-to-TTL serial adapter (3.3 V logic) connects its UART port to your PC - only three wires (TX, RX crossed, and GND). UART must be enabled once on the module's own front-panel menu (hold SET, go to F3, set it to 00, confirm with OK); after that the module answers at 9600 baud. The program probes candidate COM ports with a real command before auto-connecting, so phantom ports from previously plugged adapters are skipped. The output is always forced OFF when the program connects and again when the window closes.

The DROK DKP6012 buck power module: four-digit LED display, four set buttons, screw terminals, toroidal inductor and heatsink

Application

The window has four tabs, split by function.

Voltage Supply Page

Voltage Supply tab: ON/OFF button, CV/CC lamps, setpoint steppers, red 7-segment measured displays and command log

Run Profile Page

Run Profile tab mid-run: blue profile curve, green logged overlay and red playhead with the run clock in the title

Logging Page

Logging tab: enable checkbox with the open LOG_ file name and a two-row realtime graph of measured and setpoint values

Settings Page

Settings tab: serial connection row, live status line, persisted checkboxes and arrow-button step boxes

Built-in Help

Every screen above is documented in the built-in manual: quick start, step-by-step hardware wiring (including the UART enable sequence and the three-wire connection), each page in detail, the logging CSV format, and creating custom profiles with worked recipes. The Help button opens it in-app with section links.

Built-in help window showing the user manual with its Jump to section links

Sample Profiles

The zip ships ready-made CSV profiles in the profiles/ folder - bench shapes plus automotive/industrial standard tests shaped to the engine's command pace (every hold at least 2 s, every edge a ramp of at least 0.3 s, all verified by an automated validator):

Creating Your Own Profiles

A profile is a plain CSV file with two or three columns per row: time in seconds, voltage in volts, and an optional current limit in amps. Any spreadsheet or text editor can create one - you only list the corners (waypoints) of the shape you want and the program interpolates linearly between them. The Load Profile dialog opens on the sample library; files are validated on load and errors name the offending line.

Getting Started

  1. Wire the module (the 'Hardware' section above) and plug the USB adapter in.
  2. Extract the zip and double-click VoltageSupply.exe - no Python install needed.
  3. The window opens with four tabs. With Autoconnect on (the default) it dials the last-used port by itself; otherwise pick the port on the Settings tab and press Connect, then check the status line reads 'Connected COMx @9600'.
  4. On the Voltage Supply tab type a voltage (e.g. 12) and a current (e.g. 1), press Enter, then click ON. The button turns green, the CV lamp lights and the big red displays show the measured output.
  5. Load a sample profile, tick Loop if you like, press Run Profile and watch the playhead walk the curve while the green trace records what the supply actually did.