Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.


>Because of all these supplies work with transistors they do not act as a load to the other.

This is utter nonsense, Ohm's law doesn't magically stop working with a transistor. I do know about this, I've designed power supplies and USB devices, and I've destroyed more than a few components accidentally by connecting two switching supplies together. Yes, there will be current flowing, and yes, sometimes a fuse or breaker will trip, I have experienced this many times, and just because you haven't doesn't mean it doesn't happen.

>Is like if the 2 had a diode in the output (in fact they do have one, but not directly in the output)

Sounds like you're referring to either ESD protection diodes, or flyback diodes, neither of which do anything in the case of two similar but unmatched power supplies.

I'd advise you to get a degree in engineering (as I have), or do some serious studying, as this kind of uninformed discussion is not productive or helpful to anyone, it's just noise.


Wow. You really are interesting person. You obviously have no idea what you talk about, but keep insisting…

Man… you are really a nice case.

Let me make a last attempt, even when I know it will fail:

1) “Ohm's law doesn't magically stop working with a transistor”

Ohm’s law works only with linear components, is a linear relation. So NO it does not work in a transistor or a diode. No it doesn’t. No because of your magic ignorance, but because they are not frigging linear! Go study some physics.

2) No, I was certainly not referring to ESD diodes, but the rectifier, at the end of any SMPS. Some may have a last stage linear regulator, in that case the diode is part of the juncture of the output transistor. At any rate, ANY wall mounted power supply, and 99% of all supplies in the world, when the output is higher that the target voltage will just shut down. GO TEST IT AND STOP with your nonsensical replies.

BTW: the 1% of supplies that do regulate down are called “4-cuadrant-supply” are much more complicated, and expensive, and makes no sense to use in a USB charger.

I don’t care which degree you have, if you really do, and was expensive, ask for your money back. In case is not a degree in prompt engineering…


I know what I'm talking about, I am a professional working in electrical engineering. Please don't insinuate that I don't, it's unnecessarily insulting.

If you have two power supplies at different voltages and connect them together, there will be a finite resistance through the cable and Ohm's Law applies. Current will flow. With a low resistance and big enough voltage difference, there will be a significant current, and it can trip the supply. This is not difficult to achieve.

The rectifier you're referring to is the flyback diode in that case. But now as you've said yourself, the power supply will shut down if the voltage coming in is too high, which is frequently due to either a polyfuse or an efuse tripping. So it sounds like you're just arguing to argue, while actually agreeing with my point. You said "nothing will happen", but if one shuts off, something has happened.

I don't need to test this, I have done it. I also have quite literally thousands upon thousands of other engineers, books, universities etc backing me up, and you do not. Connecting two USB supplies together is a bad idea and will likely result in one switching off. Don't do it.

Either way, I'm done trying to convince an amateur. Feel free to do what you want.


I don’t know at this point if you have fun trolling around or what.

“If you have two power supplies at different voltages and connect them together, there will be a finite resistance through the cable and Ohm's Law applies.”

That is an error that only a person with minimal knowledge from TV shows can do. That is absolutely bot true for regulated power supplies, SMPS or Linear, becauae (even if the later is called linear) they are not linear. So no, you cannot apply Ohm’s law.

“The rectifier you're referring to is the flyback diode in that case. But now as you've said yourself, the power supply will shut down if the voltage coming in is too high, which is frequently due to either a polyfuse or an efuse tripping”

Noooo I’m talking about the diode at thr end of any SMPS, buck, boost, fly-back or whatever type, or even a linear regulator. Is about how a regulated power supply works: as the voltage goes up in the output, it shuts down, stops the output current, in an intent to liwer the voltage. There is no fuse in 99% of supplies out there, because they have active protection. Is called a transistor, not a polyfuse.

“I also have quite literally thousands upon thousands of other engineers, books, universities etc backing me up”

That is what you think, but you are wrong. Sorry mate. If you would just go to a lab and put 2 power supplies in parallel, like I do pretty much daily, you will see you are wrong.

You are the most ignorant, obstinate and arrogant person I’ve seen in HN… and here is full of it. I’m 100% sure you studied CS in a medicre university, work as sw dev, and think you can talk with an EE. You say you work with electrical stuff, but your other posts reveal you are a SW dev. Obviously you are a liar, and trying to be right when you are sooo obviously wrong.

I do care what you do, because with such an arrogance and incompetence together, you are going to get somebody hurt or killed. Please start studying and stop being so stubborn when you are just wrong!


akshually (hehe sorry couldn't resist) ohms law keeps working, its just that the resistive component in the formula varies according to the applied voltages because of active components but ohms law continues to obey the math that results. very trivial observation tho, so downvote if you must lol


You are right. ohm’s law does not stop working. Never does. Is just you cannot apply it to any circuit blindly.




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

Search: