Articles added in Mathematics Lab | Cyber Lab is now open | Astronomy Lab is now open | VLSI Lab is now open | 120 SEO Tips article published | More exciting articles coming soon!

USB(Universal Serial Bus) Cable

Universal Serial Bus wires

Introduction of Universal Serial Bus

  • USB is a standard connection method for a wired communication between two electronic devices that includes a mobile phone, desktop computer or any other device/system. The connection is made by a USB cable that has a connector at one end which plugs into the computer/host while the one that plugs into the mobile device can be of various types such as miniUSB, microUSB or any other different connector like ps2p connector, etc.

  • A Universal Serial Bus (USB) Cable is primarily used to connect a USB device to a host as it primarily uses Master/Slave architecture. A host is nothing but a Master which provides power supply and establishes connection with USB device(slave). Common example of host are computers and video game consoles, etc. while of slaves are Pen-drive, Mobile Phone, external HDD etc.

  • USB devices can be linked in series through hubs. There always exists one hub known as the root hub, which is built into the host controller.A USB hub is an inexpensive and handy addition of USB ports to any system which allows to connect more number of USB devices. The commonly available USB hubs are in 4-port model or 7-port which can be extended by using similar other host.

  • 4-port usb hub

  • The name itself says that USB transmits data serially and its speed varies with the versions of USB like: USB 1.1 has Low Speed of 1.5 Mbit/sec and Max Speed of 12 Mbit/sec, whereas the current version 2.0 is about 40 times faster having Speed of 480 Mbit/sec and USB 3.0 has speed up to 5 Gbit/sec.

  • In addition to their data transferring application, USB cables also carry an electric charge that can be used to power peripherals (such as USB mice or keyboards), and many mobile phones can be charged through their USB port.

  • A group of seven companies(Compaq, DEC, IBM, Intel, Microsoft, NEC, and Nortel) began the development of USB in 1994, aiming to make it easier to connect external devices to PCs by replacing the multitude of connectors at the back of PCs.

  • The USB 1.x and 2.0 provide a 5 V supply on a single wire from which connected USB devices may draw power. The specification provides for no more than 5.25 V and no less than 4.75 V (5 V +/- 5%) between the positive and negative bus power lines and for USB 3.0 is no more than 5.25 V and no less than 4.25 V.

  • USB 2.0 or earlier, the maximum length of a standard cable is 5 metres

  • 127 USB devices can be connected through USB hubs.

  • Characteristic of USB

    Hot swapping

    USB devices are hot-swappable(plug-n-play) i.e. you can plug n play them and unplug them any time. when you attach the device using a cable to PC, communication is initiated within a fraction of seconds. The versions are backwards compatible and the speed is limited by the slower device.

    Automatic configuration

    The USB host controller chipset installed on the host like PC motherboard or an add-on USB port card manages driver software and allocates bandwidth to each USB device automatically when attached to the bus. When a device is added or removed, the USB host controller automatically loads or unloads the driver for that device contributing in easy installation for user making them free from tedious procedures of installation.

    Interrupt sharing

    A USB host controller occupies one interrupt that is shared among all USB devices attached to the host. This allows multiple USB host controllers to be installed in a system and function without any conflicts with multiple USB devices and host.

    Bandwidth sharing and allocation

    A USB 1.1 bus provides 12 Mb/s of bandwidth and a USB 2.0 bus provides 480 Mb/s of bandwidth, which is shared among all devices attached in the USB network. Many devices may communicate simultaneously on a USB such that adequate bandwidth is available to service all of them at the same time. Properly designed USB peripherals and drivers use bandwidth dynamically, releasing bandwidth they are not using so that it can be used by other devices. For isochronous(time-critical) tasks such as audio/video streams or Internet connection, USB permits dedicating bandwidth as required by a particular peripheral, although that dedicated bandwidth then becomes permanently unavailable for use by other peripherals during that time.

    Embedded power connections

    Beside providing a data connection, USB also provides electrical power to peripherals, allowing you to eliminate the tangle of power cables required by traditional peripherals. This power is limited to 500 milliamps (mA), which must be shared by all unpowered devices connected to the USB port. In practical, it means that only low-power peripherals such as keyboards and mice can be powered directly by a USB connection. High-power peripherals such as printers and scanners usually have their own power supply and are powered directly from a standard AC source.

    Workinng of USB

    When a USB device is first connected to a USB host, the USB device enumeration process is started. The enumeration starts by sending a reset signal to the USB device. The data rate of the USB device is determined during the reset signaling. After reset, the USB device's information is read by the host and the device is assigned a unique 7-bit address. If the device is supported by the host, the device drivers needed for communicating with the device are loaded and the device is set to a configured state. If the USB host is restarted, the enumeration process is repeated for all connected USB devices.

    The host controller directs traffic flow to devices so that no USB device can transfer any data on the bus without expressing a request from the host controller. In USB 2.0, the host controller polls the bus for traffic, usually in a round-robin fashion.The host is responsible for the following tasks:

  • 1.Detect attachment and removal of USB devices

  • 2.Provide and manage power to attached devices

  • 3.Monitor activity on the bus and initiate the process of enumeration

  • 4.Manage data flow between host and devices

  • Working of USB

    The data is transferred through twisted pair named "Data +" and "Data -" which are conductors twisted together. The wires are enclosed in a further layer of shielding. NRZI (Non Return to Zero Invert) encoding scheme used to send data with a sync field to synchronise the host and receiver clocks. The data transmission is always symmetrical i.e. one conductor transmits the data signal while other always the inverts the signal.

    The communication on the USB is carried out in two directions and uses different types of transfer mechanism. When data directed from the host to a device is called downstream or OUT transfer while in other direction is called upstream or IN transfer. Depending on the device type different transfer variants used are:

    1. Control transfer

    Control transfers are used to request and send reliable short data packets. It is used to configure devices and every one is required to support a minimum set of control commands. Here is a list of standard commands:

    2. Bulk transfer

    It is used to request or send reliable data packets up to the full bus bandwidth. Devices like scanners use this transfer type.

    3. Interrupt transfer

    It is similar to bulk transfers which are polled periodically. If an interrupt transfer is submitted the host controller driver will automatically repeat this request in a specified interval(1ms - 255ms).

    4. Isochronous transfer

    Isochronous transfers send or receive data streams in real-time with guaranteed bus bandwidth but without any reliability. In general these transfer types are used for audio and video devices.

    USB Connectors

  • There are 7 USB connectors i.e. Standard-A, Standard-B, Mini-A, Mini-B, Micro-A, Micro-AB, Micro-B. These plugs go into corresponding slots built in the hosts and devices.

  • USB Connectors Pin Diagram

    USB pin description: 4pin

    Types of USB Connectors USB pin description: 5pin


    Mobile phones, Tablet,etc. USB Mobile charger Printers
    Application: USB with Mobile phone Application: USB Mobile Charger Application: USB Prniter
    Mouse Webcams
    Application: USB Mouse Application: USB Webcam
  • Speakers

  • Storage devices

  • Scanners

  • Joysticks

  • Digital cameras

  • CACKLE comment system

    Programming Resources
    Computer Networking Fundamentals Android Application