Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: USB PD Stand-Alone Sink Controller (oxplot.com)
124 points by oxplot on Oct 16, 2019 | hide | past | favorite | 58 comments



This is quite cool! Any PCB designer that needs a lot of power should just use this design and hopefully the world will eventually settle on using micro USB for low power and USB PD for up to 100W. I am currently thinking of making a device that has a PCB, and one of my key requirements is the use of micro USB (5V 500mA) precisely because designing power circuits and distributing DC adapters is a major cost.


Micro USB should be on its way out, use USB-C instead. I'm slightly annoyed when I buy something that has micro USB now, because it means I'll have to keep using two kinds of cords a while longer. And they're a mild hassle to plug in, especially in low light, because of the asymmetric contact.


The only device I regularly use that still charges through micro-b is my Bluetooth headset and it's a gigantic pain looking for the micro b cable I might have somewhere to charge it, while I have type C cables anywhere I go.

I wish there was a small adapter I could just take with me everywhere on my key chain, but all adapters I could find go the other way around :(



It’s kinda funny how the world has converged on USB as a universal charging standard. I have a tote full of old AC/DC transformers in the garage; I used to save them as you never knew when you’d need one of a specific connector/voltage/ amperage combo. Now they’re somewhat obsolete.


Aside from the many, many different sizes, I really miss barrel jacks for charging. Like USB-C, there is no wrong way to plug it in, but the connection always feels solid.

I currently have to wiggle my USB-C and find the right angle to achieve "rapid charging," and if it moves too much it just falls out.

Feels like we've gone backwards in physical connection reliability.


Do USB-C connectors get packed with lint?

I had a USB micro phone stop charging and it ended up being lint/dust packed in the connector.


They do. I started seeing my phone not getting fully charged during the night and driving on a bumpy road would make the screen turn on and off. Took me a while to realize that a small lint ball from inside my pocket had made it into the USB C socket of my phone. It was small enough not to be overly evident. Few minutes with a toothpick and it's good as new!


Yes! Exactly what happened with my Pixel phone. The cable would fall out after a minute. Took a toothpick and a few minutes to get the dirt out and now it's as good as new.


> Like USB-C, there is no wrong way to plug it in, but the connection always feels solid.

Hefty disagree. I've seen plenty of (mainly cheap) laptops where the barrel socket would get loose over time and it was an absolute pain to charge because the connector would jiggle out at the slightest movement.


> Like USB-C, there is no wrong way to plug it in, but the connection always feels solid.

You can always get the polarity wrong if the designer is stupid and switches them from the standard


I have two devices at home with the positive contact on the outer ring!!!


Fewer connection types that you frequently need is quite uncontroversially a good thing isn't it?

So it's quite natural that for merely charging we'd turn to something that's capable of charging and data, since we couldn't do the reverse.


It makes sense given the history: the EU forced phone manufacturers to settle on one charging standard, this lead to everyone having a micro USB charger, allowing everyone else to piggyback.

Off course it made sense for phone manufacturers to choose some pre-existing standard that can handle data and power in one connector.

But if 20 years ago you would have asked me to guess the future universal power connector, I would have guessed on a standardized size and voltage for the ubiquitous round connectors (barrel jack?), or maybe an adaptation of headphone connectors. MicroUSB with its comically small contact area, (originally) only 2.5W maximum power and fragile connectors that are a pain to plug in wouldn't have been my guess.


There's not a lot of reason to stick with micro USB even for hobbyist projects. You can get USB-C "charging" receptacles that only breakout 6 contacts in any combination of SMD/PTH on the contacts and the mounting pins. Even in tiny quantities they're less than $0.10/ea on aliexpress. If you just want 5V you don't need to deal with PD, just stick 5K1 resistors to GND on each of the CC1 and CC2 pins (don't cheap out like the Raspberry Pi4 did and tie the CC pins together to save on a second resistor, or you'll end up with the same problems as they did).

They should be just as easy to route and hand-solder and the footprint should be just as compatible with low-end pcb services as any micro-usb connector, and it will allow you to use a better USB-C cable as your power connector.

If you also want the USB2 D+/D- lines broken out you can get USB-C connectors with 16-contact pinouts (everything but the SS pins).


So... https://www.tindie.com/products/clarahobbs/pd-buddy-sink/ like this, right?

Now, I saw a ThinkPad plug in the blog post. Lenovo sells this ready made. ttps://support.lenovo.com/us/en/accessories/acc500104

Search for 4X90U45346 to find purchase links. Two ideas:

US: https://www.cdw.com/product/lenovo-usb-c-to-slim-tip-cable-a...

Elsewhere: https://www.ebay.com/itm/Usb-C-To-Slim-Tip-Cable-Adapter-NEW...


> So... https://www.tindie.com/products/clarahobbs/pd-buddy-sink/ like this, right?

Note all the extra electronics on the PD-Buddy-Sink, which OP specifically calls out: "Chips like the popular FUSB302 which only provide the wire level handling of the USB-PD protocol, require a lot of software work to make them reliably operational. And that software will need to run on a µC which adds to BOM." You can see the large STM32F(!? way overkill) on the PD-Buddy.

The STUSB4500 OP used allows for a much smaller, fully-integrated solution.


Only 45W, so OP’s will work better for large laptops, assuming there are big thinkpads using this connector (I have no idea if that’s the case)


The slim plug is available on adapters from 45w to monster 230w (that RTX 5000 in the P53 alone eats 110W, the CPU is nominally 45W but in reality it's oh-my-god then there's a screen to power, typically 4K and we didn't even start charging our battery, previously only the 17" laptops needed 230W at full config, the basic adapter is "only" 170W). The plug center leg is for wattage detection, there's a resistor to ground and the size of the resistor tells the laptop how many watts can it draw safely.


I think 45W was the max for laptops and the larger supplies shipped are for driving Docks.

That being said ... Newer Lenovo Laptops come with 65w USB-C. The Docks however still use Slim Tip and go up to 90w. So Idk.


Yeah I like the cable solution better for a laptop, but this device could be used for anything! It would be cool to have it power an electronics breadboard too, especially if you can get both 20V and 5V off the same charger cord.


I knew about the cables on eBay but wow, didn't know about Lenovo's official one. Thanks!!

Also the other project is pretty cool as well. Will check out the components there too.


Thought this would be about roboticizing my kitchen faucet. Had to dig to find:

> What is it? Ever thought of (re-)using your USB-C charger (like Macbook's) to power other devices? If so, this is the board for you.


I was extremely confused as well... That he also doesn't really explain what he was doing didn't help. ¯\_(ツ)_/¯


Neat project - I was looking for something similar for powering various bits of electronics and stumbled upon WEB PDC001 (can be found on Aliexpress) cable which is basically programmable USB-C cable with DC barrel jack. Works great with TS-100 soldering iron powered using generic PD phone charger. The only issue with it - software for programming it is Windows only and it isn't translated to English.


If you figured the sw out, care to publish a blog post about it?


I tried reverse-engineering the USB protocol but quickly moved onto another project. Project is on GitHub https://github.com/JaCzekanski/pdc-control

Small correction: the software itself is in English but the documentation (and firmware files) is in Chinese.


Now, can anyone recommend a small, lightweight PD charger that ideally also has 3 to 4 "normal" USB ports, provides 100 Watts and has an EU socket connector? I would love to carry a single power supply for charging all my devices when travelling.


Anker PowerPort Adam PD4 100w [1] is likely the closest. It has two USB-C PD and two USB Type A. It splits that 100w amongst attached devices, giving the full 100w to a single USB-C PD port (20V @ 5A) or sharing the 100w across multiple devices, for example:

  * Macbook Pro (45w USB-C 15V @ 3A)
  * iPhone XR (30w USB-C 15V @ 2A)
  * Battery Pack (12w USB-A 5V @ 2.4A)
  * Apple Watch (12w USB-A 5V @ 2.4A)
Or the simpler everyday use: 15in Macbook Pro (87w) + USB-A (12w). It uses a standard IEC-320-C7 cable for power (two pin, round hole) so getting local cables anywhere should be easy.

MSRP is $99.99. Availability is a tight, but it does exist. A few sites have reviewed it and there's at least one teardown on the web.

[1]: https://amzn.to/35EB0pe


This looks promising, thanks. Still a bit on the heavy/large side. Is this using GaN tech already?


I've been looking at the innergie chargers. They use GaN.

I've been looking at this once since its so small.

http://www.myinnergie.com/sg/product/136


I didn't like a review saying it's small because some components were left in the cable and hence not all USB-C cables work. It might be an outlier/mistake, but yeah...

I have been using this RAVPower 61W Wall Charger for some weeks now, and it's GaN: https://smile.amazon.com/dp/B07TC53ZYD


Correction: the innergie does not use GaN


Had never heard of GaN. Googled and they are amazing! Thank you.


My understanding is that it is not.


This is incredible, something like this becoming mass market would remove the issues we have of older laptops not having easily replaceable power bricks.



This design does lack a configurable dc/dc voltage regulator, I've seen laptops with anything between 12-24V... any idea for a circuit?


Due to component tolerances, laptops aren't that picky about what voltage they need; capacitors with 16V and 25V max ratings have basically created two ranges, 9-12V and the far more common 18-20V:

https://news.ycombinator.com/item?id=12618406

I find the other comment about a programmable output voltage in 50mV increments a little amusing, since 50mV of 5V is 1% and of 20V is 0.25%. To maintain the former level of regulation over changing loads would already require a very expensive and powerful supply with remote sense, while the latter is basically voltage reference territory.


> I find the other comment about a programmable output voltage in 50mV increments a little amusing

To clarify, when you program the chip, you set a voltage with 50mV resolution and a lower and upper percentage bounds that you'll accept. The minimum percentage is 5%. So for instance, at 5V, you can't narrow down the range to less than 0.5V (4.75-5.25v).


Voltage refs are more typically 2 orders of magnitude better than that.


Better references, yes, but 0.25% is typical of a cheap reference like a '431.


I stand corrected; thank you. I am genuinely surprised to learn that those are called voltage references, but that is an accepted industry term.


The STUSB4500 supports output voltages of 5V to 20V in 50mV increments and is programmed over I2C, so it should be pretty easy to add a small micro controller and some input interface to make the output voltage configurable.


you could hang one off the output, not the most elegant but at least modular then


What kind of car USB charger outputs 100W?


Most cars provide >120watt power through the cigarette lighter socket. It's just that no one has yet made a USB charger with that output power presumably because no single device requires it yet.


What is required for this to act as a power supply? I'm thinking about building a power bank.


This board can only consume power. ST sells chips which act as USB PD supply but they're only interface chips. You'll need a DC-DC converter and charger circuit as well which is usually complicated with dozens of components and tricky layouts.


So you say you set the voltage and current requirements once in the software, but looking at the data sheet it can be reprogrammed?

Do you mean you set it and it works between power cycles?

Otherwise you have to be careful and set the values you need first time I guess.


> Do you mean you set it and it works between power cycles?

Yes, the article stresses that explicitly. That's in section 5.1 of the datasheet I believe.


Yes, it can be reprogrammed and yes, it works between power cycles.


Wow, thanks for the recommendation for pcb.ng. Can they really source every part available on digikey, mouser etc., including microprocessors and ICs?


Yes, just sign up and create a project and enter some parts. It tells you instantly the cost of each.


> MELFs. Not only do we handle them, but we get a juvenile kick out of the name.

Okay I love them already. Who doesn't love a little sense of humor?


I read the blog post but it's still not clear what this is or its for? Is it a usb c port for laptops without them?


In electronics terms, sink means a device which consumes current. The opposite is aptly named source. So a source supplies a sink.

The 100W 20V USB-C power standard requires a negotiation protocol to tell a source what the sink requires. This is to ensure a source is not overloaded or a sink fed the wrong voltage. So this article explains how the author used an off the shelf USB-C power chip to talk to a standard USB-C power source and request enough power to charge their laptop (the sink).


No this is a device that is powered by a USB-C charger and outputs whatever voltage/current you want (if it is possible).

So in this case he made an adaptor that lets him charge his lenovo laptop (traditional DC charger) with USB-C.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: