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.


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.

5 thoughts on “The future of OpenDPS

  1. Evan L Allen

    constant current, constant voltage, function generator (I assume current and voltage, because why not) and remote control. I can’t seem to imagine anything else for this device to do. The remote control really gives it the expandability to do most anything. Maybe running a CC/CV battery charger? (lithium, nicd, nimh, lead…) you could run pre-set profiles and even add up the amount of current put into the battery (although no auto-discharge capability for fully characterizing it). The only thing to do now is to make it GPIB compatible…

  2. Kjetil Trondsen

    When I saw that this module measures input voltage, output voltage and output current I was thinking it would be perfect as an MPPT solar charger. And with all the types of units it should be possible to find the right specs for a lot of solar panels.
    The CC and CV functions already implemented would do battery charging.
    What’s needed is to monitor input voltage and output power and regulate output current to make the input voltage closest possible to the maximum power point of the solar panel.
    The maximum power point (MPP in MPPT) is printed on the panels and could be inputted as an parameter, but the best solution is if the firmware tries to scan different input voltages (the T in MPPT stands for Tracking) to see witch one gives most output power. And repeat scanning (or just checking a little higher and lower input voltage to see if power increases or lowers) to compensate for different power output from the solar panel over time.

    With the display and configuration possibilities I think this could be one of the best small to medium MPPT chargers at the price range.

  3. Nestor Groel


    These modules are awesome, I used it for months and now found your blog. THANKS!!!

    Are you testing the DPS 5020 modules? It will be VERY interesting!

  4. Ben

    Hey Johan, great work on OpenDPS and the new cleaned up architecture seems like a great way to go forward! I’m thinking about getting a DPS or maybe DPH 3205. Do you know if OpenDPS is compatible with the latter?

  5. Ben

    Oh and something else: is it possible to turn off or PWM-control the fan based on thermal losses? Those could probably be calculated based on the measurements from the eevblog host Dave Jones and eevblog forum member HKJ:

    Another possibility would obviously be to add a little PTC/NTC or even a PT100 and hardware-hack this thing. But that would probably be more effort as it’d require stuff like calibration too.
    All that obviously depends on the fan even beeing wired up in such a way that it could be controlled by the STM. Otherwise…more hardware-hacking I guess 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *