5
\$\begingroup\$

I want to power my DIY stuff with a MacBook Pro USB C charger. The label on a charger says that it can provide three different power profiles: USB-C charger specs

  1. 20.2V - 4.3A
  2. 9V - 3A
  3. 5.2V - 2.4A

There is a ton of information about what USB-C power distribution is capable of, but I can't find any examples of how exactly to do it.

Is there an easy way or workaround to request one of those power profiles without using a microcontroller?

For example, I got apple MacBook Pro charger, apple USB-C cable, and a breakout board like this one: USB-C simple breakout board

\$\endgroup\$
  • \$\begingroup\$ An easy workaround is to use a USB PD trigger module. Go for a few dollars on the usual import friendly and reseller sites, ebay, Ali, amazon etc. \$\endgroup\$ – Passerby Dec 2 '18 at 3:33
7
\$\begingroup\$

In a word, no. You need to implement the USB Power Delivery protocol through the CC line of the Type-C connector and that's a two way communication at 300kbps complete with preamble, CRC and so on that is pretty much impossible to do without a microcontroller.

The PD message format looks like this:

enter image description here

For full details you'll need the USB Power Delivery specification, but there's a useful introduction here which is where the diagram above came from.

\$\endgroup\$
  • \$\begingroup\$ +1. This is only the physical format of communication packet. There are several more layers of logical protocols one needs to obey before the charger outputs 20 V. \$\endgroup\$ – Ale..chenski Mar 13 '18 at 16:30
  • \$\begingroup\$ @AliChen I added this purely to show the level of complexity that needs to be implemented and illustrate the point that without a microcontroller it's a non-starter. \$\endgroup\$ – Finbarr Mar 13 '18 at 17:17
3
\$\begingroup\$

As Finbarr noted, you need to implement Power Delivery communication protocol to negotiate the 20 V output profile. The PD specification was designed by a community of more than 300 fine engineers from top semiconductor and software companies. It took 3 major revisions and about 5 years of work to come up with current functional standard. Trying to implement the protocol from scratch (as Finbarr seems to suggest) is an obviously losing proposition.

However, there is a solution at DIY level. Due to horrible protocol complexity, several semiconductor companies offer a set of ICs that embed the PD protocol, a turnkey solution. To start, look at overview of PD solutions at TI, and select proper cluster.

You already have the functional PD source. So you need to select "Device UFP" and "Sink". You will have about 5 variants of ICs performing the function of PD controllers, something like TUSB422 or TPS65981. Unfortunately, the IC will need some control over I2C interface to perform the actual negotiation, so you will need some microprocessor with some software support for PD. They should offer development kits with full examples how to do this.

So, good luck.

EDIT: Other companies as NXP, Maxim, Linear, Cypress, ON Semi, STMicro, might offer controllers with pin straps (with no microcontrollers), but you need to search for this.

\$\endgroup\$
1
\$\begingroup\$

It's complicated but doable. There's someone who has implemented exactly that and offers the PD buddy sink on tindie:

https://www.tindie.com/products/clayghobbs/pd-buddy-sink/

Code:

https://git.clayhobbs.com/pd-buddy/pd-buddy-firmware/src/branch/master/docs/console_config.md

Hackaday project site:

https://hackaday.io/project/20424-pd-buddy-sink/details

\$\endgroup\$
  • \$\begingroup\$ amazing, i will try this \$\endgroup\$ – George Dec 3 '18 at 13:30
  • \$\begingroup\$ I've used "Clara Hobbs' PD Buddy Sink" - works perfectly.. best option out there.. and programmable via an serial interface terminal with a few easy lines of code.. Don't be scared.. usbc for your project is fine \$\endgroup\$ – Kevin Graehl Jan 9 at 19:27
  • \$\begingroup\$ Of course it is doable. Why do you think many silicon manufacturers offer ICs that do PD communication? So someone who knows what he is doing did this board, with 5 ICs including 32-bit microcontroller, and sells for $30 apiece. \$\endgroup\$ – Ale..chenski Apr 29 at 17:18
0
\$\begingroup\$

Is there an easy way or workaround to request one of those power profiles without using a microcontroller?

In theory: yes, you could make a circuit using standard logic chips to emulate the protocol and "fool" the charger to output more than 5 V. This will be a very complex circuit though and will require some reverse engineering and detailed study of the protocol. Since this is an Apple product, it might not strictly adhere to the public standards either.

In practice: no as a microcontroller will offer much more flexibility than a bunch of logic chips. Also precise timing will be much easier to achieve.

But for both cases: I do not think it is worth the effort to do this in the first place. It will be much cheaper and much less effort to buy a power adapter which will output the voltage you require.

Also, there is the risk that you somehow break or damage the adapter. Then you have no way of charging your MacBook until you buy a new adapter. Since this is an Apple product, that might not be cheap. So why risk that?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.