Hacker News new | ask | show | jobs
by geor9e 329 days ago
Because the USB Consortium made a terrible mistake. Instead of speccing USB-PD power supplies to default to 5V <3A when there are no resistors in the port of the other device, the default is do nothing. So in order to be in spec, you have to refuse to charge non-compliant ports. This means the compliant power supplies are worse, in a way. So you need to use a "dumb" USB-A power supply and USB-A to C cable, which does default to 5V <3A to matter what. As for why some devices choose to use non-compliant ports - I assume it's extreme cheapness. They save a penny on a resistor.
6 comments

At this point I'm even surprised that compliant cables and chargers exist so the GP can have that problem.

But I believe the specs are that way to avoid problems with OTG devices. If both devices decide to just push a voltage into the cable at the same time, you risk spending a great deal of energy or even start a fire. That said, there are better ways to deal with this issue; those are just slightly more expensive.

I think the Apple USB-C charger I have is compliant and so is the cable. I actually use it to charge my Samsung phone primarily, but inadvertently discovered that it won't run a Raspberry Pi 4 at all. The $12 adapter that is sold for that purpose runs the Raspberry Pi 4 just fine. Apparently because it just supplies 5 volts all the time, no matter what the device says.
The Raspberry Pi 4 has a design error in its USB-C circuitry.

It does include a pull-down resistor, but wired incorrectly (compliant devices need two), which results in compliant chargers only correctly detecting it when using a “dumb” (i.e. containing no e-marker chip) USB-C-to-C cable. Your Apple cable probably has a marker (all their Macbook charging cables have one, for example).

Thanks for the explanation. I actually found out the USB-C plug can act as a USB device. At USB 2.0 speeds oddly enough. So I have all my Pi 4s configured now in that mode and I just power them through the 5 volt header, which seems simpler. Albeit less convenient.

I had to get this USB "power blocker" that only passes the data pins through, otherwise the Pi runs off the computer it is plugged into all the time

> At USB 2.0 speeds oddly enough.

That's because USB 3 is not natively provided by the SoC on the RPi 4, but rather by a dedicated IC, connected to the main SoC via PCIe :)

Hence there's two USB 3 ports and two USB 2 ports, but wired completely differently internally! Presumably the USB-C port is connected to the SoC more directly.

If it is all 5 volts, it will not do much. But perhaps that screwball PD stuff would get you in trouble. The OTG stuff, just concerns who is the usb host. Where the otg cable instructs a normally client device to act as a usb host, Where the holy grail was to find that magical OTG cable that would let me charge the phone while it was acting as host. Hmmm... on reflection, this would be any dock right?

And a rant, for free: Holy smokes, I think OTG may be the second most braindead marketing dribble sort of acronym to come out of tech, right behind wifi(wireless... fidelity? what does that even mean?)

Maybe the USB-IF agrees, because OTG is no longer a thing with USB-C.
No need to have a separate USB-A brick - simply have a USB-C brick plus C-to-A adapter. An adapter will force 5V down the port no matter what. But afaik you still need USB-A cable (or another adapter?), which kinda defeats the whole idea of having just one cable.
I guess this is only partially true, as I have a A-to-C charger cable from Huawei that works with everything except my Pixel 4A phone. And my Pixel 4A phone works with everything except that specific cable.
USB A->C cables are supposed to have a Rp pullup on CC1, and leave CC2 disconnected. Huawei made some A->C cables which (incorrectly, and spec-violatingly) have Rp pullups on both CC lines, which is how you signal you're a power sourcing Debug Accessory

Your Pixel 4A is entering debug accessory mode (DebugAccessory.SNK state in the USB-C port state machine); other devices probably don't support debug accessory mode and just shrug.

Maybe the cable is missing the CC pin resistors (all USB-A to C cables are supposed to have them to identify themselves as such), and maybe only the phone cares.
Not related to this exact problem: but also note that the cheapest cables max out at 60W, anything more power needs a new special cable that does its own smarts and communication regarding proving it can handle more power (total nightmare I found, also some computer manufacturers have years of usbc-pd bugs still troubling computer bootups)
could be for safety reason ?, many device with usb c port can be used underwater(smartphone).
It's not a terrible mistake. A terrible mistake would have been having such power available on ports that even a reasonable person might short out by innocently connecting a USB C cable between them.

A couple 5.1k resistors add about $0.00001 to the BOM cost. The terrible mistake is on the designers of devices who try to forego these.

It's really not the BOM cost that drives these decisions but the assembly cost of adding placements. Time on the assembly line is very valuable and doesn't have a simple / clean representation on a spreadsheet. It's dependent on the market and right now assembly line time is worth a lot.
That is exactly the reality. I work in a place where we build HW. The resistor costs almost nothing. But installing it, having it in stock, making sure the quality of yet another component is correct, eventually managing another vendor, all costs. So much, that the cost of a resistor we put a value of some cents (up to ten) even when the part itself cost so little that the software has problems tracking it.
Except that connecting 5V to 5V does not cause a short circuit. No current will flow without a voltage difference. If there is a difference, the capacitors in one of the power supplies will charge up to the same voltage and then current stops flowing again.
That would be true if both sides were exactly 5.0V, but they're not. There's a 5% tolerance, from 4.75V to 5.25V, and in practice you will see chargers often run "5V" at 5.1V intentionally, to account for resistive loss in the charging cable. If you accidentally connect your "5V" device to the host's "5V" you may find that the host simply disables the port, which has happened to me more than once. So no, you can't just blindly connect them together.
Yes you can. They will not blow. Nothing will happen.
What do you mean by "blow"? There's often a polyfuse which will trip, and needs to cool down to reset. I haven't seen a normal fuse but I believe it's possible. Efuses are also common, to allow the system to automatically reset as soon as the fault condition is removed.

It's unlikely that anything will be damaged, but the device likely will not work until the issue is resolved.

No it will not. Have done it thousands of times. No no no. You can downvote all that you want, but you will still be wrong. It will happen nothing. Period. If you do not know about it, educate yourself before downvoting and commenting about fuses.

Because of all these supplies work with transistors they do not act as a load to the other. Is like if the 2 had a diode in the output (in fact they do have one, but not directly in the output).

This is my typical experience in HN lately, is getting full of people with absolutely no idea what they talk about, and are constantly downvoting good comments.