The future of OpenDPS

Creating OpenDPS was a lot of fun and I am really enjoying seeing it in use on other peoples DPS:es. In this post I will elaborate on the future of OpenDPS, feel free to join the discussion in the comments below.

Architectural overhaul

The original OpenDPS firmware was “an application displaying a user interface allowing the user to set output voltage and current limit”. Over time the constant current mode was added due to popular demand 😉 Remote control is possible using dpsctl, a tool that “knows” what functions the OpenDPS firmware supports.

All that functionality still exists, but from a software architectural point of view the firmware today is completely different. With the recent UI overhaul, the firmware is “an application supporting functions and allowing the user to change parameters specific to these functions”. Sounds a bit dry, doesn’t it? The good news is that the “functions” implemented are CV and CC so the user will not notice things changed under the hood. Even better news is that it is now trivial to add new functions. The original CC mode was somewhat shoehorned into place while the rewritten one fit right into the software architecture. One new function I am thinking of is a signal generator.

Remote control

Remote control unfortunately is a bit broken at the moment. This is currently being fixed while performing some architectural changes to dpsctl too. My idea is that dpsctl should not have any knowledge about the functionality of the OpenDPS it controls. It will know about “functions”, “function parameters” and “activation/deactivation” of said functions. With this change there will be no need to maintain dpsctl when adding new functions to OpenDPS. Here is what it looks like right now on my local master:

The commands above list the supported functions, selects constant voltage and sets output to 3.3V and current limit to 500mA. The OpenDPS will complain if the function does not exist or the parameters are incorrect.

Emulation

Did you notice the localhost IP address above? That was no typo, the OpenDPS firmware can now be run as a standalone application on your computer. This accelerates development of non hardware related application code and I am using it for the function and function parameter code right now. The emulator listens to UDP port 5005 and behaves just as an ESP8266 joined with a DPS. It additionally listens to UDP port 5006 where UI events can be injected:

This causes the emulator to draw an ascii version of the UI on its stdout (currently not that exciting)

The parameter setting code is currently being worked on and I will push to GitHub it as fast as I can to restore remote control of OpenDPS. The function generator will arrive later this summer, its timeframe being weather dependent. Got any ideas for other functions? Let me know.

Easing the pain of SWD on modern DPS:es

On newer DPS:es, the SWD connector is a JST-GH (1.25mm spacing that is) which translates to “really tiny”. The annular rings where you need to apply solder and heat for adding wires are even smaller. This is why the OpenDPS SWD Bottle is handy. Add three P50-E2 pogo pins, and connect to your favourite SWD debugger.

One hand SWD debugging
One hand SWD debugging

BOM

  • 1x “DPS SWD BTL” PCB
  • 3x P50-E2 pogo pins (about €5 for 100pcs on AliExpress)
  • 1x 3 pin 0.1″ male right angle header
  • 3x F-F dupont cable

Mounting

  1. Add solder to each of the three exposed pads where the pogo pins will be mounted.
  2. Hold one pogo pin with a tweezer or small plier an align along the pad.
  3. Apply heat on the pad and when the solder reflows, gently push the pin in place and wait for the solder to cool down.
  4. Repeat for the second pin and check alignment of the two pins on your DPS.
  5. Repeat for the third pin and check alignment on your DPS.
  6. Solder the 0.1″ header on the reverse side of the pogo pins.
Well it looks like a bottle, doesn't it?
Well it looks like a bottle, doesn’t it?

Using

The pinout is described on the silk and you should be able to make out which is GND, SWCLK and SWDIO with a little imagination 🙂 The DPS BTL shall be interfaced with ground to the left touching with the middle annular ring of the DPS SWD connector. See the top image.

Soldering the right angle header on the suggested side helps you in pressing the adapter against the DPS with one hand only.

Want one?

I have been playing with the thought of selling some of my prototyping stuff on Tindie or some other maker market place for some time and happen to have an ample supply of DPS bottles as I sprinkled a prototyping board with them. If you are interested in buying one you can contact me via my GitHub page.

  • 1x DPS SWD BTL with pogo pins and right angle header mounted: €5
  • 3x dupont cables: €1 (slight rip-off, I know. I can sell these as a courtesy but do not wish to drain my own supply)
  • Shipping and handling: €13 for traceable and insured or €3 for non traceable a non insured for all parts of the world except Sweden

Or you can gerberize the Eagle project, order and build one yourself as this is OSHW, as always.