3 ms·
Ask HN: How does USB PD 3.0 determine voltage?
I understand there's a protocol for the device to request the voltage, but how does that work?
I'm wondering if it can be hacked to be used as a power supply for homebrew projects. It would be really convenient give it can supply a couple amps at a variety of common voltages.
- themerone 5y agoThere are parts for this. https://www.sparkfun.com/products/15801 https://www.sparkfun.com/products/15801 https://blog.adafruit.com/2017/01/05/fusb302-breakout-board-usb-power-delivery-phy/?gclid=CjwKCAjwjZmTBhB4EiwAynRmD6l3yc_2nkFDYILszpsWYutQX7-BuhXLHsexh43oIB8IRdhQ2gyz1BoCkWEQAvD_BwE https://blog.adafruit.com/2017/01/05/fusb302-breakout-board-...
- giantg2 5y agoThanks! Those are more expensive than I thought.
- rektide 5y agoone can buy a variety of super super cheap very small boards or pigtail adapters with dc barrel jacks, in the usb-pd standard voltages: 5v, 9v, 12v, 15v, 20v. You asked how does that work. Well, search for "usb-pd negotiation" and find out. Typically a source enumerates what it can do (lists some "power data objects", pdos) and a device files a request based on one, but I believe devices can & do ask for arbitrary things they want, especially if they dont find what they hope for, & them latter fall back to slower often 5v backup voltages if they can (or not). Thats the two sentance summary but theres a ton of info & its easy to learn more & you can download the spec & find out yourself if searching around still leaves you eith questions.
- giantg2 5y agoThanks! I'll try it with "negotiation" as my other searches brought up stuff that's close but not quite what I was looking for (how it asks for stuff). It sounds like the barrel jack boards might be what I need. I first tried to use a step up module from an 18650 (worked for smaller load), then mini USB (didn't work with higher load). I guess I should look at one of these AC to DC step-down modules.
- eternityforest 5y agoLots of projects do this. The big issue is you need a PPS capable supply(More and more seem to support it). With that you have full current and voltage control. Without it you get 5v, 9v, maybe 12v(I think it's deprecated or removed, not sure if it still works on new stuff, sadly, because 12v is so common), 15v, and 20v. Plus the new high voltage modes.
- giantg2 5y agoI know there are some PPS that are designed specifically for projects. Usually they are big and expensive. I was really hoping for something cheap. That's why I tried USB wall chargers with a $1-2 step up converter. It works great at 12v with lower amps (.5 ish) but can't handle the higher stuff (1.25-1.5 ish). Then I started looking for higher amp chargers and saw that some will do 12v so I don't need to do the conversion, but I don't know how to signal them to send 12v vs the other voltages. Not to mention they are expensive. I ended up ordering a 120v AC to 12v DC module last night. It's about $5. Now I just need to see if I can find empty wall transformers somewhere to make it look good, or if I have to wonky looking inline project box and bulky clamshell plug.