Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
?
EE Times-Asia > Interface
?
?
Interface??

USB batt charging protocols in Android-based design

Posted: 20 Feb 2015 ?? ?Print Version ?Bookmark and Share

Keywords:USB? Battery Charging? Accessory Charging Adapter? USB-IF? Android?

This article is excerpted from Unboxing Android: A hands on approach with real world examples, by Rajaram Regupathy.

USB technology has evolved over the years as the standard for connecting peripherals like keyboards, printers, and so on, to personal computers, and as a result, USB has replaced serial and parallel ports. Modern devices like smart phones and game controllers have also adopted this technology as a primary transport mechanism. As part of their evolution, USB evolved from a data interface to an important source of power to charge portable devices like a smart phones, or even to power up an external audio speaker. In Battery Charging Specification, the Battery Charging Working Group of the USB Implementers Forum (USB-IF) has standardised how a USB power source has to behave, the different types of USB power sources, and how much power a device can consume when connected to a USB source.

This article explores USB-based charging that you, as an Android developer, need to know to develop applications related to charging in various user contexts: wall charger, personal computer, and charging dock. Because both will be important, this article will discuss battery charging in the context of both the USB.org formal spec as well as the native one included within the Android framework.

USB battery specification overview
In a way, the main focus of the USB Battery Charging 1.2 specification is to define the characteristics of different chargers and describe their mechanisms for how to detect the chargers. This section focuses on the different types of charging options (USB ports and chargers) and their characteristics in brief. The specification also details the mechanism that can differentiate the different types, but that is beyond the scope of this book. Before you study the different types of charging ports, you should first understand some key USB terms relevant to this section.

Downstream Port: A port that data flows away from the host. In laymen terms, a USB port on a host PC or on a hub, with ports that are farthest from the host, are downstream ports.

Upstream Port: A port that sends data towards the host. Generally, a port on a USB device and on a hub, with the port that is closest to the host, are upstream ports.

Here are the different types of charging options (USB ports and chargers) and their characteristics:

Standard Downstream Port (SDP) refers to a port on a host or hub that's compliant with USB 2.0 specifications. This means a SDP port can provide different power, depending upon the state of connection with the USB device. An SDP port expects a downstream device to have the following maximum current consumption in different states:
???2.5mA when the device is in a suspended state
???100mA when connected and not configured
???500mA or the amount of current requested by the device's configuration descriptor, whichever is less, when configured

When a USB device is connected to a SDP, the device can draw 100mA and up to 500mA once the device is enumerated successfully by the host. The charging setup as described for the personal computer example of the previous section represents a Standard Downstream Port.

Charging Downstream Port (CDP) refers to a port on a host or hub that's compliant with USB 2.0 specifications. But unlike the SDP, a CDP port allows a USB device to draw more current, thereby facilitating faster charging. When a portable device is connected to a charging port, it is expected to behave in the following way: ???2.5mA when the device is in a suspended state
???100mA when it is connected and not configured
???Maximum of 1.5A when configured

When a USB device is connected to a CDP, the device will be enumerated successfully by the host. The charging setup as described for the personal computer example of the previous section can also represent a Charging Downstream Port. A CDP port is generally marked with a symbol to indicate to the user that it can supply more power.

1???2???3???4???5???6?Next Page?Last Page



Article Comments - USB batt charging protocols in Andro...
Comments:??
*? You can enter [0] more charecters.
*Verify code:
?
?
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

?
?
Back to Top