Live data from Hacker News

An Engineer's Guide to USB Typе-С (2024)

ti.com

81–88 of 88 posts

Re: An Engineer's Guide to USB Typе-С (2024)

#81
post #43

Bit of self-promotion: I spent the last year or so designing an open-source USB-PD protocol analyzer[1], and the complexity of the protocol can be mind-boggling. Most of the time, the communication between source and sink is really straightforward, but it can get amazingly complicated when both devices are dual-role or come from the same vendor[2]. As messy as it is, however, it's also a very useful protocol that all…

I've been lucky enough to get to play with a pre-release version of this and can confirm that it's a fantastic device for dealing with USB-PD power issues, as well as debugging the ridiculous number of devices out there who get USB-C power in general wrong in any number of stupid ways. I just wish I'd had one of these a couple of years ago to help sort out the mass of devices with broken USB-C power, meaning not even full-on -PD but who couldn't even get plain 5V power because the people who designed it had somehow failed to copy and paste the reference circuit from a data sheet.

Re: An Engineer's Guide to USB Typе-С (2024)

#82

Earlier quoted context omitted.

Even if Lightning was possibly a nicer or smaller connector; nothing beats a true industry standard. Makes the entire “what chargers and cables to bring to connect my stuff” question so much easier.

Sadly, that's far from truth... "back in the day", you had an ericsson charger that fit in an ericsson phone and charget that ericsson phone well... and you had a nokia charger for you nokia that charged your nokia. They physically looked different, they wouldn't fit into any other device, and when you needed a charger, you'd take the one that fit the charging hole and it would charge. Now, you have a bunch of usb C…

> when you needed a charger, you'd take the one that fit the charging hole and it would charge.

I have three devices in my room right now that fit the "standard" barrel plug shape. One is 5V, one is 12V, one is 12V with inverted polarity. If I plug the wrong cable into the wrong device it will break permanently. They do have the decency to label somewhere on the device what kind of power it needs but that's something I need to check every time.

In contrast I bought a couple inexpensive 6' USB-C cables that do 100W charging, and a couple inexpensive bricks that support that too. Every USB-C device I own - my phone, my laptop, my earbuds, my portable batteries, my portable fans - every one of them can power/charge at full speed or at least very fast.

And more importantly, I know they aren't going to get fried if I'm tired or in a rush and I forgot to check the plugs. I made one purchase of some inexpensive good cables+bricks, and now I never need to think about it again.

Re: An Engineer's Guide to USB Typе-С (2024)

#83

Earlier quoted context omitted.

> I've never seen a USB C brick that supported some alternative to PD but not PD. Do many exist? Are they still making them? They existed not that long ago, before usb c pd was a stanard, many samsung phones supported it (and not PD), and those powerbricks with those usb c cables still exist and still fit into PD phones. > Wattage of chargers is easy enough to handle. How? Explain that to my mom, she picks up a cable…

> They existed not that long ago, before usb c pd was a stanard, many samsung phones supported it (and not PD), and those powerbricks with those usb c cables still exist and still fit into PD phones. The PD 2.0 spec came out two and a half years before samsung's first USB C phone. And the power brick that came with it wasn't USB C. > It says 45 watts, will that charge her laptop? I'm not sure, but a 65 watt charger d…

> The PD 2.0 spec came out two and a half years before samsung's first USB C phone. And the power brick that came with it wasn't USB C.

So what, there's a brick that does qc, and there a usb c connector on the other end. My mom plugs it in, it fits, and it doesn't charge.

> I'm not sure, but a 65 watt charger definitely would. "Get 65W for a laptop" isn't any harder than any other third party power supply for a laptop. Which is optional, you don't have to get a third party supply.

How would my mom know that? The cable fits.

> Her old laptop charger didn't have a second phone plug. If you don't want the complexity then don't use it.

So why does it fit if it doesn't work then? Why is the other plug there if it makes the first one stop working? Again, if you know what PD is, if you know what current is needed for what device, if you know the power needed to power and charge that device, and if you clearly mark everything so you don't use the wrong cable for the wrong device (since the bricks are behind the nightstand), "it just works". Normal people don't do that. Normal people buy something that fits. 45W, 65W who cares, ikea advertises it can charge a laptop, why would a phone prevent it from charging a laptop?

> Okay. To your mom: Every 60 watt or higher charger will work. That super cheap one is only 5. It can't do it.

SO which ones are 60W? There are 3 similarly looking ones behind the nightsand, they all fit. So she must buy different colored cables now too, or move the nightstand every night to check which cable goes where?

> If you want to be sure then go for 60.

But my powerbank has only 18watts. I already have it. Will it charge the laptop? Or won't it? Or will the laptop charge the powerbank and drain the internal battery even faster?

> And what I'm saying is that a lot of these issues are not unique to USB at all. And most of the rest can be solved by either using the chargers that came with a device or hiding/trashing the e-waste chargers you have and only using the good ones.

Those troubles didn't exist before usb C, because every device had a custom plug that only fit that device and charged it properly, there was basically no way to mess them up. Something like this ( https://upload.wikimedia.org/wikipedia/commons/thumb/1/10/So... ) would only fit inside an ericsson phone and charge it.

And then everyone said "we're going usb C, one cable for everything", and my mom is happy! But hey, that old charger with usbA->C cable gives her a warning that her phone is charging slowly... it fits, but it doesn't work properly. Her earbuds charge on that cable but not on the ikea charger. Her ikea charger charges her laptop and her phone, but if her phone is plugged in, her laptop still shows the charging light, but the battery percentage is going down. The phone charger that she got with her new phone will charge her phone but won't charge her laptop. Her powerbank will charge from her old phone charger and her new phone charger, the led will be on, but it will take ages to charge from the old charger. Her powerbank will sometimes charge her laptop and sometimes her laptop will charge her powerbank, who knows when and how, the manual is in the trash.

Want to add data to this? Which of her existing usb-c cables will do data at what speed? usb2? usb3? Will it work for video? Thunderbolt?

Yes i know, I should go there, throw all the powerbricks in the trash, buy only 65 watt ones, buy only proper thunderbolt capable usb c cables, and mark have her charge her earphones on the pc with her usbA->C cable, but that's a waste of money and a lot of electronics in the trash for no good reason. If i did that a few years ago when PD became a thing, she'd have 18W chargers everywhere and i'd have to replace them again when she bought a laptop with usb C charging. And again, I could do that, because I know the tech behind all that, and can read voltages and currents... if i didn't, i wouldn't even know what to buy, i'd just go to ikea (she likes white powerbricks for some reason), and get whichever was available, probably the 45W one, because it has two ports instead of one on the 65 watt one.

Re: An Engineer's Guide to USB Typе-С (2024)

#84

Earlier quoted context omitted.

> They existed not that long ago, before usb c pd was a stanard, many samsung phones supported it (and not PD), and those powerbricks with those usb c cables still exist and still fit into PD phones. The PD 2.0 spec came out two and a half years before samsung's first USB C phone. And the power brick that came with it wasn't USB C. > It says 45 watts, will that charge her laptop? I'm not sure, but a 65 watt charger d…

> The PD 2.0 spec came out two and a half years before samsung's first USB C phone. And the power brick that came with it wasn't USB C. So what, there's a brick that does qc, and there a usb c connector on the other end. My mom plugs it in, it fits, and it doesn't charge. > I'm not sure, but a 65 watt charger definitely would. "Get 65W for a laptop" isn't any harder than any other third party power supply for a lapto…

> So what, there's a brick that does qc, and there a usb c connector on the other end. My mom plugs it in, it fits, and it doesn't charge.

Well it kind of sounds many of your complaints involve A-to-C cables and like, if we had a variety of plugs the issues caused by adapter cables would get significantly worse, not better.

> How would my mom know that? The cable fits.

This is a different scenario from someone asking if 45 watts will work.

> So why does it fit if it doesn't work then?

It does work. You said it worked.

> and if you clearly mark everything so you don't use the wrong cable for the wrong device (since the bricks are behind the nightstand)

Wait, is it two bricks or one brick? And either way you can solve that with a good brick.

> Normal people buy something that fits.

Yeah, do that! Where "fits" means watts, nobody is testing the physical plug in the store. Buy something where the spec fits.

> ikea advertises it can charge a laptop, why would a phone prevent it from charging a laptop?

Normal people can understand "if you split the power it splits the power", Jesus.

One device per brick if you don't want to split the power. Simple.

> SO which ones are 60W? There are 3 similarly looking ones behind the nightsand, they all fit. So she must buy different colored cables now too, or move the nightstand every night to check which cable goes where?

Three bricks? Four cables total? Yeah different cable colors would be fine I guess.

Again I mention that going by "the cable fits" with a bunch of random barrel plugs could set things on fire. Needing to distinguish cables is annoying but at least avoids danger. And you can get a brick that handles everything if you want.

> But my powerbank has only 18watts. I already have it. Will it charge the laptop? Or won't it?

If you already have it then just test it, dude. Without USB a random power bank would have 5% odds of working at all, and you'd still need to test it to know, so this is a very petty complaint at this point.

> Those troubles didn't exist before usb C, because every device had a custom plug that only fit that device and charged it properly, there was basically no way to mess them up.

But sometimes those plugs match and yes you can mess them up.

And custom plugs make it so much harder to plug things in in multiple places, or get replacements.

> but it will take ages to charge from the old charger

This was true of a lot of phones before USB-C ever existed.

> Yes i know, I should

It sounds like a couple labels would work for this situation. And they'd be less annoying than repeatedly trying very similar but not identical plugs to see which fits.

Re: An Engineer's Guide to USB Typе-С (2024)

#85
post #62

Always found it a bit strange that USB-C is referred to as a "new connector" when it clearly seems to be an entirely new protocol. (Unlike the previous new connectors mini and micro which were just differently-shaped plugs for the same wires) So is the protocol technically USB 4.0 and USB-C "just" a new connector role defined by that protocol, or did they ditch the versioning and "USB-C" is its own thing? The guide m…

It's easier to split USB 3 into two stages:

1) USB 2.0 - 480 Mbps, 0.5A (2.5W / 5V)

2) USB 3.0 on Type-A - increases data to 5/10 Gbps (e.g. for SSDs) and power to 0.9A (4.5W / 5V).

3) USB 3.0 on Type-C - adds pins to enable most of the new stuff: base 3A (15W / 5V) and up to 240W with power delivery; extra data lanes for 20 Gbps, DisplayPort for external monitors.

4) USB 4.0 on Type-C - changes protocol completely (using packets instead of fixed lanes per pin) and requires minimum speeds and the use of type-C port.

A-to-C cables act like A-to-A as they don't have extra pins - they're just easier to use.

Pre-Power Delivery lots of phone chargers used A-to-C cables with a custom protocol to negotiate power draw beyond 0.9A. And some devices pull 3A anyway just assuming there's a power brick that supports 3A attached. But technically none of that is compliant.

Re: An Engineer's Guide to USB Typе-С (2024)

#86

Guides like this explain why there are so many broken USB-C devices. The guide mentions that you do not need a PD chip for 5Vs, but then tells you that USB C is a cold connector meaning 0V is on VBUS when nothing is connected and jumps straight into the complexities of the PD protocol running over the CC pins instead of explaining how to get the 5V without the PD chip first. Then in the section where it tells you how…

USB-C uses resistors to signal the power level for 5V. There is 5.1k for USB legacy, and I forget for 7.5W and 15W. Lots of cheap devices leave out the 5.1k resistors and depend on the same resistors in the USB-C to USB-A cable. It is perfectly fine for USB-C device to signal USB Legacy since every charger needs to support it for microUSB to USB-C cables. The other way is for device to dynamically negotiate power lev…

The device only signals that it's a power sink with its 5.1k resistors, there's only one way to put them there without implementing the full-blown PD protocol. It can't signal power levels (USB legacy / 7.5W / 15W) and doesn't need to, it's the power source that signals its capability.

You're probably confusing it with the spec requiring that the device does not attempt to consume more power than USB legacy from a source that doesn't advertise such capability - but even then there's no "negotiation" happening, it's just a matter of measuring the voltage on CC lines.

Re: An Engineer's Guide to USB Typе-С (2024)

#87
post #25

Guides like this explain why there are so many broken USB-C devices. The guide mentions that you do not need a PD chip for 5Vs, but then tells you that USB C is a cold connector meaning 0V is on VBUS when nothing is connected and jumps straight into the complexities of the PD protocol running over the CC pins instead of explaining how to get the 5V without the PD chip first. Then in the section where it tells you how…

My phone's USB-C port is worn out, and so now it's a brick if I don't have a wireless charging dock around. Is it physically impossible to get bandwidth and power out of something as durable as a Magsafe connector, even a larger-scale version?

That’s quite unusual as the connection was specifically designed to sacrifice the cable rather than the port (unfortunately mini-A was the opposite which, when coupled with a small insertion lifetime, was pretty terrible).

I’m sure you’ve tried changing cables so you’ve had bad luck. I’m sorry for you, but you’re unlikely to have this happen again with another device

Re: An Engineer's Guide to USB Typе-С (2024)

#88
post #22

My new iPhone with USB C charging is such an improvement! Thank goodness for the European Union. If it weren't for them, we'd all be stuck with these flimsy Apple charging cables forever.

Apple was a key developer of USB C and used its experience from developing lightning. They were also one of the first (if not the first) to sell USB C devices (2016 MacBook, then across the whole Mac line). I don’t know how much the EU affected their timeline; it’s unsurprising they moved to USB C on their biggest volume product last. And the lifespan of 30-pin and lightning were about the same.

This was a repeat for Apple: the first iMac was the first production USB computer and they were pilloried for that too.

Post reply on HN