I've just chopped a usb to micro-b usb cable.
There are 4 small wires inside
Isn't it universal that Red is power and black is ground?
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
red = +5 V
white = D-
green = D+
black = ground
(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.
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:
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 %... :-(
USB version 2.0 specification (.zip file format, size 19.5 MB)