Coder Social home page Coder Social logo

opendps's Introduction

OpenDPS

Give your DPS5005 the upgrade it deserves

OpenDPS is a firmware replacement for the DPS5005 (and friends) 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 https://github.com/kanflo/opendps.git
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. 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"

Next:

make -C esp8266-proxy flash

Usage

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

% dpsctl.py --scan
172.16.3.203
1 OpenDPS device found

Enable 3.3V limited to 500mA:

% dpsctl -d 172.16.3.203 --voltage 3300
% dpsctl -d 172.16.3.203 --current 500
% dpsctl -d 172.16.3.203 --power on

Query the status of the device:

% dpsctl.py -d 172.16.3.203 --status
V_in : 7.71 V
V_set : 3.30 V
V_out : 3.32 V (on)
I_lim : 0.500 A
I_out : 0.040 A

Upgrading

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
% dpsctl.py -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 dpsctl.py 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:

  • opendps/ The OpenDPS firmware.
  • dpsboot/ The OpenDPS bootloader.
  • esp8266-proxy/ The ESP8266 firmware for wifi connected OpenDPS:es.
  • dpsctl/ A pyton script for controlling your OpenDPS via wifi or a serial port.

What about other DPS:es?

In theory, OpenDPS should work for all the other models in the DPSx0xx series, such as the DPS3005, DPS3012 and DPS5015. I have none to test with but would be very surprised if the hardware differed that much. Please share any results. The maxium settable output current can be defined when building opendps, see the makefile.


Licensed under the MIT license. Have fun!

opendps's People

Contributors

kanflo avatar marcuslindemann avatar gojimmypi avatar bjerrep avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.