Diodes Menu Close
Back to Technical Articles

How USB Charges Just About Any Electronic Device

What makes USB 2.0 the universal battery charger—and what nuances make charging so efficient?

USB 2.0 and 3.0 have evolved from a fast data connection for peripherals like external HDDs and digital cameras, to the de facto low voltage way to charge battery-operated devices. From handheld GPS, fitness bands and smartphones to this year’s wearable connected watches, USB 2.0 (and soon 3.0) charges it all. I, for one, am grateful to ditch the rat’s nest of cables in my desk (Figure 1) in favor of a single micro USB connector for everything except Apple products. But how can USB replace all those legacy cables, wall wart chargers and other “bricks”?

The secret is the USB-IF’s Battery Charging Specification BC1.2 that—when implemented with smart charging features from vendors like Texas Instruments and Pericom Semiconductor—make trickle- and fast-charging a snap. Here’s how it works, and some subtleties that make it better.

Figure 1 225x300
Figure 1. Proprietary USB 2.0 cables like these will soon give way to the universal micro USB charging cable, followed soon by USB 3.0. (Photo by author.)

USB 2.0 Refresher

The good folks at the USB implementers forum (USB-IF) define the USB 2.0 cable as having four wires plus a grounded shell (Figure 2). There are 5VDC, ground and a data pair called Data+ (D+) and Data- (D-). While the data happens on D+/-, charging current is provided on the 5 volt wires. But D+/- come into play on creating various charging profiles where a downstream port device (PD) needing a charge plays a minuet by toggling these wires in a specific way.

Figure 2. USB 2.0 pin out. (Courtesy: Wikipedia and Wiki Commons; by Simon Eugster.)

The enumeration sequence on the wires tells the charger how much current to source for charging the PD. This orchestration is the basis of “smart” charging and is essential to today’s high capacity (larger current) battery devices like tablets. Smart charging is also needed to quickly top off on-the-go devices in under an hour instead of overnight. In USB 2.0, the PD normally charges at 500 mA (0.5A), while it’s 900 mA in USB 3.0. These are not nearly enough for most devices today.

The latest goals for Battery Charging (BC) evolved into the USB Power Delivery specification. But how did we get there?

USB originally charged devices only via a PC or laptop port, followed later by hubs, portable chargers, “top up” batteries, and even in-car USB ports. By 2007 it became clear that USB would soon “power” the world and BC1.1 was released. This was partly driven by government demands to reduce electronic waste through hardware standardization.

Table 1 defines three charging profiles—CDP, DCP, and SDP—where the Standard Downstream Port (SDP) is the 500mA charge described above and the other profiles offer more amperage. Additionally, proprietary charging profiles from Apple, Samsung, and China telecom (YD/T1591-2009) define additional current.

USB Power Delivery offers the following features:

  • Increased power levels from existing USB standard up to 100W.
  • Power direction is no longer fixed. This enables the product with the power (Host or Peripheral) to provide the power.
  • Optimize power management across multiple peripherals by allowing each device to take only the power it requires, and to get more power when required for a given application.
  • Intelligent and flexible system level management of power via optional hub communication with the PC.
  • Allows low power cases such as headsets to negotiate for only the power they require

    table1 battery charging specs
    Table 1. USB Implementer Forum (USB-IF) Battery Charging specifications (from their BC1.2 compliance plan document, October 2011).

    Figure 3 shows the basic set-up for charging profiles beyond SDP (that is: for more than 500 mA). A charger IC such as Pericom’s PI5USB2546A is inserted in the data path between the USB host controller and the port into which the USB cable is plugged. If the bus is configured and not suspended (such as a PC in S0 “on” mode), the standard downstream port (SDP) can charge at 500 mA max. Many modern battery devices will not charge at such low current—or will charge so slowly as to be perceived as not charging at all. Other profiles are needed.

    Diodes Incorporated's USB Charger App Diagram
    Figure 3. Typical USB charger set-up requiring a charger IC between host controller and the USB cable port.

    A charging downstream port (CDP) can transact USB data while charging the PD at up to 1.5A. As well, per BC1.1 and BC1.2, a dedicated charging port (DCP) will not transact USB data but will charge at 1.5 A (max) at 5.25 V. This also matches the Chinese telecom standard when the charging profile is enabled. Lastly, as mentioned above, Apple uses its own proprietary charging profiles as shown in Table 2. When enabled, the profiles for Apple 1A, 2A and the new 2.4A will charge batteries at up to 2.4A.

    This is why trying to charge an iPad from a non-Apple wall wart will often take so long even if the charger can source enough current: neither the charger nor the iPad’s charging circuit accepts the desired 2.0 or 2.4 amps because the proper profile enumeration hasn’t taken place.

    table2 Proprietary charging profile
    Table 2: Apple’s proprietary charging profiles supply up to 2.4A at voltages different from the USB-IF’s BC1.2 spec.

    How Profiles Enumerate

    Charging profiles from the USB-IF are well defined, but profiles from vendors like Apple or Samsung can be a bit of a mystery. USB charger IC suppliers like Pericom invest significant R&D investigating OEM chargers, devices, and assuring proper charge profile compliance with dozens to hundreds of battery-operated devices. Let’s take a look at how profile enumeration works.

    For simplicity’s sake, let’s assume the charging port is on a laptop computer and the CPU is in standby, sleep or completely shut down. The USB 2.0 port can still charge a device per BC1.2. The steps are as follows:

    Step 1: Primary detection to determine if the port should be in SDP, CDP, or DCP (Refer to Table 1 and Figure 3).

    • PD (device to be charged) sends out a 0.5 – 0.7V pulse on D+ and waits for a similar pulse from the USB port on D- .
    • If there is no response on D-, the profile is SDP. See Figure 4.
    • If there is a response on D-, Secondary detection begins.

    Step 2: Secondary detection determines if the profile is CDP or DCP.

    • PD then sends out a similar pulse on D- and waits for a reply on D+ .
    • The profile is CDP if there is no reply on D+ .
    • The profile is DCP if there is a 0.5 – 0.7V reply on D+. This is often accomplished by the charging IC merely shorting D+/D- together.

      Diodes Incorporated's Standard USB SDP (Fig 4)
      Figure 4. Standard USB SDP charging profile provides only 500mA (USB 2.0) or 900 mA (USB 3.0) in a laptop powering a mobile device (left). The Pericom PI5USB254x family is shown.

      The two-stage profile detection specified by the USB-IF is simple and effective. But in the equivalent CDP and DCP modes for proprietary profiles such as for Samsung or Apple devices, the enumeration and voltages are different. Figure 5 shows the sequence—which is mostly similar—for these other PDs. Figure 5 specifies the Pericom – PI5USB2546A devices needed.

    Figure 5 r2

    Figure 5. The enumeration sequence (red) for Auto DCP mode for proprietary profiles such as for Samsung devices is considerably more complex. The USB charge IC contains logic and voltage dividers to properly apply a dedicated fast charge.

Note the sensing control and voltage divider circuits necessary to accomplish the proprietary profiles. In fact, Pericom has a patent (US 8,237,414 B1; 2012) for this sequence which: 1. identifies the device (PD) needing a charge; 2. switches to the right communication scheme; 3. identifies the profile needed (including non-BC1.2/proprietary profiles); and 4. changes the voltages accordingly. Charging then commences via “intelligent” charge controller ICs.

Beyond the Specs

Note that in the previous examples, the laptop wasn’t running, but plugging in a device still resulted in the proper fast charging routine. How can four USB wires/pins cause so many nuances? When choosing a charger IC, the details matter.

For example, per BC1.2 the USB port will detect the PD only once—typically when the device is plugged in. What happens if the device remains plugged in but needs a fast charge some time after its initial charge? Beyond unplugging the PD (which is what most of us do), some smart chargers can mimic a re-plug by generating the Vbus +5V if the device so requests. This starts the enumeration procedure without having to disconnect the device.

Disconnecting devices during charging can potentially result in voltage spikes, shorts (frayed cables), and other transients that can affect the charge IC, the PD, the battery, or all of them. Some nice-to-haves in an intelligent charge controller include:

    • Adjustable current limit protects the USB port, the host computer (or whatever host into which the charge controller is a part), and the load due to a short or even a bad battery that draws an excessive current. Having a programmable current maximum allows design flexibility and potential future proofing.
    • Undervoltage lockout will disable the charge IC if the system input voltage is too low. This sometimes occurs when a host is operating on battery, when the host CPU and multiple peripherals are operating, or due to other unforeseen insufficient supply voltage.

If the charge IC is disabled due to this condition, there’s less probability for erratic operation, which might damage the PD or its battery. (Remember: many mobile batteries can become dangerous under certain conditions.) This feature goes hand-in-hand with thermal protection that disables the IC just like a CPU should it become too hot.

  • Sleep-mode charging was described above and pertains to the common S3/4/5 modes. An intelligent charge controller like the Pericom PI5USB2546A family will enumerate the PD and determine the proper BC1.2 or proprietary charging profile.
  • Keyboard/mouse wake-up is a nice-to-have that is part of most USB host controllers but only works if the USB charger between the host and the port properly passes those signals through.

Plug and Go

It’s clear USB 2.0—and soon USB 3.0 with the follow-on Power Delivery specs—is the de facto way to charge low voltage, battery-operated devices. Yet despite its apparent simplicity to the user, there’s a lot that goes on behind the scenes to make both slow- and fast-charging possible. As new devices with bigger batteries emerge, the need for intelligent USB charge controllers becomes more acute. More devices means more charge profiles and more advanced charger features.