USB Cable Wiring Diagram: USB-A, USB-C, and Micro-USB Pinouts

USB (Universal Serial Bus) cables look simple from the outside, but the pinout -- which conductor goes where -- matters the moment you need to repair a cable, build a custom harness, or troubleshoot a charging or data problem. This guide covers the pin assignments for USB-A, USB-C, and Micro-USB connectors, the standard wire color codes, the difference between power-only and data cables, and USB OTG wiring.

USB-A (Standard Type-A) Pinout

USB-A is the rectangular plug that most people still think of as "the USB connector" -- the type that plugs into computers, chargers, and hubs. It has four pins.

USB-A Pin Assignment

Pin Signal Wire Color Description
1 VBUS Red +5V power supply
2 D− White Data negative
3 D+ Green Data positive
4 GND Black Ground

Pin 1 is on the right side when the plug is oriented with the flat (Trident logo) side up and the opening facing you.

Memory aid: Red, White, Green, Black -- outside-in from the pin 1 side, or think of it as matching the US/Mexico flag colors from left to right.

USB-A Current Ratings

A standard USB-A charger that reports itself as a "dedicated charging port" (DCP) shorts D+ and D− together (or uses Apple proprietary voltages on D+/D−) to signal the device that higher current is available. This is why a phone charges faster from a proper wall adapter than from a PC USB port.

Micro-USB Pinout

Micro-USB was the dominant smartphone and tablet connector from roughly 2007 to 2019. It has five pins in a smaller rectangular shell.

Micro-USB (Micro-B) Pin Assignment

Pin Signal Wire Color Description
1 VBUS Red +5V power
2 D− White Data negative
3 D+ Green Data positive
4 ID Not connected (host) or GND (OTG device) OTG identification
5 GND Black Ground

The same four signal conductors as USB-A (VBUS, D−, D+, GND) occupy pins 1 through 3 and 5. Pin 4 is the ID pin, which is used for USB OTG (On-The-Go) detection -- see the OTG section below.

When making a standard Micro-USB cable (Type-A to Micro-B):

USB-C Pinout

USB-C is a 24-pin connector with a symmetrical, reversible design. The full pinout is complex, but for practical wiring purposes the important groups are:

USB-C 24-Pin Layout

The 24 pins are arranged in two rows (12 pins per side, A1-A12 and B1-B12), which allows plug insertion in either orientation.

Pins Signal Count Function
A1, B1 GND 2 Ground
A4, B4 VBUS 2 Power +5V (or higher with PD)
A5 CC1 1 Configuration channel 1
B5 CC2 1 Configuration channel 2
A6, B6 D+ 2 USB 2.0 data positive
A7, B7 D− 2 USB 2.0 data negative
A2, B2 TX1+/TX2+ 2 SuperSpeed transmit pair
A3, B3 TX1−/TX2− 2 SuperSpeed transmit pair
A10, B10 RX2+/RX1+ 2 SuperSpeed receive pair
A11, B11 RX2−/RX1− 2 SuperSpeed receive pair
A8, B8 SBU1/SBU2 2 Sideband use (Alt Mode)
A12, B12 GND 2 Ground

CC Pins (Configuration Channel)

The CC pins are what make USB-C "smart." They serve several functions:

A passive USB-C cable (for charging and USB 2.0 data only) needs only VBUS, GND, D+, D−, and the CC pins. A cable rated for USB 3.2 or Thunderbolt 3/4 includes the SuperSpeed differential pairs and active electronics in the cable plug assembly.

USB-C Wire Colors in Practice

The USB-IF does not mandate specific wire colors for internal cable construction, but common third-party cable conventions include:

If you are cutting open a USB-C cable, use a multimeter to trace continuity rather than relying on wire colors.

Power vs Data Cables

Not all USB cables carry data. Many cheap charging cables include only VBUS and GND, omitting the D+ and D− data lines. These cables charge any device but cannot be used for file transfer, syncing, or firmware updates.

To check: plug the cable into a phone and a computer. If the computer does not detect the phone at all (no "Trust this computer?" prompt on iPhone, no device in Device Manager), the cable is charge-only.

For a proper USB 2.0 cable: 4 conductors (VBUS, D−, D+, GND). For USB 3.2 Gen 1 (formerly USB 3.0): 9 conductors -- the 4 USB 2.0 wires plus two differential pairs for SuperSpeed (SS) TX and RX, each with a separate ground. For USB 3.2 Gen 2x2 and Thunderbolt 3/4: even more complex, with full 40-pair layouts and active retimers in the cable assembly.

USB OTG (On-The-Go) Wiring

USB OTG allows a device that is normally a peripheral (like a phone) to act as a USB host and control other peripherals (USB drives, keyboards, MIDI controllers).

Micro-USB OTG Cable

A Micro-USB OTG adapter is a short cable with a Micro-B plug on one end (for the phone) and a USB-A socket on the other (for the peripheral).

The only electrical difference from a standard Micro-USB cable is pin 4 (ID) is connected to GND (pin 5) at the Micro-B end. The phone detects the short between ID and GND and switches from peripheral to host mode.

Micro-B (phone end) USB-A (device end)
Pin 1 (VBUS) Pin 1 (VBUS)
Pin 2 (D−) Pin 2 (D−)
Pin 3 (D+) Pin 3 (D+)
Pin 4 (ID) → GND shorted Not connected
Pin 5 (GND) Pin 4 (GND)

USB-C OTG

On USB-C, OTG mode is determined by the CC pin configuration and the device's capability negotiation -- no physical short is needed. Devices that support USB-C OTG advertise dual-role port (DRP) capability via the CC pins.

Common USB Wiring Problems

Create Your Own USB Wiring Diagram

Planning a USB charging station, custom cable harness, or embedded USB interface is much cleaner with a proper diagram. With CircuitDiagramMaker, you can:

Create your own USB cable wiring diagram -- free

Key Takeaways