Micro-USB Wiring Diagram: 5-Pin Pinout, OTG ID Pin, and Cable Wiring
This is a free printable micro usb diagram: download the diagram as SVG or open it and print to paper or PDF.
A reference micro-USB connector pinout diagram covering all five pins — VBUS, D-, D+, ID, and GND — including the OTG ID pin function and standard cable wiring.
Micro-USB is a 5-pin connector defined by the USB 2.0 standard. It was the dominant mobile device charging and data connector for approximately a decade before USB-C began replacing it. Despite its age, micro-USB remains common in embedded systems, battery-powered devices, and low-cost electronics.
**Pin assignments (micro-USB receptacle, pin 1 to pin 5 from left to right when viewed from the front of the receptacle):** - **Pin 1 — VBUS:** +5 V DC power supply from the USB host. Carries the charging and supply current. Standard USB 2.0 supplies up to 500 mA. USB Battery Charging (BC 1.2) allows up to 1.5 A on VBUS when the host asserts the charging detection protocol. - **Pin 2 — D-:** USB data differential pair, negative signal. Together with D+, carries USB 2.0 data at up to 480 Mbps (High Speed) or 12 Mbps (Full Speed). - **Pin 3 — D+:** USB data differential pair, positive signal. - **Pin 4 — ID:** The fifth pin added in micro-USB that distinguishes standard (Type-A/Type-B function) from OTG (On-The-Go) mode. In a standard micro-USB cable connected to a dedicated host, pin 4 is left open (floating). In an OTG cable or OTG adapter, pin 4 is connected to GND on the micro-USB Type-A end. Detecting a low-resistance path from ID to GND signals the device to operate as a USB host rather than a peripheral. - **Pin 5 — GND:** Supply and signal ground return.
**Cable wiring for a standard (non-OTG) micro-USB cable:** VBUS to VBUS, D- to D-, D+ to D+, ID pin left unconnected at both ends, GND to GND. This gives a 4-conductor cable with a shield.
**OTG cable:** As above, but the micro-USB Type-A end connects ID (pin 4) to GND (pin 5). This wire need only carry microamp-level signalling current.
**Charging-only cable:** Some market cables connect only VBUS and GND, omitting the D- and D+ conductors. These cables charge the device but cannot transfer data and will not support fast-charging protocols that require data line communication.
How to wire micro usb diagram
- Identify the connector type needed Confirm whether you need a standard micro-USB cable (most common), an OTG cable (to use the device as a USB host), or a bare micro-USB connector for a custom PCB or cable repair. Verify the device receptacle is micro-USB and not USB-C or mini-USB before proceeding.
- Gather the correct connector and cable For cable repair or custom builds, source a micro-USB Type-B plug with the correct current rating for the application. Use 28 AWG conductors for data lines (D+ and D-) and 24 AWG or heavier for VBUS and GND if charging current above 500 mA is required.
- Strip and identify the inner conductors Standard USB cable colour coding: Red = VBUS (+5 V), Black = GND, White = D-, Green = D+. Confirm with a continuity test against a known-good cable or the device's USB specification sheet. Some cable manufacturers do not follow the colour standard.
- Solder VBUS and GND first Solder VBUS (red) to pin 1 and GND (black) to pin 5 of the micro-USB plug. These are the outermost pins. Use a fine-tip soldering iron — micro-USB pads are very small and solder bridges between pins are easy to create. Use a magnifying glass to verify no bridging.
- Solder data lines Solder D- (white) to pin 2 and D+ (green) to pin 3. For data-only or charge-only cables omitting data, leave pins 2 and 3 unconnected. Note: some fast-charging negotiation methods require specific D+/D- voltage levels — a short between D+ and D- is the Dedicated Charging Port identification method per USB BC 1.2.
- Handle the ID pin (pin 4) correctly For a standard cable: leave pin 4 unconnected at both ends. For an OTG cable: at the micro-USB Type-A end (device end), connect pin 4 (ID) to pin 5 (GND) with a short wire. At the Type-B or Type-A full-size end, pin 4 is not present or unconnected. Verify OTG is supported by the target device before building an OTG cable.
- Inspect and test Inspect all five pin positions under magnification for solder bridges. Test with a multimeter: confirm VBUS to GND continuity (through the cable — resistance should be low), no cross-connection between D+ and D-, and no short between any signal pin and the shell/shield. Connect to a known-good device and test charging and data transfer.
Specifications
| Connector standard | USB 2.0 micro-B (IEC 62680, USB-IF) |
|---|---|
| Pin count | 5 (VBUS, D-, D+, ID, GND) |
| VBUS voltage | +5 V DC (4.75–5.25 V) |
| Standard USB 2.0 current | 500 mA maximum (USB 2.0 host port) |
| USB BC 1.2 charging current | Up to 1.5 A |
| Data rate (High Speed) | 480 Mbps |
| Data line impedance | 90 Ω differential (USB specification) |
| ID pin GND resistance (OTG) | Less than 1 Ω between ID and GND at device connector |
Safety warnings
- Micro-USB connectors are small and fragile. Excessive lateral force when inserting or removing causes receptacle de-soldering from PCBs — this is the most common physical failure mode. Always insert and remove cables straight-on.
- USB power from computer hosts is limited to 500 mA (USB 2.0) or 900 mA (USB 3.0). Connecting a load exceeding the host port rating can damage the host port. Use a dedicated USB charger for high-current applications.
- An incorrectly wired OTG cable (ID grounded on the wrong end) can force a device into host mode unexpectedly, potentially drawing power from the device battery to power an unconnected bus. Verify device OTG support before use.
- This diagram is for reference and educational purposes. USB wiring for mains-powered chargers involves mains voltage on the primary side — that work must comply with relevant electrical safety standards and be performed only by qualified personnel.
Tools needed
- Fine-tip soldering iron (15–25 W for micro connectors)
- Rosin-core solder (0.3–0.5 mm diameter)
- Magnifying glass or digital microscope
- Multimeter (continuity and resistance)
- Wire stripper (suitable for 24–30 AWG)
- USB data tester or known-good host device for verification
- Desoldering braid (for rework)
Common mistakes
- Swapping D+ and D- conductors — data will not function, though charging may still work. Always verify with a continuity test against a known-good cable.
- Creating solder bridges between adjacent pins — micro-USB pins are spaced approximately 0.8 mm apart. Always inspect under magnification and test continuity between all adjacent pins.
- Grounding the ID pin on a standard (non-OTG) cable, accidentally enabling OTG mode on devices that detect the ID low condition at startup.
- Using thin data-only wire gauge for VBUS when building a charging cable — 28 AWG wire has significant resistance over a 2 m cable at 1.5 A charge current, causing voltage drop and slow charging.
- Failing to connect the cable shield to the connector shell at both ends, reducing EMC performance and potentially causing data errors.
Troubleshooting
- Cable charges device but no data transfer
- Cause: Data lines (D+/D-) are unconnected, swapped, or damaged Fix: Test D+ and D- continuity from plug to plug using a multimeter. Verify correct colour-to-pin mapping. If pin connectivity is correct, the issue may be in the host or device — test with a known-good cable.
- Device charges slowly even with a 2 A charger
- Cause: Charger detection protocol requires D+ and D- short circuit (Dedicated Charging Port) or proprietary signalling, which the cable or charger does not support Fix: Verify the charger supports the required charging protocol for your device. Check that the cable has D+/D- conductors (not charge-only). Measure VBUS voltage at the device connector — significant voltage drop under load indicates undersized VBUS wire.
- OTG peripheral not detected when connected
- Cause: Device does not support OTG, ID pin not grounded in cable, or peripheral draws more current than device can supply Fix: Confirm the device supports USB OTG in its specifications. Verify the OTG cable has ID grounded on the correct end (device end). Check peripheral current draw against device OTG power output specification.
Frequently asked questions
What is the OTG ID pin and how does it work?
The ID pin (pin 4) enables USB On-The-Go host detection. When a device senses a short circuit between ID and GND (as provided by an OTG cable's Type-A plug), it switches from peripheral mode to host mode, allowing it to power and communicate with attached peripherals such as USB drives, keyboards, or mice.
Why won't my micro-USB cable charge my device even though it fits?
Cables that connect only VBUS and GND (charge-only cables) will not trigger fast-charging protocols, which require D+ and D- to be present for negotiation. Also check that the cable is carrying current by measuring voltage at the device end — a cable with a damaged VBUS conductor may show a connector that fits but delivers no power.
What is the maximum current a micro-USB cable can carry?
Standard USB 2.0 specifies 500 mA. USB Battery Charging 1.2 allows up to 1.5 A. The physical micro-USB connector and standard cable wiring are generally considered practical up to approximately 1.8 A before heating becomes a concern in cheaper cable constructions. High-current proprietary fast-charging protocols often exceed the original micro-USB specification.
How do I identify which end of a micro-USB cable is which?
The Type-A (full-size) USB end connects to the host (charger, computer). The micro-USB end connects to the device. On an OTG cable, both ends are micro-USB — the Type-A micro end (with the ID pin grounded) connects to the device being promoted to host, and the Type-B micro end connects to the peripheral.
Is micro-USB the same as mini-USB?
No. Mini-USB (USB mini-B) is a different connector with different physical dimensions. It predates micro-USB and is now largely obsolete. Mini-USB is wider and thicker than micro-USB and they are not interchangeable. Micro-USB was introduced in the USB 2.0 specification amendment to replace mini-USB in mobile devices.
Full written guides
Related diagrams
- micro usb cable wiring diagram
- micro usb pinout diagram
- female usb pinout
- mini usb wiring diagram
- usb 2.0 wiring diagram
- usb a pinout diagram