7

I want to explore more USB-C PD, in particular Programmable Power Supply (PPS), to supply my projects with power. There are some good projects1 using some standard communication (e.g. SPI or I2C) to communicate to as dedicated IC (e.g. STUSB4500, FUSB302, or AP33772), that then communicates via the CC pins to the PSU (USB-C PD PHY).

However, that means extra cost and extra space for the dedicated communication chip. I guess that's ok for most applications, but I'm curious; from reading a presentation explaining the details of the USB-C PHY layer I would think that it should be rather doable to implement the same logic directly into any better micro-controller (like an ESP32). I say that because the link speed is spec'ed at 300kbps at low impedance at 1.125V (shiftable to and from 3.3V e.g. with PCA9306) via two pins. Sure, then a lot of processing is happening on the logical data to the physical, but that should not be "too hard"TM to implement, right? Or am I missing any good reason/complication not to do that?

1 To name a few:

  1. SparkFun Power Delivery Board - USB-C (Qwiic) (STUSB4500)
  2. Mike Rakin's Board + Github (STUSB4500)
  3. Ryan Ma's "PD Micro" board + Github (FUSB302)
  4. Reclaimer Lab's USB-C Power Delivery PHY Breakout Board or USB-C Explorer board (both FUSB302)
  5. AP33772 Validation Platform Setup (AP33772)

Addition: Apparently there are a few micro-controllers with built-in capabilities (thanks @Justme), like the STM32G071. There is even an official discovery kit (STM32G071B-DISCO) and wiki entry.

3244611user
  • 193
  • 6
  • 1
    What's the question? You can buy microcontrollers with USB-PD PHY built in already. – Justme Jan 08 '23 at 19:36
  • The question is weather it is feasible to do it on standard MCUs. I was not aware there were MCUs that don't need external other ICs for USB-PD. A quick online search didn't yield anything. Could you point me to one/a few? – 3244611user Jan 08 '23 at 19:51
  • 1
    Did you try putting "MCU with USB-PD" into your favourite search engine? – Justme Jan 08 '23 at 19:59
  • 1
    I did. I find a lot of literature talking about such MCUs, but I could not actually find any part numbers yet, except the SMT32 series where it is called "UCPD" (e.g. SMT32G0, but I have a hard time confirming that you really don't need any peripheral ICs). But ok, let's keep it at that. Do you know if there is any arduino-compatible ones? I could really not find any info on that. – 3244611user Jan 08 '23 at 20:21

1 Answers1

3

I've done that with the benefits as you state. This is purely anecdotal, but hey, one data point :)

Most notably: I can buy the MCUs without PD PHY functionality, but the applicable ones (for my use) with PD PHY are vaporware in practice. Furthermore, I need the rather specialized peripheral set on the microcontroller I already use, so switching to a different uC is not possible. Even further, PD is just a tiny bit of the overall device functionality in my case, so choosing an MCU based on that is a bit of a stretch.

There are stand-alone USB PD interface chips with SPI or I2C MCU interface, but they don't quite do what I need. So if you can use those - definitely don't overlook them.

The PD PHY discrete hardware is about a dollar's worth of discrete mosfets and resistors and such. Looks scary on the schematic, but occupies a dozen or two mm^2 on the board (using tiniest parts possible). Sure, doing discrete designs takes some effort, but these days industry-strength SPICE is free-as-in-beer, so that's a good start.

And if we can't buy discrete small signal mosfets anymore, the world is ending, so no need to worry about USB PD, as I usually say.

Level shifter ICs are a wonderful thing if they do what you need for the price you can afford and with a shipping date that works for you. I often go with discrete parts because they are always available, and I'm comfortable enough putting them together. It's probably a rare sight nowadays to see a mostly digital product with dozens of discrete BJTs/mosfets in it, but this strategy has worked for me. It may not work for you - keep that in mind, and I'm far from suggesting it as some magic bullet. It's a tradeoff, with factors different for everyone.