Close

New Configuration for Firmware 1.2.0

A project log for PD Buddy Sink

Smart power jack for USB Power Delivery

clara-hobbsClara Hobbs 10/06/2017 at 16:570 Comments

With support for programmable power supplies planned in firmware version 1.2.0, I realize that new configuration will be required.  First of all, this is because USB PD programmable power supplies allow voltages to be requested at 20 mV increments, while fixed PDOs can only be at 50 mV increments.  To support both of these, I'll have to change the configuration to hold voltages at some common denominator: probably either 10 mV or 1 mV.  This means upgrading to firmware 1.2.0 will break your configuration, and there's not a lot I can do about that short of an extra backwards-compatibility code path that in the long term won't see much use.  I'm not crazy about that idea, and the documentation never said the configuration would persist through firmware updates, so I'll probably just warn users about the change when I make the release.

Next, something will have to be done to allow the Sink to get power at less-desired voltages.  For instance, maybe you'd really like to run your project at 13.8 V, but anything from 11-16 V would work as well.  It would suck if setting the Sink for 13.8 V meant it absolutely can't work with older supplies that only offer the standard fixed voltages.  My idea then is to let users set a preferred voltage, and an optional range of acceptable voltages.  If the preferred voltage is not available, the Sink will try to make a request for some arbitrary acceptable voltage instead.

EDIT: The arbitrary selection would almost certainly either favor lower or higher voltages, and I can imagine situations where either of these would be preferred.  Accordingly, I should probably let the user choose between the two.

This raises the question of how much current to request.  It's easy to just set a single current when only a single voltage can be requested, but with a whole range available I can think of several modes that would make sense.  One would just be to request a constant current at all voltages in the range.  Another would be to request a constant power, so that higher voltages come with lower current.  A third would be resistive load mode, where the user sets a resistance and the Sink requests the current required at whatever voltage, so that higher voltages come with higher current.

That about sums up my plans for the new configuration for programmable supplies.  I'd like to hear feedback on this, so if you have any comments please let me know.  In particular, I want to make sure there aren't any use cases I've missed, e.g. modes other than constant current/power/resistance, or maybe something to do with voltages.  Once I feel confident the ideas are all in place, I'll design the new configuration API.

Discussions