Caring for the unwritten code since 1990.

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:

1

2

3

4

5

6

7

8

9

% dpsctl -d 127.0.0.1 -F

Selected OpenDPS supports the cv and cc functions.

% dpsctl -d 127.0.0.1 -f cv

Changed function.

% dpsctl -d 127.0.0.1 -p v=3300 i=500

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:

1

2

3

% nc -u 127.0.0.1 5006

draw

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

1

2

3

0.00V

0.000A

0.0V

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.

Post navigation

3 thoughts on “The future of OpenDPS”

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…

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.

Meta

This is a standard WordPress installation that most likely uses cookies. Frankly, I haven't checked but recall being obliged to tell you under EU law so here goes: This site uses cookies. Things will probably not go south if you turn them off. Either way, I am into building stuff and not tracking people nor selling advertising space so you can feel safe here.Ok