Artificial Intelligence Response
Direct answer to the question
A standard USB 2.0 cable is wired as follows:
| Pin |
Wire color |
Signal |
Function |
| 1 |
Red |
VBUS |
+5 V power |
| 2 |
White |
D− |
Data negative |
| 3 |
Green |
D+ |
Data positive |
| 4 |
Black |
GND |
Ground |
| Shell |
Bare/drain |
Shield |
Cable shield to connector shell |
Basic USB 2.0 wiring diagram:
USB cable internal wiring
Red -> +5V (VBUS)
White -> D- (Data -)
Green -> D+ (Data +)
Black -> GND (Ground)
Bare -> Shield / connector shell
USB Type-A pinout, viewed from the mating face:
┌─────────────────────┐
│ 1 2 3 4 │
│ VBUS D- D+ GND │
└─────────────────────┘
Key points
- For power only, connect only Red = +5 V and Black = GND.
- For data + power, connect all four wires.
- Do not rely only on color; verify with a multimeter because cheap cables may use nonstandard colors.
- For USB-C, manual wiring is much more complex and usually not recommended for repair.
Detailed problem analysis
To wire a USB cable correctly, you must understand three things:
- Connector pinout
- Wire function
- Connector orientation
The most common repair or custom wiring job involves USB 2.0, not USB 3.x or USB-C. USB 2.0 is practical to hand-solder; USB 3.x and USB-C are much less forgiving because of higher-speed differential pairs, tighter impedance requirements, and much smaller contacts.
1) Standard USB 2.0 internal wires
A normal USB 2.0 cable has:
- 2 power conductors
- 2 data conductors
- Shield/drain
- connected to connector shell for EMI control
Typical color code:
- Red = VBUS
- White = D−
- Green = D+
- Black = GND
- Bare braid/drain = shield
This is the de facto standard for many USB 2.0 cables, but not universal. In low-cost cables, colors can differ, so continuity testing is the correct engineering method.
2) USB Type-A wiring diagram
This is the connector normally plugged into a PC, charger, or hub.
USB Type-A pinout, front/mating face view:
┌─────────────────────┐
│ 1 2 3 4 │
│ VBUS D- D+ GND │
└─────────────────────┘
So the wiring is:
Pin 1 -> Red -> +5V VBUS
Pin 2 -> White -> D-
Pin 3 -> Green -> D+
Pin 4 -> Black -> GND
Shell -> Bare -> Shield
This is the most important diagram for basic cable repair.
3) USB Type-B wiring diagram
Used on printers, older development boards, and some instruments.
Type-B front/mating face view:
┌───────────────┐
│ 1 2 │
│ VBUS D- │
│ │
│ 4 3 │
│ GND D+ │
└───────────────┘
Wiring:
- Pin 1 = Red = VBUS
- Pin 2 = White = D−
- Pin 3 = Green = D+
- Pin 4 = Black = GND
4) Micro-USB wiring diagram
Micro-USB uses 5 pins.
┌─────────────────────────┐
│ 1 2 3 4 5 │
│ VBUS D- D+ ID GND │
└─────────────────────────┘
Typical wiring:
- Pin 1 = Red = VBUS
- Pin 2 = White = D−
- Pin 3 = Green = D+
- Pin 4 = ID
- Pin 5 = Black = GND
Important note about the ID pin
- For a normal device cable: leave ID unconnected
- For an OTG host adapter: ID is tied to GND
5) Practical cable-to-cable example
USB-A to Micro-USB cable
USB-A side Micro-USB side
────────── ──────────────
Pin 1 VBUS ---------------> Pin 1 VBUS
Pin 2 D- ---------------> Pin 2 D-
Pin 3 D+ ---------------> Pin 3 D+
Pin 4 GND ---------------> Pin 5 GND
Shell ---------------> Shell / shield
USB-A to Type-B cable
USB-A USB-B
───── ─────
Pin 1 VBUS ---------------> Pin 1 VBUS
Pin 2 D- ---------------> Pin 2 D-
Pin 3 D+ ---------------> Pin 3 D+
Pin 4 GND ---------------> Pin 4 GND
Shell ---------------> Shell / shield
6) If the cable is charge-only
Some USB cables contain only:
No white or green conductors means:
- no USB data
- only charging or power delivery at the most basic level
In that case:
Red -> VBUS
Black -> GND
White -> not present / not connected
Green -> not present / not connected
Be careful: some devices expect certain resistor schemes or USB signaling behavior to charge at higher current. Merely connecting red and black may provide only basic charging.
7) Why shielding matters
The shield is not just mechanical metalwork. It helps with:
- EMI reduction
- common-mode noise control
- better data reliability
- reduced susceptibility to external interference
Best practice:
- connect the drain/shield to the connector shell
- keep data wires as short as possible near the termination
- preserve the data pair geometry where possible
For USB 2.0 full-speed and high-speed operation, D+ and D− form a differential pair. Excess untwisting, long exposed sections, or poor soldering can degrade signal integrity.
8) Correct soldering sequence
A reliable engineering process is:
- Strip outer jacket carefully.
- Fold back braid/foil shield.
- Identify wires.
- Tin wires lightly.
- Tin connector pads.
- Solder data wires first:
- Solder power wires:
- Attach shield/drain to shell.
- Add insulation and strain relief.
- Test with a multimeter before plugging into equipment.
9) Orientation errors are the most common mistake
Many USB wiring failures happen because the connector is viewed from the wrong side.
Always ask:
- Is this a plug or receptacle?
- Am I looking at the mating face or the solder side?
- Is the diagram mirrored relative to my part?
This is critical. A correct pinout with wrong viewing orientation becomes a wrong cable.
Current information and trends
From a current engineering standpoint, the most relevant practical trend is:
- USB 2.0 cables remain the easiest and safest for manual wiring or repair.
- USB 3.x and USB-C are increasingly dominant, but they are not ideal for hand-wired repair because:
- more conductors
- controlled-impedance high-speed pairs
- tighter mechanical tolerances
- Power Delivery negotiation complexity
- possible electronically marked cables in higher-power applications
USB-C trend summary
USB-C can carry:
- USB 2.0
- USB 3.x / USB4 data
- higher current
- alternate modes
- USB Power Delivery
That makes USB-C far more versatile, but also far less suitable for simple “wire-by-color” repair. For most technicians, replace rather than hand-rebuild a damaged USB-C cable unless using a proper breakout board or connector module designed for soldering.
Supporting explanations and details
Why D+ and D− matter
USB data is transmitted using a differential signaling method:
\[
V{diff} = V{D+} - V_{D-}
\]
This approach improves noise immunity because external interference tends to affect both lines similarly, while the receiver detects their difference.
Why wire gauge differs
Typical cable construction uses:
- thinner wires for data
- thicker wires for power
Reason:
- data lines carry signal integrity constraints
- power lines must minimize voltage drop
Voltage drop is approximately:
\[
V_{drop} = I \times R
\]
So if current increases and the cable conductors are thin or long, device voltage falls. This is why poor USB charging cables cause slow charging or unstable operation.
Typical failure modes
- Broken conductor near connector strain relief
- Short between VBUS and GND
- Reversed D+ / D−
- Shield left floating
- Excessive untwisting of data pair
- Incorrect connector orientation during soldering
Ethical and legal aspects
For USB cable wiring, the main ethical and legal concerns are safety and equipment protection.
Safety issues
- A short between VBUS and GND can damage:
- PC ports
- chargers
- powered hubs
- embedded devices
- Incorrect USB-C wiring can potentially expose low-voltage logic pins to inappropriate voltage conditions.
Regulatory and standards context
Commercial USB products are expected to conform to relevant USB-IF practices and general electrical safety/EMC requirements. For personal repair work, the main practical concern is:
- electrical safety
- EMI control
- avoiding noncompliant cables that could damage devices
Good engineering ethics
- Do not provide a cable for others unless it has been properly tested.
- Clearly label any custom cable that is nonstandard.
- Avoid unsafe or misleading builds, especially power-only cables that physically resemble data cables.
Practical guidelines
Best-practice implementation
- Use a multimeter in continuity mode before soldering.
- Confirm each wire-to-pin mapping from the intact end of the cable.
- Keep D+ and D− routed together.
- Minimize exposed conductor length.
- Use heat-shrink tubing for insulation.
- Add proper strain relief.
Recommended checks before use
- Continuity test
- Pin 1 to Pin 1
- Pin 2 to Pin 2
- Pin 3 to Pin 3
- Pin 4 to Pin 4
- Short test
- no continuity between VBUS and GND
- no continuity between adjacent pins unless intended
- Mechanical pull check
- gentle tug on cable to verify strain relief
- Functional test
- first test on a low-value or sacrificial device, not expensive equipment
Important caution
- Do not make a USB-A to USB-A “straight power” cable unless you fully understand the application. It can be unsafe because both ends may be host-side power sources.
Possible disclaimers or additional notes
- Wire colors are usually, not always, standard.
- Some cables are power-only and have no data conductors.
- Some modern charging cables include special identification components or nonstandard internal construction.
- USB-C wiring shown in simplified diagrams is not sufficient for safe custom high-performance cable fabrication.
- If your goal is only to power a small project, a cut USB cable can be useful, but you still must verify polarity.
If you tell me the exact cable type, I can provide the exact pin diagram for:
- USB-A to USB-A
- USB-A to USB-B
- USB-A to Micro-USB
- USB-A to Mini-USB
- USB-C power-only
- USB-C USB 2.0 breakout wiring
Suggestions for further research
If you want to go beyond basic wiring, the next useful topics are:
- USB 2.0 differential signaling and impedance
- USB OTG ID pin behavior
- USB battery charging modes
- USB-C CC pins and pull-up/pull-down resistors
- USB Power Delivery negotiation
- E-marker cable identification
- EMI and ESD protection on USB ports
For practical electronics work, also study:
- continuity testing
- strain-relief design
- connector shell grounding
- ESD-safe handling practices
Brief summary
To wire a standard USB cable, use:
- Red -> +5 V (VBUS)
- White -> D−
- Green -> D+
- Black -> GND
- Bare/drain -> shield/shell
For USB Type-A, the standard pin order at the mating face is:
1 = VBUS
2 = D-
3 = D+
4 = GND
For basic repairs, USB 2.0 is manageable. For USB-C or USB 3.x, replacement is usually better than manual rewiring because of complexity and risk.
If you want, I can draw the exact wiring diagram for your specific cable type in ASCII form.