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

USB Power Delivery (PD) Voltage Profiles

Legacy USB-A and standard Micro-USB ports supply a fixed 5V and rely on resistor or voltage-signaling tricks (like the DCP shorting described above) to hint at higher current. USB-C with Power Delivery works differently: the charger and device use the CC pins described above to negotiate a voltage and current level as a digital conversation, rather than a fixed guess.

The Standard Power Range (SPR) profiles most chargers and devices support are commonly listed as:

Voltage Typical Use
5V Baseline USB power, low-power accessories, slow charging
9V Faster phone and small-tablet charging
15V Laptops and larger tablets
20V Laptops and higher-power devices

USB PD 3.1 added an Extended Power Range (EPR) above 20V for very high-power charging, using higher voltages to keep current -- and therefore cable heating and conductor size -- more manageable. A device only requests the voltage it actually needs; a phone plugged into a 100W laptop charger will still negotiate down to a lower voltage rather than take the charger's maximum. Current capability is separate from voltage and is generally capped lower on standard cables than on cables built with the heavier conductors and e-marker chip needed for high-power PD.

Worked Example: Voltage Drop on a Charging Cable

A cable is not a perfect conductor -- the copper in the VBUS and GND wires has resistance, and that resistance causes a voltage drop under load. This is why a long, thin charging cable can leave a device charging noticeably slower than a short, thick one, even from the same charger.

The relevant relationship is simple: V = I × R, where V is the voltage lost in the wire, I is the charging current, and R is the combined resistance of the VBUS and GND conductors for the length of the cable.

For example, suppose a long, thin cable has a combined VBUS + GND resistance of roughly 0.5 ohm (illustrative only -- actual resistance depends on conductor gauge, length, and connector contact quality). At a charging current of 2A, the voltage dropped across the cable would be approximately:

V = I × R = 2A × 0.5 ohm = 1V

If the charger is outputting 5V at its end, the device could see roughly 4V by the time the current reaches it -- a meaningful sag that can slow charging or, in a marginal cable, trigger the device to reduce charge current to protect itself. Shorter cables and thicker (lower-gauge) conductors reduce R and therefore reduce this drop; this is also part of why USB-C PD steps up to higher voltages for high-power charging, since delivering the same wattage at a higher voltage requires less current and produces less resistive loss for a given cable.

Choosing a Cable for High-Power Charging

Not every USB-C cable is built the same way underneath the identical-looking connector. Two practical points matter when picking a cable for anything beyond basic phone charging:

If a device charges slower on one cable than another from the same charger, the cable itself -- not just the charger -- is a common culprit.

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

Micro Usb Cable Wiring Diagram — circuit diagram showing component connectionsVBUSVBUSGNDGNDgndautostubautostubautostubautoreturnUSBUSB-A PlugUSBUSB-A ReceptacleCable VBUSCable GNDUSB Cable PinoutVBUS = 5V, D+/D- data, GND
Micro Usb Cable Wiring Diagram — open the interactive version of this diagram to customise and export it.
Usb Cable Diagram — circuit diagram showing component connectionsVBUSVBUSGNDGNDgndautostubautostubautostubautoreturnUSBUSB-A PlugUSBUSB-A ReceptacleCable VBUSCable GNDUSB Cable PinoutVBUS = 5V, D+/D- data, GND
Usb Cable Diagram — open the interactive version of this diagram to customise and export it.
Micro Usb Diagram — circuit diagram showing component connectionsVBUSVBUSGNDGNDgndautostubautostubautostubautoreturnUSBUSB-A PlugUSBUSB-A ReceptacleCable VBUSCable GNDUSB Cable PinoutVBUS = 5V, D+/D- data, GND
Micro Usb Diagram — open the interactive version of this diagram to customise and export it.

Frequently asked questions

Can a USB-A cable charge a USB-C device with fast charging?

Only a proper USB-A-to-USB-C cable will physically connect and charge the device, but the USB-A end has no CC pins, so USB Power Delivery negotiation (9V, 15V, 20V) is not available -- charging is limited to 5V plus whatever BC1.2 or proprietary fast-charge signaling the charger supports, which is generally slower than a native USB-C PD connection.

Is there a maximum length for a USB cable?

The USB 2.0 specification is generally built around cable lengths up to about 5 meters for reliable data signaling; longer runs risk data errors or dropped connections even if power still passes through. USB-C and higher-speed cables typically have shorter practical length limits for full-speed data, and active or repeater cables exist for longer runs.

What happens if a USB-C cable isn't rated for the current a charger can supply?

Negotiation is conservative -- without the e-marker chip needed to identify higher-current capability, the device generally will not request current above the standard default level, even if the charger could otherwise supply more. The result is slower charging, not an unsafe overcurrent condition, since the device only draws what the cable reports it can handle.

Can I use a USB 2.0 cable to fast-charge a laptop?

Not reliably. Laptop charging at higher wattages needs a cable built with adequate conductor gauge and, for higher-current tiers, an e-marker chip so the charger and laptop can negotiate a safe power level. A basic USB 2.0 cable intended for data or low-power charging may not be rated for that current and will limit charging to a low default rate.

Is it safe to leave a USB cable plugged in and charging overnight?

Generally yes with a cable and charger in good condition -- modern devices manage charge current and stop drawing significant power once the battery is full. The real risk factors are a damaged or frayed cable, a non-certified charger, or a device left charging on a surface that traps heat, not the act of leaving it connected overnight.

Why does a laptop charger sometimes charge a phone slower than the phone's own charger?

Charging speed depends on the voltage and current profiles both ends negotiate over the CC pins. A laptop charger may only offer power in voltage steps intended for laptop charging, and the phone may fall back to a lower, safer default current if it doesn't recognize a matching profile, so cross-charging between devices from different manufacturers can be slower even when both use USB-C.

Interactive diagrams for this guide

Related guides