Newsletter

Mobile Handset DesignLine  >  Design Center

USB OTG: The only wired interface portable consumer products need?

With so many portable product interfaces, UBS On-the-Go is perhaps the best choice in many situations



Courtesy of Planet Analog

Editor's note: In this article, the author makes a strong case for the versatility and broad applicability of USB On-the-Go. Read it and see if you are convinced, or perhaps not. Even if not, you'll end up knowing a lot about USB OTG interface, connectors, applications, and protocol.

Abstract
When we consider today's small portable devices, they really are just small-form-factor PCs. Typically, they have multi-gigabyte storage capacity for rich content. Their functionality is enabled by multiple processors and co-processors. Most offer multiple wireless interfaces. They enable both digital still and camcorder functionality. Most are multi-media players, for both music and video. They utilize full-featured operating systems. They offer desktop equivalent applications such as spreadsheets, documents, PDFs, e-mail, and more.

So, when we consider these devices, we really need to think of them as more than just a mobile phone, MP3 player, or digital still camera. Just as PCs have thrived with USB as the standard interface, so can these portable devices. However, given the usage scenarios for these devices, standard USB just doesn't offer everything they need. On the other hand, USB On-the-Go (USB-OTG) is a near-ideal, wired interface that enables all of these situations over a single, small-profile receptacle that can eliminate the need for any other wired interface.

What is USB On-the-Go?

To understand what USB OTG is, we first must understand some basic principles of stand USB. To understand the basic principles of USB, we really need to think about what the PC looked like back in the early 1990's prior to the releases of the USB 1.0 specification:

  • More and more users wanted to connect more and more peripherals to their PCs
  • The various peripheral ports (parallel, serial, P/S-2) to choose from were starting to present the user with many problems
  • Additionally, the simple variety of the connections was causing problems for the average user.
    • Most did not know which port to use
    • They did not understand the limitations that the port presented
USB-OTG was released in July 2003 as an addendum to the USB 2.0 Specification that defines a new class of devices. This class of devices is intended to extend the functionality of a peripheral product to include limited host capabilities. As the name implies, the original target of the specification was consumer portable devices with which end-users may have wanted to share data when a computer was not available.

Usage examples include sharing contact information between two PDAs or cell phones, sharing pictures from one DSC or camera phone with another, or printing directly from a DSC or PDA. Like standard USB, OTG is a point-to-point, host-centric bus and is not intended as a peer-to-peer networking connection. OTG Products must act as a standard peripheral when connected to standard USB host such as a PC. The OTG addendum mainly addresses how a device must act when it is in host mode.

Just like a standard USB host port, an OTG host must supply power. However, the required supply current is limited to 8 mA. This is not a maximum; as a matter of fact there is not a maximum that can be supplied. However, since the majority of the potential OTG-enabled products are battery-powered, there is always a trade-off between extending battery life and providing enough power for a bus-powered USB peripheral.

If an OTG product will provide more than the minimum 8 mA, there are two obvious choices for this increased supply current. The first would be 100 mA; this is the maximum current that any low-power USB bus-powered peripheral will require. This will enable the OTG device to serve most flash drives as well as many other low-power peripherals such as keyboards or mice. The next choice would be to go to the 500 mA level of a standard USB host port. This would allow the OTG device to satisfy any bus-powered USB peripheral's power demands.

A second major difference between standard USB hosts and OTG products is that an OTG device may not have a simple way to add drivers for "unrecognized" devices. This may be for one of two reasons. First, there just may not be a method for loading new software on to the OTG device, especially if the OTG port has the "new" peripheral connected to it.

That said, some OTG devices may have wireless capability that may enable network connectivity for downloading a driver for the unrecognized device. This would require a very sophisticated operating system to make this possible.

The second potential limitation would be the internal memory of the OTG device. These devices allocate a fixed amount of storage for the operating system. Adding additional drivers into this space may not be possible due to the lack of open memory. Therefore, an OTG device must supply what is called a Targeted Peripheral List (TPL). This allows the device manufacturer to specify exactly what peripherals they will support.

The USB specification uses what is called the USB Header information to identify each USB device. The "first" two entries of any device's header are the Vendor Identification number (VID) and Product Identification number (PID). The TPL is a list of VIDs and PIDs that will be known by the OTG host and that drivers will be included automatically to support. This list ends up as a file that is part of the operating system. In addition to this file embedded in the device, the OTG product must ship with a text version of the TPL for the end"user to reference.

Since adding support for new devices may not be possible on an OTG device, it is required that there be no "silent" failures. In other words, if an end-user plugs in an unsupported device (not on the TPL), there must be error messaging provided for the end-user. The preferred method is to display a graphical or text message on the LCD or screen of the OTG device.

If the OTG device does not have a text/graphical display, some other means of messaging must be provided. Examples would be to illuminate a specific LED, flash an LED in a specific pattern, change the color of an LED, etc. Whatever the messaging system is chosen, this must be conveyed to the end-user.

In standard USB, the receptacle on a host is called an "A" connector and the receptacle on a peripheral is referred to as "B". Since the target end equipment units are primarily small, portable consumer electronics, a standard "A" receptacle was too large for these products. With the original release of the OTG specification, these new connectors were called "mini" connectors.

The specification has subsequently been modified to mandate "micro" connectors for OTG devices. Specifically, OTG devices must implement a micro-AB receptacle. The AB nomenclature indicates it is both an "A" and "B" receptacle rolled into a single unit. The micro-AB receptacle can have either a micro-B plug or a micro-A plug inserted.

It seems obvious that if you insert a micro-A plug, then the device would be a host and, if you insert a micro-B plug, it would be a peripheral. But how does the micro-AB based product know what has been inserted? The OTG specification added a fifth contact, called ID, to the four contacts present in standard USB systems.

Since the ID pin is not present in standard USB Connections, the specification carried this forward and has defined a no connect on the ID pin as the initial peripheral. Conversely, if the ID pin is grounded, then that device will assume the initial host role. This is shown graphically in Figure 1.


Figure 1: Cable orientation will determine initial host/target roles.
(Click on image to enlarge)

As described above, the cable orientation will determine the roles the two OTG devices will assume at connection. Host Negotiation Protocol (HNP) defines a method for dynamic switching between host and device roles.

Why switch roles? The need for this can be understood if we look at Figure 2 and consider that every OTG device must include a TPL.

The device on the left has the printer on its TPL, but it is NOT on the printer's TPL. If the user plugs in the cable "backwards" as shown in Figure 2, then communication between the two devices is not possible without the roles reversing. This could be accomplished be removing the cable from both devices and then starting over with the ends reversed.

The OTG specification built in a protocol to automatically address this situation. HNP allows the roles to be reversed silently and automatically enabling the communication. This enhances the end-user experience as opposed to mandating that they disconnect the cable and reverse it. For this reason, it is important to note that while the host is usually the A-device, it is not always the case.


Figure 2: Host negotiation protocol example.
(Click on image to enlarge)

Session Request Protocol (SRP) enables a method for bus power to be turned off/on at the discretion of the "host" device to save power when communication is not needed. Many of the target end-equipment for OTG are battery-powered devices. Extending battery life is of utmost importance to both the manufacturers as well as the end user.

With this in mind, the A-device (as indicated by cable orientation) in an OTG connection can "power off" the bus and go into a sleep mode extending battery life. This will also allow the B-device to go to sleep if it so desires.

However, the end-user may desire for the communication to start-up again and initiates this request on the B-device. SRP allows the B-Device to request the A-Device to turn on VBUS power and start a session.

An OTG session is defined as the time that the A-Device is furnishing VBUS power. To wake-up the A-device, the B-device pulses first the D+ wire, and then the VBUS wire to wake up the A-Device. The A-Device detects the pulse (A-Device can respond to either pulsing), causing it to switch on VBUS and start a session.

The SRP protocol is more complex than this simple illustration. The B-Device, for example, must first measure VBUS to ensure that a session is not in progress. It must also be able to differentiate between a classic PC or an OTG device at the other end of the cable. It does this by delivering measured amounts of current to the VBUS wire and noting the resulting voltage. Note that in the example shown in Figure 2, the A-device that has to supply the power is the printer which is actually the peripheral in the session.

Why should USB On-the-Go be implemented on Portable Devices?

As previously discussed, the USB OTG specification has been released for over five years and the adoption rate has lagged. Therefore, the questions many people have are:

  • What is the real benefit of OTG?
  • Why would I want it in my device?
First, let's revisit the original target devices: portable consumer products such as cell phones, PDAs, digital still cameras, MP3 players, and similar. Nearly all of these device use USB as their method to interface to the PC today and share data. All of these devices also have other wired interfaces today, including power for battery charging, audio input/output, video output, capability to talk to non-PC devices, and so on. However, as form factors become smaller and smaller, the ability to remove/reduce the required external receptacle(s) space is of great interest.

The USB Implementer's Forum (USB-IF, the trade association for USB) has many initiatives in place or in development to address the needs of these portable devices that have exceeded the initial capabilities/scope of the original USB specification. These include the ability to charge a battery over a USB connection, the smaller form-factor micro connectors, and headset audio, to name just three key ones. When you combine these initiatives and wrap them with the USB OTG specification, you can enable all of this functionality while only requiring a single small form-factor receptacle for all the wired connectivity needs of a portable device.

First, let's look at some of the work going on in the area of battery charging. The initial USB specification did not plan for battery charging as part of the normal use case scenario. However, by putting a definition on how peripherals can charge off the 5 V/500 mA available, there is no reason that a device can not use this for charging. The device must meet all standard USB power specifications, never exceed 500 mA of current draw during operation, less than 100 mA when not configured, and less than 500 μA when the PC is in a suspend mode.

The Chinese government has taken this to the legislative level by mandating that all new handsets sold in China must charge over their USB receptacle. This can be via a standard USB port connection or via a dedicated USB charger. A USB Charger is a power supply that plugs into the wall, but has a USB plug on the output side. The data lines are left open so the device will not try and communicate.

bviously there are not the same current limitations, since it is no longer a USB host that is providing the power. They have developed a specification for what these chargers look like so that any charger will work with any handset. This does eliminate the need of the handset manufacturer to provide a new charger every time you buy a new device, as any charger will work with any USB devices.

In addition, there has been a recent development by the USB-IF to define a method for the battery-powered device (whether OTG-capable or a standard peripheral) to detect if the connection is a standard USB host connection or a dedicated USB charger. This is in order to make sure that the USB device is not damaged by a charger that was developed by a different vendor.

One of the key issues is how the OTG product will manage VBUS current draw when its battery is dead. Typically, recharging dead batteries demands a large current spike upon first connection to get the battery to a base threshold, to manage the balance of the device. However, if the charging is happening over a standard USB host connection, this is not possible while meeting the USB specification. Therefore, the end-equipment manufacturer must account for dead battery during their power management design phase.

As discussed above, the OTG specification originally released with mini-connectors defined. While the mini-B has established itself as a standard connector on many small form-factor peripheral devices, the mini-AB was found to be lacking to meet all the demands for these devices. It was not be small enough for many of these space-conscious applications.

Of even more concern was the robustness of the receptacle. There was concern that the insertion/removal life cycle was not adequate for the number of possible uses to which these portable devices would be exposed.

The final improvement was to add a latching mechanism to prevent accidental cable removal. This receptacle can replace all the other wired interfaces on portable devices,saving space and cost.

The key new development is the initiative to define a standard interface between a USB-OTG handset and a USB headset. This is a new device class that will define a standard interface to allow any OTG-capable phone/MP3 player/Video player that adds headset support to host a digital USB headset for both playback as well as mic input.

Since the headset will be plugging into a battery-powered device and will most likely receive all of its power from the device, it is critical to focus on power consumption for the headset. This will allow manufacturers of these type of audio centric products to remove the 2.5mm audio jack from their products and use the already available USB receptacle.

When we think about today's portable consumer devices, they really are just small form-factor PCs with many of the same characteristics of PCs, including storage capability, multiple processors, multiple wireless (and wired) interfaces, multi-media functionality, full-featured operating systems, and many desktop-like applications. Given the real benefit that PC users have derived from USB, it makes sense that the portable devices can also extend these benefits to their users.

References

  1. For more information on USB-OTG, go to http://www.usb.org/developers/onthego/
  2. For more USB solutions, go to http://www.ti.com/usb

Other USB-related articles

  • "Optimization of current-limiting solutions for USB 3.0," click here
  • "PPTC devices help protect electric motors, transformers and industrial controllers," click here
  • "Maintain USB signal integrity when adding ESD protection," click here
  • "Which USB is Right for Your Application? (Part 2)," click here

About the Author
Dan Harmon has held the position of Product Line Marketing Manager for Digital Interface Products at TI for the last seven years. During his over 20 year career at TI, Dan engineered night vision FLIR systems and was a camera design engineer on CCD Imaging Products before becoming the CCD Product Marketing Engineer. He earned a BSEE from the University of Dayton and a MSEE from the University of Texas in Arlington. Dan can be reached at ti_danharmon@ti.com.



 


Rate this article
WORSE | BETTER
1 2 3 4 5




Related Content

WEBINAR
1. Detecting Five Distinct Motions with MEMS Inertial Sensors

TECH PAPER
2. Enhanced GPS: The tight integration of received cellular timing signals and GNSS receivers for ubiquitous positioning

TECH PAPER
3. Capacitance Sensing—Waterproof Capacitance Sensing

WEBINAR
4. 3-in-1 RGB High Power LED Package Capabilities

 


 Featured Jobs
P and H Mining Equipment seeking Elctrical Systems Integration in Milwaukee, WI

D. E. Shaw Research seeking Verification Engineers in New York, NY

BP seeking Applications Manager in Houston, TX

Boston Scientific seeking Principal Electrical Engineer in Natick, MA

SEL seeking Manufacturing Engineer in Pullman, WA

More jobs on EETimesCareers
 Sponsor
 CAREER CENTER
Ready to take that job and shove it?
SEARCH JOBS:

 SPONSOR

 RECENT JOB POSTINGS
For more great jobs, career related news, features and services, please visit EETimes' Career Center.


   
   



 
 
All materials on this site Copyright © 2009 TechInsights, a Division of United Business Media LLC All rights reserved.
Privacy Statement ¦ Terms of Service