While it has arguably solved the most important problem of our digital lives so far — the quantum duality of USB-A connectors — it might be fair to suggest that there are still a few hurdles remaining before we all adopt this new standard as our go-to project interface.
Along with USB-3, came high speed signaling, a duo of differential pairs in place of the one previously found in prior revisions of the USB spec.
While most of us could lay down the required traces to support these super speedy signals with only minor effort — the copper that needs to go down in order to cope with the currents that are now present, as part of the USB-PD spec, can sometimes take some coaxing to come correct.
By now, you may have caught sight of just how much power can be packed down the PD pipe!
While we were first furnished with phones that could fill their cells faster than a Tesla on a supercharger, it wasn't long before we saw the rise of the 100W devices — laptops chugging down 20 volts, at 5 amps!
These days, the USB-PD 3.1 spec cranks this already impressive power capability all the way up to a frankly insane 240W — that's 48V, 5A, all within the same USB-3 physical connector.
USB-PD is a communication protocol within its own right.
With voltage and current negotiation transactions taking place on the CC pins of the USB-3 connector, there is a whole signaling protocol to be deciphered here with the PD negotiation packets, before one even turns an eye to actual USB data!
As with many busses and interfaces, USB-PD is no different in that we can now purchase a PHY to abstract our negotiations somewhat, making life easier from our projects perspective.
A PHY — abstracted from "Physical Layer" is a function-specific block of circuitry that provides a way of abstracting the raw electrical signaling required by an interface or standard, into something a bit more grok-able.
We often see them in the context of networking — where the complex electrical (or optical) signaling required by a network protocol is abstracted to a more achievable set of commands that our host processor can feed to the PHY, before it itself translates our instructions into the bits and bytes needed to transmit "on the wire".
While we can now buy many a cheep and cheerful USB-PD "decoy triggers" from AliExpress, these devices are often physically bootstrapped into a single USB-PD configuration.
While this is great for getting a known, fixed voltage into your project, they don't allow much scope for experimentation.
What is more, is that while the USB-C PD spec is just that — a specification — we all know just how well everyone adheres to every part of a spec, right?
Not every power adaptor will supply the full range of voltages defined by the spec. Many will miss out 9V, or 15V, and sometimes, we see undefined behaviour here. Fingers crossed that the alphabet-branded supply that was half the price of the others on Amazon behaves appropriately in this instance.
I'm suprised it's taken this long to find a tool that not only lets you check if a supply will behave as expected, but also let you get to grips with your own USB-C PD project application!
The very tidy little board shown above is the brainchild of our previously featured favorite, Mike Rankin.
With a bevvy of features contained within this fantastic looking board, there are a number of roles that can be taken on with mere adjustments to the Arduino sketch running on it!
Not only do you have a Wi-Fi enabled, current sense capable, programmable USB-C PD power supply — it can function as a stand alone supply tester, perfect for the myriad USB-C cables and devices we now find ourselves furnished with.
There's a special place in the afterlife (if any) for those of us who take the time to throw down documentation that goes above and beyond simply releasing the sources.
I'd wager that's still a pretty small percentage of the population, but I think Rankin is included on that list — even graphics like this are hugely helpful in getting up to speed on a project quickly.
At heart, this board is based on an Espressif Systems ESP32-PICO-D4 — everyone's favorite, all-in-one MCU/Wi-Fi SiP. This gets you a dual-core, 240MHz MCU, and all the trimmings needed to talk Wi-Fi and BLE, crammed into a QFN package. It's not one of the new S3 or C3 Espressif ESP32 parts, but the PICO-D4 is still a solid Wi-Fi workhorse, backed up by significant Arduino support.
With menus on the mind, Rankin has seen to it to include a pixel-packed, 80x160, 0.96" IPS TFT LCD. Perfect for rich, colorful GUI-based menu systems, bitmaps and much more!
You won't get far without a way to feed some user input back into this box of tricks however, and a well placed five-way joystick provides a nice way to interact with the system — and an extra, standalone SMD SPST tactile switch is handy when mapped to a dedicated "ON/OFF" function, to quickly enable and disable VBUS.
Now, to the "magic" that makes this application specific board so feature packed and functional!
We mentioned the use of a PHY earlier on in the article, and this is where we get to having a look at the specific part used here on this board — the STUSB4500 from STMicroelectronics!
The STUSB4500 is a really neat chip. In a nutshell, it is an I2C to USB-PD translator, with some extra features that make it great for embedding in standalone projects.
It contains NV (non-volatile) memory to store up to 3 USB-PD "profiles" — the voltage and current configurations that can be passed to the source.
With an I2C interface, along with the aforementioned NV memory, the chip can either negotiate the best available profile, reporting the findings to the host MCU, or, be reconfigured on the fly, allowing more dynamic operation - which is what makes this board so useful!
Not only do you have a powerful platform to experiment with your own USB-PD profile negotiations — but with stock firmware, the board is quickly and easily able to test and diagnose the incoming myriad USB-C chargers that have "questionable" PD logic, or worse at all, are just dumb DC supplies.
Rankin is one of those people who always seems to have a project on the go, and his Twitter account is certainly worth a follow!
If you want to get straight to the goods, as always, there's a GitHub repo for that — right here.