Home - Blog

USB Pinout: The Beginner’s Guide

Nowadays, it’s easy to complete projects that involve creating a physical connection between a host controller and several other bus-powered devices because of the USB interface.

USB stands for Universal Serial Bus and has since replaced its predecessors (FireWire, RS-232 serial, and even parallel) as the primary interface for connecting a host to a device.

Normally, the architecture of a USB system includes a host controller, USB ports, and a wide variety of devices. Also, there are cases where you can add additional USB network hubs to create a tree connection structure.

However, that’s just the surface of it all.

So, in this article, we’ll explain everything about the USB and give different USB examples for your circuits.

Let’s begin!

USB Pinout

USB Flash drive

USB Flash drive

The USB has four shielded wires that work as pins. Two of these wires are for power supply, while the other two are for differential data signal pairs. Check out the table below for the full USB pinout.

PinNameCable ColorDescription
1VCCRed+5 VDC power supply pin
2D-WhiteData- pin
3D+GreenUSB data cable Data+ 
4GND digital groundBlack Ground pin

How Does a USB Work?

plugging a USB pen drive on a laptop 

plugging a USB pen drive on a laptop 

Like all connectors, all types of USB connectors have male and female types, making sure you connect your devices in the right direction.

It’s essential to make correct USB connections to allow the system to follow the required USB protocol. So, to establish a connection, USB remote devices feature what we call an upstream connection. These remote devices use this upstream connection to connect to a host. 

Now, the hosts also have downstream connections that allow them to connect to the remote devices.

Furthermore, you can’t use upstream and downstream connections interchangeably. This helps you avoid misconnections and makes sure you connect the USB cable only in the right direction. 

It also helps you avoid several issues like illegal loopback connections and connecting a downstream port to another downstream port.

How it really Works

First, a USB device will show its maximum speed by using pull-up resistors to draw the “D+” and “D-” terminals to 3.3V. Now, the host or hub will also use these pull-up resistors to detect when you connect a compound device to its port. Thus, without a pull-up resistor, the USB won’t detect your connected device or if you have a broken device or broken connector.

So, when you plug in an external device for the first time, the host device scans it and loads the correct driver version required to run the device. To do this, the host uses a product ID/vendor ID (PID/VID)—which the connected hardware or device supplies. Once the host completes the loading of necessary device drivers, the hardware/device will be ready for use. 

Note: USB host controllers have their specifications. We have the Universal Host Controller Interface (UHCI), which works for all USB types, the Open Host Controller Interface (OHCI), which works with USB 1.1, and the Enhanced Host Controller Interface (EHCI), which works with USB 2.0.

USB Connector Types

Originally, the USB cable could only be one of two types, and these two types included “Type A” and “Type B”. Afterward, we got the USB C type, which boasted a better data transfer speed with a more robust system.

Check out the table below for the full overview of the different USB types.

Type-A USB Connector Pinout

Type-A USB is the most popular type of USB connector. Plus, you can find them on host controllers, computers, flash drives, and several other items. Also, you can only make downstream connections with the Type-A USB as its sole use is for controllers and hubs.

Flash Drive

Flash Drive

Type-A USB connectors are bigger than other connectors and have flat and rectangular shapes. Plus, friction holds this connector in place, making it easy to connect and disconnect. However, using it in areas where your equipment might vibrate isn’t a great idea.

The Type-A USB has two versions: Male and female versions. The male version is the plug, while the female version is what we know as the socket or port.

Female connector versions are what we find on host controllers, while male connector versions are usually on devices like memory sticks, keyboards, mice, and other connections to storage devices.

Applications

  • Works in most personal computers.
  • Also works in television and music systems.
  • You can also find them on gaming consoles and almost all chargers for mobile portable devices.

Type-A USB Pinout

The older versions of the Type-A connector have four pins, while the newer versions have nine pins. Here’s a table showing all the pins of the Type-A connector.

Note: all generations of the Type-A USB connector have pins 1 to 4 while third-generation connectors have pins 5-9.

USB-B Pinout

The USB-B is the second connector type that mostly works for connecting peripherals like printers and scanners. Plus, their pinouts have a different arrangement.

It has an almost square shape with a slight bevel at the top end corners of the connector. Also, it uses friction to remain in place when connected.

The Type-B USB port is an upstream connector that you can only find on peripheral devices. Thus, most Type-B USB applications require A to B USB cables.

Here’s an interesting fact:

Type-B USB canceled out the chances of creating a connection between two host computers. Thus, helping to prevent damages.

Applications

This connector mainly works for peripherals like printers and scanners.

Pinout

Like the Type-A USB, the older versions of Type-B have four pins, while the newer 3.0 versions have nine pins. Here’s a table showing all the pins:

Also, there is a second type of Type-B connector that has two extra pins:

10DPWRN/APower to device
11DGNDN/AGround DPWR return

Source: Wikimedia Commons

USB-C Connector

The USB Type-C is the USB specification that’s slowly replacing the USB-B. It’s a tiny 24-pin reversible plug that works for USB cabling and devices.

Type-C USBs can serve as connectors for both hosts and devices. Plus, you can find Type-C USBs in most recent mobile devices.

USB-C Connector Pinout

The Type-C USB has 24 pins which you can connect reversibly. Here’s a table showing the full list of pins:

Micro USB Pinout

A smaller connector became necessary as the technology required smaller USB sizes for many items like modern mobile phones and audio devices. Thus, the USB Microcontroller was born.

The micro USB has both Type-A and Type-B USB versions available, like the 1.0 micro-USB and 2.0 micro-USB. However, these versions are smaller, and you can use them for much thinner lines of equipment.

Additionally, the micro USB is the USB standard and offers better transfer rates from an external source.

Pinouts

Standard older micro USB connectors have five pins, while the less common 3.0 version has ten pins. Here’s a table showing the pins of the micro USB connector:

The fourth pin mode is what we call the USB on-the-go (OTG). It allows you to switch between the peripheral and host roles on your devices. It’s also what enables devices to decide which will act as a power source once connected. For instance, plugging an android phone into a laptop. The laptop will charge the phone if you have a charge-only cable, not the phone charging the laptop.

Wrapping Up

It’s worth mentioning that sometimes, it’s possible to use USB A to USB A cables to establish connections between a computer or USB device to another USB device with an A-style female port. So you can transfer data between both systems. 

USB Hub

USB Hub

However, you shouldn’t use the type A to A cable connection to create connections between two computers or a USB hub and two computers. Why? Well, creating such a connection would mean the cable would receive equal amounts of voltage (5V) from both computers. Thus, connecting both power supplies and causing irreparable damage and other issues. Sometimes, it may even cause a fire hazard. 

Well, that wraps up this article. Feel free to reach us if you have any questions, and we’ll be happy to help.

Avatar photo
Emma Lu
Our professional engineering support saves our customers a lot of trouble and loss. >>>>>> After you place the order, our engineer will conduct technical reviews to make sure the parts can be mounted well/correctly on the boards. We will check if the component packages match well with the Gerber footprints, if the part numbers you provided match well with the descriptions, and if the polarity is clearly marked. >>>>> When your design is ready, please send your Gerber and BOM so we can quote and start!

Services