Thursday 15 October 2015

usb - Just chopped a cable, is red power, black ground?


I've just chopped a usb to micro-b usb cable.


There are 4 small wires inside



  • Red

  • Black

  • White

  • Green


Isn't it universal that Red is power and black is ground?




Answer




red = +5 V
white = D-
green = D+
black = ground



enter image description here


(Page 89 of the USB 2 specification)


edit (after reading the other 649 pages)

OK, that's from the formal specification. Reassuring, isn't it? It can even get you an accepted answer. You can feel it coming: there's a but.


enter image description here


This is from page 94. At first sight it seems to confirm what I said, but then there's that word "typical". So not mandatory? I read some more, and the answer isn't clear. The word "typical" must be the most used word in the spec, and also seems to be used for mandatory specifications:


enter image description here


There's that word again, page 93. Sounds like non-binding, but the text above it does say "should be oriented to allow" (emphasis mine). So "typical" seems to be used for mandatory specifications. Talk about confusion!


Apparently there's only 1 way you can trust: measure it. Compare the wire color with the pin number on the connector. The pin number locations are shown in the drawing and their assignments in the table. I'm 99 % sure that it will agree with the "typical" wiring assignment.


There's just that other 1 %... :-(



Further reading
USB version 2.0 specification (.zip file format, size 19.5 MB)



No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...