Give your DPS5005 the upgrade it deserves
Switch branches/tags
Nothing to show
Clone or download
kanflo Merge pull request #47 from goosenphil/binaries_builder_docker
Added support for building firmware images using docker.
Latest commit 85dd0c8 Sep 4, 2018


Give your DPS5005 the upgrade it deserves

OpenDPS is a FOSS firmware replacement for the DPS5005 (and DPS3003, DPS3005, DPS5015 and possibly others) that has the same functionality, has a less cluttered user interface and is remote controllable via wifi (ESP8266) or via a serial port.

A DPS5005 with wifi

There are three accompanying blog posts you might find of interest:

  • Part one covers the reverse engineering of the DPS5005.
  • Part two describes the design of OpenDPS.
  • Part three covers the process of upgrading stock DPS5005:s to OpenDPS.

Upgrading your DPS5005

If you are eager to upgrade your DPS5005, you may skip directly to part three. Oh, and of course you can use OpenDPS for more than a programmable power supply. Why not use it as an interface for your DIY sous vide cooker :D

Cloning & building

First build the OpenDPS firmware:

git clone --recursive
cd opendps
make -C libopencm3
make -C opendps flash
make -C dpsboot flash

*Please note that you currently MUST flash the bootloader last as OpenOCD overwrites the bootloader when flashing the firmware. Currently no idea why :-/ *

Check the blog for instructions on how to unlock and flash your DPS5005.

Second, build and flash the ESP8266 firmware. First you need to create the file esp8266-proxy/esp-open-rtos/include/private_ssid_config.h with the following content:

#define WIFI_SSID "My SSID"
#define WIFI_PASS "Secret password"


make -C esp8266-proxy flash


A vanilla OpenDPS device will support two functions, constant voltage (cv) and constant current (cc). A tool called can be used to talk to an OpenDPS device to query functionality and supported parameters for each function.

Once upgraded and connected to an ESP8266, type the following at the terminal to find its IP address:

% --scan
1 OpenDPS device found

Enable constant voltage (cv) at 3.3V limited to 500mA:

% -d -f cv
Changed function.

% -d -p voltage=3300 current=500
voltage: ok
current: ok

% -d -o on

Query the status of the device:

% -d -q
Func       : cv (on)
  current  : 500
  voltage  : 3300
V_in       : 12.35 V
V_out      : 3.33 V
I_out      : 0.152 A

List supported functions of the device:

% -d -F
Selected OpenDPS supports the cv and cc functions.

List supported functions parameters of current function:

% -d -P
Selected OpenDPS supports the voltage (mV) current (mA) parameters for the cv function.

Additionally, can return JSON, eg.:

% -d -q -j
    "command": 132,
    "cur_func": "cv",
    "i_out": 151,
    "output_enabled": 1,
    "params": {
        "current": "500",
        "voltage": "3300"
    "status": 1,
    "v_in": 12355,
    "v_out": 3321


As newer DPS:es have 1.25mm spaced JTAG pins (JST-GH) and limited space for running the JTAG signals towards the back of the device, a permanent soldered JTAG is somewhat cumbersome. People not activly developing OpenDPS will not need JTAG anyway. To facilitate upgrade, OpenDPS comes with a bootloader enabling upgrade over UART:

% make -C opendps bin
% -d /dev/ttyUSB0 -U opendps/opendps.bin

If you accidentally upgrade to a really b0rken version, the bootloader can be forced to enter upgrade mode if you keep the SEL button pressed while enabling power.

The display will be black during the entire upgrade operation. If it stays black, the bootloader might refuse or fail to start the OpenDPS application, or the application crashed. If you attempt the upgrade operation again, and upgrading begins, the bootloader is running but is refusing to boot your firmware. But why? Well, let's find out. If you append the -v option to you will get a dump of the UART traffic.

Communicating with /dev/ttyUSB0
TX  9 bytes 7e 09 04 00 27 86 0c b2 7f
RX 9 bytes 7e 89 00 04 00 03 66 0f 7f

The fourth byte from the end in the received data (0x03 in this example) will tell us why the bootloader refused to boot the firmware. See protocol.h for the different reasons.

Source code organisation

The project consists of four parts:

  • dpsboot/ The OpenDPS bootloader.
  • opendps/ The OpenDPS firmware.
  • esp8266-proxy/ The ESP8266 firmware for wifi connected OpenDPS:es.
  • dpsctl/ A pyton script for controlling your OpenDPS via wifi or a serial port.
  • emu/ Xcode project and GNU makefile for running an emulated OpenDPS.

What about other DPS:es?

OpenDPS has been verified to work with other models in the DPSx0xx series, such as the DPS3003, DPS3005 and DPS5015. The maxium settable output current can be defined when building opendps, see the makefile. Plese note that the hardware design might change at any time without any notice (I am not affiliated with its designer). This will render OpenDPS unusable until fixed.

Licensed under the MIT license. Have fun!