Universal Serial Bus (USB) is a hardware interface for low-speed peripherals such as keyboards, joysticks, scanners, printers, telephony devices, and MPEG-1 and MPEG-2 digital video. The electrical design of USB limits the maximum cable length to 5 metres for full-speed devices and up to 3 metres for low-speed devices. Up to 5 hubs can be connected in series to allow for an extended cable run. Up to 127 devices (theoretical limit) can be attached to a single host computer. The hot-swap capability allows a USB device to be plugged in or unplugged without turning the system off. USB devices may be plugged into a USB receptacle on the PC, into a multi-port USB hub or into a USB device that also functions as a hub for other devices.
The Full-speed USB 1.1 maximum bandwidth of 12 Mbits/sec is equivalent to a data transfer speed of 1.5 Mbytes/sec with Hi-speed USB 2.0 dramatically increasing this to 480 Mbits/sec. A Low-speed rate of 1.5Mbits/sec is used for HI (Human Input Devices) such as keyboards, joysticks etc. lControl, Interrupt, Bulk and Isochronous transfer modes are supported. A USB device indicates its speed by pulling either the D+ or D- line high to 3.3 volts. The pull-up resistors at the device end are also used by the host or hub to detect the presence of a device connected to the port.
Data signals are transmitted on a twisted pair labelled D+ and D− collectively using half-duplex differential signaling to combat the effects of electromagnetic noise on longer lines. D+ and D− usually operate together; they are not separate simplex connections. Transmitted signal levels are 0.0-0.3 volts for low and 2.8-3.6 volts for high. A NRZI (Non Return to Zero Invert) encoding scheme used to send data with a sync field to synchronize the host and receiver clocks.
The USB bus supplies 5V DC regulated power (maximum 500mA)through each port on pins 1 and 4 (pins 1 & 5 on mini-USB). These pins are longer than the data pins to ensure that the power connections mate first and un-mate last. Low-power devices that might normally require a separate AC adapter can therefore be powered via the USB cable, eliminating the need for associated AC adaptors. Bus-powered hubs derive all their power from the USB bus. Powered-hubs are powered from their own AC adapter and provide better power distribution to downstream devices. Port-switching USB hubs isolate all ports from each other so that a faulty device will not cause all other the devices on the same bus to also fail. The specification provides for no more than 5.25 V and no less than 4.35 V between bus positive and negative.
The twisted pair data wires and the drain wire are 28AWG with the non-twisted power wires being from 28AWG to 20AWG. A USB cable with 20AWG power conductors will give a maximum usable length of 5 metres.
Cables have only plugs, and hosts and devices have only receptacles. Hosts have type-A receptacles. If a device has a receptacle it is always type-B. Type-A plugs and type-B receptacles are always oriented upstream towards the host system. Type-B plugs and type-A receptacles are always oriented downstream. The most commonly used USB cable has a USB-A plug on one end and a USB-B plug on the other end.
Standard USB Plugs and Receptacles
The plugs and receptacles have 4-contacts and are rectangular in shape with the contact opening of a Type A plug or receptacle measuring approximately 13.1(W) × 5.5(H) mm. The contact opening on standard Type B USB plugs and receptacles measures approximately 5.6(W) × 3.2(H)mm.
Mini-USB Plugs and Receptacles
Mini-USB plugs, receptacles and cables were primarily introduced for USB OTG (Universal Serial Bus On The Go) devices such as mobile phones, PDAs, digital cameras etc. The USB OTG specification allows a single port to act as either a host or a device - chosen by which end of the cable plugs into the socket on the unit. After the cable is connected and the units are synchronised, the units may even swap ends under program control. This ability targets units such as PDAs where the USB link might connect to a PC's host port with the PDA as a device or alternatively connect the PDA as a host to a keyboard.
Two small form factor plugs have been defined (Mini-A and Mini-B) along with a universal receptacle (Mini-AB) that accepts either a Mini-A plug or a Mini-B plug. . Mini-A, Mini-B, and Mini-AB connectors are identified easily by color. The specification nominates that the insulator plastic inside Mini-A plugs and receptacles is always white. In Mini-B connectors it's always black, and in Mini-AB receptacles it's always coloured grey. The plugs and receptacles have 5 contacts with contacts 4 & 5 joined together inside the Mini-A plug. Mini-USB plugs and receptacles are rectangular in shape, with the contact opening measuring approximately 6.8(W) × 3.1(H) mm.
Plug & Receptacle Pinouts
Mini-USB Series A
Mini-USB Series B
Standard USB Pinout & Cable Color Code
|1||Red||V BUS (+5V)|
Mini-USB Type-A Pinout & Cable Color Code
|1||Red||V BUS (+5V)|
|4||Joined to pin 5||ID|
Mini-USB Type-B Pinout & Cable Color Code
|1||Red||V BUS (+5V)|
|4||Not connected (*)||ID|
(*) Sometimes joined to pin 5 via a resistor
Typical USB Connections
USB ports have a Type A socket. All USB cables permanently attached to a device have a Type A plug. Devices that use a separate USB cable have a square Type B socket. USB cables have one Type A and one Type B plug. Some devices such as digital cameras may use small proprietary plugs and sockets replacing the Type B plug and socket.
Micro-USB connector technology was announced by the USB Implementers Forum on January 4th 2007. It is intended to replace mini-USB for the next generation of smart-phones and PDAs.
A Wireless USB standard is being developed to further extend the platform. It will maintain backwards compatibility with USB 1.1 and USB 2.0 protocols.
Additional Reference Material
The best source for additional information is from the Universal Serial Bus website, sponsored by the USB Implementers Forum Inc..