Mozilla Skin

Electronic interfaces/Universal Serial Bus (USB)

From LabAutopedia

Contents

Universal Serial Bus (USB)

The Universal Serial Bus (USB) is a serial bus standard to interface devices to a host computer. USB was designed to replace many legacy serial and parallel interfaces and allow many peripherals to be connected using a single standardized interface socket. The design of USB is standardized by the USB Implementers Forum (USB-IF), an industry standards body formed in 1995 to support and accelerate market and consumer adoption of USB-compliant peripherals. Today, USB-IF has over 900 member companies, and the Board of Directors is comprised of representatives from Agere (now merged with LSI Corporation), Apple Inc., Hewlett-Packard, Intel, NEC, and Microsoft.  The USB 1.0 specification model was introduced in November 1995.  The current (as of 2008) USB 2.0 specification[1], with a design data rate of 480 megabits per second, was released in April 2000 and was standardized by the USB-IF at the end of 2001.  A draft specification for USB 3.0 (data rate of 4.8 Gbit/s (600 MB/s)) was released by Intel and its partners in August 2008. According to Intel, bus speeds will be 10 times faster than USB 2.0 due to the inclusion of a fibre-optic link that works with traditional copper connectors. Products using the 3.0 specification are likely to arrive in 2009 or 2010.

The Universal Serial Bus has the following features:

  • The computer acts as the host.
  • Up to 127 devices can connect to the host, either directly or by way of USB hubs.
  • Individual USB cables can run as long as 5 meters; with hubs, devices can be up to 30 meters (six cables' worth) away from the host.
  • The USB 2.0 bus has a maximum data rate of 480 megabits per second.
  • A USB cable has two wires for power (+5 volts(red) and ground (brown)) and a twisted pair of wires (yellow and blue) to carry the data.
  • The computer can supply up to 500 milliamps of power at 5 volts via the USB power wire.
  • Low-power devices (such as mice) can draw their power directly from the bus. High-power devices (such as printers) have their own power supplies and draw minimal power from the bus. Hubs can have their own power supplies to provide power to devices connected to the hub.
  • USB devices are hot-swappable, meaning you can plug them into the bus and unplug them any time. See USB Flash Drives.
  • Many USB devices can be put to sleep by the host computer when the computer enters a power-saving mode.

Cables and connectors [2]

The USB specification limits the length of a cable between full speed devices to 5 meters (a little under 16 feet 5 inches). For a low speed device the limit is 3 meters (9 feet 10 inches).  The primary reason for this limit is the maximum allowed round-trip delay of about 1500 ns. If a USB device does not answer to host commands within the allowed time, the host considers the command to be lost. A maximum of 5 hubs connected with 5m cables plus a 5m cable going to the device, allows a maximum 30m of cable (specification section 7.1.19). The USB standard uses "A" and "B" connectors to avoid confusion and to prevent creating a loop:

  • "A" connectors head "upstream" toward the computer.
  • "B" connectors head "downstream" and connect to individual devices.

In addition to the originally specified A and B connector designs, specifications now exist for Micro and Mini A & B versions, used for smaller devices such as PDAs, mobile phones or digital cameras. The Standard-A plug is approximately 4 by 12 mm, the Standard-B approximately 7 by 8 mm, and the Mini-A and Mini-B plugs approximately 2 by 7 mm. 

Image:USB_Standard_A.png  Image:USB_Standard_B.png Image:USB_Mini_A.png Image:USB_Mini_B.png   USB connector configurations 

Standard A Pins

Standard B Pins Mini A Pins Mini B Pins Micro A Pins Micro B Pins Name Color Description
1 1 1 1 1 1 VCC Red +5V
2 2 2 2 2 2 D− White Data -
3 3 3 3 3 3 D+ Green Data +
    4 4 4 4 ID None

A: Ground B: NC

4 4 5 5 5 5 GND Black Ground



Data

Transmitted signal levels are 0.0–0.3 volts for low and 2.8–3.6 volts for high.  Unlike RS-232 and similar serial interfaces where the format of data being sent is not defined, USB is made up of several layers of protocols.  USB has four different packet types. Token packets indicate the type of transaction to follow, data packets contain the payload, handshake packets are used for acknowledging data or reporting errors and start of frame packets indicate the start of a new frame.   Data packets have the following fields:

  • Sync:  All packets must start with a sync field. The sync field is 8 bits long at low and full speed or 32 bits long for high speed and is used to synchronise the clock of the receiver with that of the transmitter. The last two bits indicate where the PID fields starts.
  • PID: Packet ID. This field is used to identify the type of packet that is being sent.  There are 4 bits to the PID, however to insure it is received correctly, the 4 bits are complemented and repeated, making an 8 bit PID in total.
  • ADDR: The address field specifies which device the packet is designated for. Being 7 bits in length allows for 127 devices to be supported. Address 0 is not valid, as any device which is not yet assigned an address must respond to packets sent to address zero.
  • ENDP: The endpoint field is made up of 4 bits, allowing 16 possible endpoints. Low speed devices, however can only have 2 additional endpoints on top of the default pipe. (4 endpoints max)
  • CRC: Cyclic Redundancy Checks are performed on the data within the packet payload. All token packets have a 5 bit CRC while data packets have a 16 bit CRC.
  • EOP: End of packet. Signalled by a Single Ended Zero (SE0) for approximately 2 bit times followed by a J for 1 bit time

Further data format detail....

Laboratory use

Despite becoming the interface of choice for consumer PC peripherals, USB is not yet widely found in laboratory instrumentatiion or automation devices.  It is most commonly found in simple devices, such as balances, whose primary market is stand-alone bench use, rather than integration into automation systems.  The cable length limits without using hubs may be a contributing factor.

References

  1. USB 2.0 Specification USB.org
  2. Universal Serial Bus Cables and Connectors Class Document USB.ORG
Click [+] for other articles on  The Market Place for Laboratory Automation The Market Place