Hacker News new | ask | show | jobs
by josteink 3783 days ago
Does anyone else find it concerning that our new and best technology is so fragile that even the slightest fezz-up in what should be a passive signal-cable can cause our otherwise state of the art equipment to fry itself?

Is reliability, durability and robustness nowhere to be found in any single spec for our new standards?

9 comments

It was not a slight fezz-up. It was miswiring in a power cable. It's like electrician wiring the live pin into ground pin and then wondering why one gets electrocuted by so many devices.

No specification can defend against a hostile, or sufficiently incompetent, implementer.

It's what fuses and diodes are used for. You know how when you write a program you never trust user-input? This should be the same thing, but physically. A well-designed USB port wouldn't fry the computer like it did.
There is a limit on how much user malice should be tolerated vs the cost (additional components used, larger devices etc etc) to implement all of that. Especially as someone can always just rip the device open and circumvent all that causing breakage. How many stops there should be versus malicious usage?

USB devices can handle things like the ground and voltage being shorted, as that can happen in normal use through wear and tear. However the flip of ground and voltage lines can only happen if it is done intentionally. As an example either by malicious user or by a factory just randomly mashing wires together and then lying to the customers that they're selling an USB cable.

Or an untrained or too-tired worker puts the assembly in the jig upside-down and pushes the button. ker-chunk. Then the worker throws the cable in the good bin because he gets paid by the kg of cables produced, and fired if the bad bin fills up.

It's 5A, they could install a polyfuse, or they could monitor the current and turn it off with a transistor.

As I already explained in the previous thread about this cable, current limiting is implemented in USB hosts and chargers and it doesn't help in this case. If the powered device sinks more than 5A of reverse current, it already is dead.

For protection from reverse voltage, the powered device needs a circuit which detects negative voltage and disconnects power (which would easily consume few cm² of PCB area) or a very beefy clamping diode to shunt the negative current into ground before it reaches other circuits and pray that charger's current limiter trips before the diode overheats and vaporizes.

And even if you do that, some idiot can still make a cable which applies -5V to some data line instead of the power line, so that your whole unobtanium Intel southbridge chip goes poof. Are you going to multiply the protection circuit by the number of wires in USB3 cable and at the same time make it pass insanely fast signals without distortion?

At some point you have to give up and simply assume that cable vendors are at least minimally competent.

Is that really true? (I have no idea just asking). Is there nothing you could put in the device to prevent bad inputs from damaging the internals? (for some definition of bad)

Is it a question of impossibility? Or cost? Or bulk? or something else?

I thttp://www.fiftythree.org/etherkiller/ttp://www.fiftythree.o... it's a matter of foreseeing the potential failure modes and correctly deciding which ones are so remote as to be not worth the cost and complexity to protect against. For instance, I don't think there's a consumer device out there that wouldn't fry if connected directly to mains AC through any peripheral port at all. But that doesn't stop someone from making a cable that connects AC to USB and saying it's a fast charge cable on Amazon. That's a more extreme case than this, but only because it's more obvious what the flaw in the cable is.
A cable with a mains plug at one end and USB on the other is obviously wrong, though.

Mains power is legitimately difficult to deal with. Power that's five volts out of spec is not.

A cable that puts 5 volts into random pin is also obviously wrong.

It's a balancing act between the probable failure modes and the cost of replacing the broken devices. Hostile manufacturers is not common enough of a failure mode (vs just Amazon sending a replacement device) to accept the additional cost for every single unit made. It makes no sense to spend 1 dollar more per device if it saves 1 cents per device on average for replacement costs.

If this kind of issue becomes more common then it might make sense. But for now it doesn't seem likely.

>A cable that puts 5 volts into random pin is also obviously wrong.

I mean that the physical object is obviously wrong. Such a cable looks like any other cable.

Just as a side note, some of the cheapest USB chargers have 1mm or so of clearance between high voltage and low voltage circuits, which places them one small accident away from the "mains to USB adapter cable" territory.
I know, but that's not a cable. You need more diligence when buying transformers, but a wire with a plug shouldn't be able to do unexpected damage.
Sorry about the weird url problem. I typed this on my phone in the HN app and had tried pasting in a URL at the end of my text. After being seemingly unable to get the URL to show up after two tries I gave up and cut down my post to not talk about the URL. I seem to have somehow inadvertently double pasted said URL to the beginning of my post in the process of all that.
I have actually seen a wall plug with V- and GND mixed up. Luckily nobody was injured and nothing was set on fire, but we did wonder why touching the dishwasher gave us a noticeable shock until we figured out what was wrong.
Assuming you mean neutral and ground, at least those are nominally the same voltage. If you mean something else then I'm going to need more explanation of what wires are in that plug, and I'm slightly terrified that it still ran.
From the review:

> I directly analyzed the Surjtech cable using a Type-C breakout board and a multimeter, and it appears that they completely miswired the cable. The GND pin on the Type-A plug is tied to the Vbus pins on the Type-C plug. The Vbus pin on the Type-A plug is tied to GND on the Type-C plug.

Although I haven't read the spec, following the spec is a key part making use of a standard.

I would say that the Chromebook's USB ports are probably to blame as well. Shorting the +Vpp pin to GND should only result in sinking the maximum current but not in the port being damaged. Likewise, I'd expect the signal port to be protected against shorting it to GND or connecting it to a (moderately) high input voltage. The USB standard does probably not require these kind of protections, but they are nevertheless good, defensive design for any port that gets connected to a large number of unknown and potentially dangerous / badly designed devices.

Btw I already destroyed some parallel, serial and USB ports when connecting them to devices I built that malfunctioned or were ill designed (during prototyping), so as a measure of safety I now often use optocouplers to galvanically isolate my circuit from the port, which can help to prevent most kinds of damage.

This was not shorting +Vpp to GND; this was putting -Vpp in the +Vpp pin. All pins are referenced to GND, which is 0V by definition, so if you put +5V in it, it's the same as subtracting 5V from the voltage in all the other pins. And since they put the 0V in +Vpp, it became -5V. Most devices aren't prepared for negative voltages.
Point taken, but I still think that the device should be protected against supplying it with a "malicious" input voltage, as there are cheap and robust components to do this. The NCP373 for example (http://www.onsemi.com/pub_link/Collateral/NCP373-D.PDF) protects against voltages between -30 to 30 V and is designed exactly with the "faulty USB cable" use case in mind, and the low-volume cost is just 50 cents (large-volume cost is probably much lower). So I think there really is no excuse for letting a faulty 5 $ USB cable destroy your 1000 - 2000 $ device, even if it supplies an input voltage of the wrong polarity.
This isn't the first time stuff like this has happened. I had a Sansa Fuze MP3 player (from SanDisk) a while back. It used the exact same connector as the iPod. The only difference is two of the wires were swapped. One of them being PWR, so if you used an Apple cord, you would fry your player.
I agree that these ports should be robust against abuse, but reversing polarity on a DC power cable is far from a "slight" screwup.
Its not a slight fezz-up really though. They reversed positive and negative on the power connections. That is a very basic mistake and one that often at least blows a fuse, if not worse.
USB C is not a passive signal cable.
Tomay-to/tomay-to.

Yes, USB C can also be used to provide power (which is also a form of signal), but again my point is that a cable like this is largely expected to be a passive component.

That a crap charger can do bad things would probably surprise no one, but hooking a good charger up to a good unit shouldn't be able to fry anything, ever.

Wasn't USB C supposed to make our lives easier? If we need to ensure all our USB C gadgets, cables and chargers are all not-exploding certified, in parts and in combination, I may just go back to plain old regular USB.

Hooking up a good charger up to a good unit with the ground and voltage wires reversed can fry things.

You can try it with your laptop. Cut the cable after the transformer, flip the ground and live wires and start it. It will get fried. Is this the fault of the specification or the person who intentionally flipped the wires?

The manufacturer was the person flipping the wires in this case.

In this case, it's DC over the USB-C cable. Reverse polarity protection is 1) easy and 2) cheap. That's the most striking part to me, and I almost thought the original post was a joke... because it seems insane there wouldn't be reverse polarity detection built-in to the laptop.
According to the engineer who tested the cable:

"Most devices with a well-specified connector will not have any reverse bias protection in them because both it shouldn't be needed and for the technical reasons of power loss and space used.

Reverse protection is usually done with diodes, the canonical "one-way valve" of electronics. Diodes have a voltage drop across them, usually 0.6V for standard and 0.4V for Schottky types. Using one of these to protect one rail means you'll have about 1W lost to heat when charging at 3A. They are also not small for the currents involved with high-speed charging, being about 7x6x2.5mm for the smallest ones I can find that can handle 3A.

Devices don't usually have too much in the lines of over current protection outside of something like a polyfuse because the device will dictate the current used; if everything is okay in the device it'll set the charging rate and it only needs the most basic of protections in the case that something goes grossly wrong with the device. Sources are what really need overcurrent protection as they don't "have a say" in how much current is drawn."

I mean, yeah, it makes sense. You can reasonably expect chargers/cables not to be quite this jacked up, and in turn, you save space in a space-constrained device. It's just a hard pill to swallow thinking that a stray cable could ruin my device like that.

(Power dissipation aside, I did manage to find some smaller Schottky power diodes that could easily handle the current. There's also the possibility of using a MOSFET, which would turn into Rds(on) * Iavg, so something like 0.15W for Rds(on)=50mOhm, which is much more manageable. I'm just a shade tree electronics guy, so I realize there was probably enough data to make a decision to forego said protection.)

A power cable would be a passive component.

I've had several of Apple's little power charging blocks melt and burn on me.

I had a CRT monitor explode when I was a kid.

Just because stuff is getting smaller doesn't mean it's any more or less liable to break. You use electronics, you're taking a risk, and if you use off-brand, non-official components with other brands, well, hell, even if you're using the official brand apparently, you're playing with, well, not fire, but electricity, which is almost a cousin of fire? Heh.

Pretty sure you could make a "plain old regular" usb cable that would do similar. Maybe you should go back to RS-232? You should also beware of just about any usb device you see, as it could be a http://kukuruku.co/hub/diy/usb-killer in disguise
Unfortunately for you, the exact same problem can happen with plain old regular USB; in fact, this cable had only the wires from plain old regular USB. Reversing the wires on a USB 2.0 cable would have the same effect.
Completely, no, but you can certainly safeguard. The One Laptop Per Child machines could take a reverse of positive and negative leads directly from a car battery and still be okay. The idea being that some poor kid somewhere was going to mess that up one day while trying to give it power. (Or rather I should say an EE prof told me this. I have personally not tried to electrocute any poor OLPCs)
The issue isn't the standard, but that compliance is not regulated by the retailer, the wholesaler, the standards body or the government, which is why consumers are trying to effectively regulate it themselves.