When assembling my own USB 2.0 spec cables, I haven't had any experience with frying PCBs they get plugged into (of custom-made keyboards primarily), but I hear stories of it happening. So I'm trying to identify what might cause a DIY'd USB cable to fry a PCB, when it is connecting a peripheral (keyboard) to a host PC? Would transposing the VBUS/GND conductors on one end of the cable do it? Is it even possible in modern PCs that a mis-assembled cable would fry a keyboard PCB? Thanks!
If you are shorting the VDD and VSS of the USB, you are not frying the keyboards at first. The Host PC is at the major risk of damaging the whole USB port. The Keyboard would be just an eye witness.
Depends on the Model, make and luck anything of the below is possible:
- The USB port will get temporarily disabled
- The USB port will let more than 100 mA or even 500 mA to let the cable or the connection fry including itself
- USB will fail permanently to work
- The devices attached also would fry or fail.
Have a protection feature to protect both your device of the interest and the host:
Incorrectly wired cable can do damage. Don't miswire them, or at least test them before use.
Data pins are in general not 5V tolerant. If Vbus gets swapped with one of the data pins, the data pin can get damaged, and it can do a lot of damage to whole device if 5V Vbus gets fed to 3.3V supply via internal protection diodes in the USB chip, so all chips may get destroyed with overvoltage on supply.
Swapping Vbus and Ground would swap the input polarity to the device. Sending -5V to any chip that expects +5V might fry it. In case where GND and cable shield are connected in the device, swapped polarity will short Vbus to shield and depending on PCB track width it can act like a fuse so the copper trace will heat up and melt.
Also even a correctly wired cable can do damage if the device has no ESD protection.