Turn a DP50V5A / DPS5005 programmable power supply into a network-connected instrument using an ESP32.
This project provides:
- REST API
- Web Interface
- mDNS support (
http://psu.local) - Logging
- Preset Control
- OVP / OCP / OPP Control
- Front Panel Lock Control
- Raw Register Access
No modification of the original RuiDeng firmware is required.
- Set Voltage
- Set Current
- Set Voltage + Current
- Output On / Off
- Preset Recall
- Output Voltage
- Output Current
- Output Power
- Input Voltage
- CV / CC Status
- Protection Status
- OVP
- OCP
- OPP
- Brightness Control
- Front Panel Lock / Unlock
- mDNS (
psu.local)
- Start Logging
- Stop Logging
- Clear Logs
- Export CSV
- Raw Register Read
- Raw Register Write
Existing solutions typically require replacing the original RuiDeng firmware.
This project keeps the factory firmware intact and adds a network API using an ESP32.
No ST-Link. No firmware replacement. No risk of bricking the PSU.
- DP50V5A or DPS5005
- ESP32
- 3 jumper wires
The DP50V5A does not officially expose its UART interface externally. The UART pads are located on the display board inside the enclosure.
- Remove power from the DP50V5A.
- Release the four plastic retaining clips on the enclosure.
- Slide the module out of the case.
- Pull off the rotary encoder knob.
- Remove the front faceplate.
With the faceplate removed, locate the four pads directly above the rotary encoder.
They are labeled:
V R T G
Pin definitions:
| Label | Function |
|---|---|
| V | +V |
| R | RX |
| T | TX |
| G | GND |
Connect the UART interface to the ESP32 as follows:
| DP50V5A | ESP32 |
|---|---|
| T (TX) | GPIO16 (RX2) |
| R (RX) | GPIO17 (TX2) |
| G (GND) | GND |
ESP32 DP50V5A
GPIO17 (TX) -----------> RX
GPIO16 (RX) <----------- TX
GND ----------- GND
HardwareSerial PSU(2);
PSU.begin(
9600,
SERIAL_8N1,
16, // RX
17 // TX
);UART configuration:
9600 baud
8 data bits
No parity
1 stop bit
- Solder wires to the UART pads.
- Route the wires out of the enclosure.
- Reinstall the faceplate.
- Reinstall the rotary encoder knob.
- Slide the module back into the enclosure until all four retaining clips engage.
- The ESP32 and DP50V5A must share a common ground.
- Communication uses Modbus RTU over UART.
- The original RuiDeng firmware remains completely stock.
- No ST-Link, SWD access, or firmware replacement is required.
- Clone repository
git clone https://github.com/AtifUsmani/dp50v5a-api.git-
Configure WiFi credentials
-
Build and flash firmware
pio run
pio run -t upload- Upload web interface
pio run -t uploadfs- Open:
http://psu.local
or
http://<ESP32-IP>
DP50V5A
│
│ UART (9600 baud)
│
▼
ESP32
│
│ HTTP REST API
│
▼
Web UI / Scripts / Home Assistant / Docker Apps
Read status:
curl http://psu.local/api/statusSet voltage:
curl "http://psu.local/api/voltage?value=12"Set current:
curl "http://psu.local/api/current?value=2"Enable output:
curl "http://psu.local/api/output?state=1"Set voltage and current:
curl "http://psu.local/api/setvi?voltage=12¤t=2"The protocol documentation used during development can be found in:
- docs/DPS5005_CNC_Communication_Protocol_V1.2.pdf
The project uses Modbus RTU over UART and includes reverse-engineered register mappings.
The DP50V5A communication interface is sensitive to concurrent UART access.
All PSU communication is serialized through a mutex to prevent:
- Corrupted Modbus packets
- Timeouts
- PSU lockups
- Concurrent read/write collisions
This architecture was developed through extensive testing on real hardware.
MIT License



