Hacker News new | past | comments | ask | show | jobs | submit login

TL;DR; USB-C cable had GND tied to Vbus and Vbus tied to GND (opposite as it should be)

Honestly, I'm surprised that this isn't something that thelaptop and other such USB adapters aren't equipped to deal with. This is only slightly worse in my book than a USB adapter being fried from shorting the Vbus and GND pins together




That's worse than a short. A short pulls the Vbus to 0V, leading to high currents on the source, so whatever overcurrent protection it has kicks in. What he had here, instead, was -5V on the Vbus pin, way outside the acceptable voltage range (which is probably something like from -0.5V to 5.5V). It's no wonder everything fried.

The protection against reversed voltages like that would be a crowbar diode between Vbus and GND, to convert the negative voltage into a short circuit. But even if it had that reverse protection, if the current was high enough (since the negative voltage was from a charger, it's not unlikely) the diode could burn open, and then you have negative voltages again. And I don't know how common these crowbar diodes are; they probably are rare, since the USB connector is keyed so it can't be plugged "backwards" (the type C connector is mirrored instead, either orientation connects the pins the right way).


A diode crowbar or a single would imply a drop of ~0.6v on the line so you always would get 4.4 volts .

However there is other kind of protections like this : http://www.edn.com/design/analog/4368527/Simple-reverse-pola...


From what I understand, a crowbar diode is a reverse-biased diode put in parallel with the bus, not in series. In normal operation (correct polarity) it doesn't conduct, since it's the "wrong way", and there's no voltage drop since it's not in series with the circuit.

But when the polarity is reversed beyond the diode's voltage drop (that is, beyond -0.6V in your example), the diode is now the "right way" and conducts, limiting the reverse polarity voltage to the diode's voltage drop (in your example, it won't get below -0.6V).

However, that means that all the reverse-polarity current goes through the diode, in effect a short (like putting a physical crowbar across the battery terminals). If the diode holds long enough, the voltage source's short-circuit protection (be it a fuse, a polyfuse, or something else) should cut the current and all is (mostly) fine.


Electrical faults are just a fact of life. Wires fray, cables get tugged, or are miswired from the factory. And you just know that sooner or later some genius is gonna jam a butter knife in there for the hell of it.

The basic USB spec requires that all ports be protected with a small self-resetting polyfuse for exactly this reason. I don't know if the Type-C or USB 3.1 specs includes something similar - I would assume so but perhaps the additional current capabilities made that infeasible.

http://elinux.org/Polyfuses_explained

A standard USB polyfuse usually resets pretty fast (as soon as it cools down) but they could take up to a few days. It's also possible the manufacturer cheaped out and didn't include a polyfuse, of course.


I found a USB Cellular data adapter in the trash and plugged it in to my MacBook Pro, which instantly shut down.

Rebooted, and the USB port did not work. Shut it down and left it for half an hour, and, yay, all working again.

Disassembled the adapter. Turned out to be a dummy used for display. No guts, just a steel bar across all four pins of the USB connector. Looked real from the outside.

It was a very, very stupid thing to do. Thank-you Apple for putting a self-resetting fuse in my MacBook Pro. Saved my idiot butt.


Plugging random USB devices into your computer is a bad idea, full stop -- miswired or not. "I found this in the trash and plugged it in" is the bane of CISOs everywhere.


This was an A-C cables, which means it was used to charge the laptop, not to power something from the laptop.

Current limiting doesn't magically protect powered devices from voltage reversal (-5V instead of +5V), so both the laptop and power delivery analyzer went poof.

They may have taken enough current to trip charger's current limiter, but then it was a bit too late.


Why would you design in reverse polarity protection? It adds cost, and the mechanical connector already makes it impossible for VDD to short to GND in USB type C because of its rotational symmetry.


I constantly have Vdd shorts due to ground loops when measuring stuff. But a more frequent case is worn out cables (every lightning cable I've owned has eventually broke).

Its not rare enough of a failure mode to ignore.


Yes, and that's why the USB spec puts the burden of protecting against electrical shorts on the controller. The device side shouldn't have to worry about trying to shunt 100 Watts of power somewhere.

I mean this kind of protection is way beyond typical ESD protection due to the power involved. It would add a lot of cost to do this, maybe even a dollar or two in raw material.


If you stop the current from flowing, you don't have to shunt any power anywhere.

You'd have to open the circuit in the face of 5V of potential hooked up backwards, not really a tall order.


I don't want to be a broken record, but you're right, not a tall order, but no it's unreasonable on account of cost. It's impossible for USB C to be hooked up backwards by its mechanical design, so why guard against it? The high-side transistor to prevent reverse polarity faults could be 3 to 4 cents in manufacturing cost! It's also not trivial to make sure that transistor trips fast enough to prevent all your low-voltage ICs from being destroyed.


Most likely cheap consumer devices wouldn't get it, but prosumer, enterprise and industrial gear should think twice about cutting corners on peripherial protection circuits and make sure to test vcc ground reversal and application to data pins... because commercial engineering boils down to risk management.


> t's impossible for USB C to be hooked up backwards by its mechanical design, so why guard against it?

Because cabling can fail in other ways. A short could be caused by mechanical damage to the cable anywhere along its length. It would be nice to have a host that doesn't burn up in those scenarios seeing as they are already required to protect the bus.


Like other comments have mentioned, a short is not a voltage reversal. The methods to alleviate them are different. As the connector is polarized, the only way to get a voltage reversal is for something seriously strange to happen either at the power supply end or the cable.

If it is at the power supply end, all bets are off. If your USB charger fails short prepare for mains voltage to absolutely fry anything and everything connected to it and a negative voltage is the least of your worries. In the cable, a miswiring is seriously negligent and I see no reason why it should be designed around.


Sure, but the magnitude of that cost matters a lot. You were saying a dollar or two in raw materials to protect against 100W, now you're saying three or four cents. A few cents to protect hundreds of dollars in equipment from electrical faults seems worthwhile to me.


That makes sense from the consumer's point of view. But imagine you're a manufacturer, producing USB device controller chips by the million. Would you really be willing to spend tens of thousands of dollars to protect against a failure mode that can only happen due to some other company's extreme negligence?


Yes, but of course it doesn't matter what I think.

It's not abnormal to add protection that isn't needed when everything works properly. As noted elsewhere, the USB spec already requires resettable overcurrent protection, for example.


Tens of thousands of dollars total is far less than it costs a company just to moot the question.


Sorry I was not clear in my comments. The dollar solution is for some type of crowbar circuit. This is the most robust solution.

The 3-4 cents is for specifically, reverse polarity protection when somehow, a -5V differential is applied to device power inputs.

This cheaper solution only narrowly addresses this particular power fault, and no others.


I see! A dollar per port for robust protection against a wide variety of faults sounds pretty good to me, but I know that sort of stuff doesn't sell well when people compare primarily on price.

Do I assume correctly that a fuse for overcurrent protection wont act quickly enough to save the hardware in the event of reverse polarity?


Shorts and polarity reversal aren't the same thing, and the protection circuitry is different.


Look for a long response near the end of the article comments, from Mike Crawford. It goes into detail as to why that protection isn't designed in - it's not cost (diodes are cheap), but power drop, which has side effects.


This was a C-to-A adapter cable.

what was wrong was that the Vbus on one end was hooked to the GND of the other end.


unless the connector were cut, or some other catastrophic failure. I tend to think ruining a devices USB controller should be near impossible short of something like the USB killer (http://arstechnica.com/security/2015/10/usb-killer-flash-dri...)


I was playing with a FTDI (a clone :D) and an Arduino and accidentally mixed up VCC and GND from an external power source. I only realised because Minicom was failing to connect to the device. Then I realised what I had done, I tried removing it from the USB port and putting it back in, but it wouldn't work. I then tried a mouse too, but that wasn't working either. Thinking I'd killed a USB port on my Mac (well there are two, so...) I then tried rebooting and that fortunately fixed it.


Use ... a ... hub.

If you're doing lab work, it's really easy to get weird potentials on various lines. I almost never plug anything like an Arduino directly into my laptop without a powered hub in between.

I assume I'm a klutz. So, I take steps to minimize the damage when something happens.


Anyone have a hub to recommend? I have a hub which I bought for cheap on eBay which I use on my desk for keyboard, mouse and similar but would not trust that hub to offer much if any in way of voltage protection so I'd like to know about safe hubs for lab use.


Just about any externally powered hub is fine. As long as you're plugged into the wall, it's going to help dramatically if something stupid happens.

Personally, I've switched over to using USB 3.0 hubs. They supply more power and seem to be better built.


the usb ports on macs are supposed to have overcurrent protection. You actually get a dialog popup in the OS when it happens.

I know because I've triggered it doing something with an arduino.


USB overcurrent protection is pretty sophisticated. Devices get 100 mA for free, then have to ask the host for more current. Well, it's a bit more complex nowadays, but that's the basics.


I'm not sure if there are many devices which actally follow that spec to the letter (in either direction). Usually the USB ports will just allow 500mA (or whatever they're designed to provide) plus some fairly generous overhead, regardless of what the device has asked for, and assuming they bother to implement overcurrent detection at all.


I believe macs give you 500ma for free


Yep, did almost exactly this, shorted a converted 3.3V from a different USB port (same machine) to ground on a different USB port and end result is my motherboard lost all USB connectivity until I rebooted


Well, it protects against some metal object getting inserted into the USB port.




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

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

Search: