Very simple. Maximum length of cable is about 5 m for AWG20 and 0.8 m for AWG28 cable.
| Pin one side |
Signal | Description | Pin other side |
| 1 | USB Vcc (Vbus) | usually RED, wire should be 20-28 AWG | 1 |
| 2 | USB Data - | usually WHITE, wire should be 28 AWG | 2 |
| 3 | USB Data + | usually GREEN, wire should be 28 AWG | 3 |
| 4 | GND | usually BLACK, wire should be 20-28 AWG | 4 |
Colors do not mean anything in the wiring scheme. You can use any color wire to rig something. Just make sure the colors match from end to end. Using the de-facto color is for industry types only.
The maximum length of a standard USB cable (for USB 2.0 or earlier) is 5.0 metres (16.4 ft). The primary reason for this limit is the maximum allowed round-trip delay of about 1,500 ns. If USB host commands are unanswered by the USB device within the allowed time, the host considers the command lost.
The data cables for USB 1.x and USB 2.x use a twisted pair to reduce noise and crosstalk. USB 3.0 cables are more complex and employ shielding for some of the added data lines (2 pairs); a shield is added around the pair sketched.

