Advertisement

Overview of USB Battery Charging Revision 1.2 and the Important Role of Adapter Emulators

Abstract: At home, in the car, or plugged into a computer, USB-powered portable equipment needs a smart method for determining the appropriate amount of power to draw for both normal operation and charging. Motivated by the huge variety of portable devices, differences in USB ports, and complicated nature of rechargeable batteries, the USB Battery Charging Specification Revision 1.2 is a critical standard for establishing the proper way to charge a battery from a USB port. But even with the BC1.2 specification, some portable device manufacturers have still implemented proprietary chargers, further complicating the field of USB battery charging. This article discusses the impetus for recent industry standards for USB battery charging and the specifications that each defined. It also presents simple strategies for implementing a USB port capable of high-current charging for a variety of proprietary portable devices.

Introduction
Stop where you are and look around. Most likely you will see someone using a portable device. At home, in the car, or plugged into a computer, USB-powered portable equipment needs a smart method for determining the appropriate amount of power to draw for both normal operation and charging. Motivated by the huge variety of portable devices, differences in USB ports, and complicated nature of rechargeable batteries, the USB Battery Charging Specification Revision 1.2 (identified as BC1.2; see www.usb.org/developers/docs/devclass_docs/) released in 2010 is a critical standard for establishing the proper way to charge a battery from a USB port. But even with the BC1.2 specification, some portable device manufacturers have still implemented proprietary chargers, further complicating the field of USB battery charging.

This article discusses the impetus for recent industry standards for USB battery charging and the specifications that each defined. It also presents simple strategies for implementing a USB port capable of high-current charging for a variety of proprietary portable devices.

The Need for a Battery Charging Standard–the Pre-BC1.2 Era
The widespread adoption of USB was sparked because of its ability to power peripheral devices. Conceived in the mid-1990s, USB was originally intended to connect external devices (e.g., keyboard, mouse, printer, external drive, etc.) to a computer. As more and more disparate portable products came into favor, so too did the need for powering them. The ability to provide power from the same connector used for data transfer gave USB an immediate and significant advantage in the portable market.

Before the first battery charging specification in 2007, an attempt to charge a battery was, in essence, a crapshoot–very unpredictable results. With USB 2.0 in 2000 (www.usb.org/developers/docs/usb20_docs/), a peripheral device could draw 100mA by default, unless it explicitly negotiated to increase the current up to 500mA maximum. If there was no data activity on the bus after a delay, the bus would go into a “suspend” mode that limited the allowable current draw to 2.5mA. If a portable device with a completely depleted battery attempted to charge from a standard port, it could only reliably draw 2.5mA!

In reality, many electronics manufacturers still do not strictly adhere to the USB 2.0 specification by not implementing these current limits in the USB ports that they provide. Some (read: most) USB ports allow 100mA regardless of enumeration and continued activity; some ports even offer 500mA irrespective of the required power negotiation. Some portable devices require more than 100mA for their application, and make a faulty assumption that 500mA will always be available from a USB port.

A good charging scheme must know how to signal to a portable device what power levels are safe to draw from a USB port. While quite logical, there was a major problem with the previous ambiguous USB “state of affairs”–how will a USB port respond if more current is drawn than is expected? Some ports will shut down completely and will remain in shutdown until the peripheral device is unplugged and reattached. Other ports will issue a USB system reset and restart the enumeration process.

BC1.2 Is Introduced
Battery charging was not an original feature of USB. Consequently, there was no official provision before BC1.2 for charging the battery of a device that is powered off. By establishing a clear method of communicating the power capabilities of a USB port, many of these issues are remedied with BC1.2.

Regardless of the material used in a rechargeable battery, each one requires special consideration during operation and charging. For example, Li+ battery manufacturers sometimes specify a minimum discharge level; a deeply depleted battery beyond this threshold needs to be charged in a preconditioning mode before a full charge can begin. Once the battery reaches a nominal condition, a higher charging current can be used to reduce the charge time. This is often referred to as constant-current mode. When the battery is almost fully recharged, continuing in constant-current mode may be harmful. A smart charging solution will switch to a constant-voltage mode to “top-off” the charge. Due to the complex nature of a battery and the case-by-case customization necessary to safely charge one, today most portable devices have a dedicated battery-charge controller integrated into the final product.

An added advantage of BC1.2 is its provisions to charge dead or weak batteries. Batteries below the “weak battery threshold” are allowed to charge with a current higher than the 2.5mA suspend current, regardless of the port type. Once the battery reaches a nominal level, the device is mandated to enumerate within a certain timeframe to maintain a higher current draw from USB ports that require enumeration.
Not All Ports Are Created Equal

The BC1.2 outlines three distinct types of USB port and two key monikers. A “charging” port is one that delivers currents higher than 500mA. A “downstream” port signals data as per USB 2.0. The BC1.2 specification also establishes both how each port should appear to the end device, and the protocol to identify what type of port is implemented. The three USB BC1.2 port types are SDP, DCP, and CDP (see Figure 1):

1. Standard Downstream Port (SDP) This port features 15kΩ pulldown resistors on both the D+ and D- lines. The current limits are those discussed above: 2.5mA when suspended, 100mA when connected, and 500mA when connected and configured for higher power.

2. Dedicated Charging Port (DCP) This port does not support any data transfer, but is capable of supplying charge currents beyond 1.5A. It features a short between the D+ and D- lines. This type of port allows for wall chargers and car chargers with high-charge capability without the need for enumeration.

3. Charging Downstream Port (CDP) This port allows for both high-current charging and data transfer fully compliant with USB 2.0. It features the 15kΩ pulldown resistors necessary for the D+ and D- communication, and also has internal circuitry that is switched in during the charger detection phase. This internal circuitry allows the portable device to distinguish a CDP from other port types. 

USB Charging
Thankfully, DCPs are very simple to emulate electrically. D+ and D- are shorted together (the BC1.2 specification sets a maximum impedance of 200Ω between them), and the lines are left floating with respect to ground. All a portable device needs to do to identify a DCP is drive either D+ or D- with a signal and observe the other line for the same signal. In fact, the BC1.2 procedure for port identification does exactly this. A portable device is supposed to set a voltage on D+ and measure D-, and then set a voltage on D- and measure D+. With such a simple setup, a wall charger with USB connector should be very easy to design! All one has to do is short the two pins on the connector and add it to an existing wall charger capable of supplying 2A at 5V. Right? Not exactly.

Even with the BC1.2 specification available, some electronics manufacturers develop custom protocols for their dedicated chargers. When you attach one of their devices to a fully compliant BC1.2 charging port, you may still get the error message, “Charging is not supported with this accessory.” Despite this message, these devices may actually still charge, but the charge currents can be extremely small. Fortunately, almost all of these proprietary dedicated chargers identify themselves by a DC level set on the D+ and D- lines by a resistor-divider between 5V and ground (Figure 2).

USB Charging 2
Fortunately, there is a smart, inexpensive solution to optimally charge devices from these different manufacturers and devices that are compliant with BC1.2.
Port Detection Is a Must

USB Charger Adapter Emulators
A USB charger adapter emulator is a device that enables a dedicated charger to appear as either a BC1.2 DCP or other proprietary charger. Charger adapter emulators provide a dynamic element to a wall charger without needing to add a separate control unit to detect what type of device is attached. Many charger adapter emulators are hardware configurable to select between different charger identification profiles. Others have autodetection circuitry to sense what type of portable device is attached, and can switch between a manufacturer's specific voltage-divider or the standardized BC1.2 DCP mode.

To conveniently integrate into a wall charger and be effective, USB charger adapter emulators must have a small profile and a low external component count. For example, the MAX14630/MAX14632 are charger adapter emulators that can be configured to automatically detect a USB BC1.2-compliant device, Apple 1.0A device, Apple 2.1A device, or Samsung®Galaxy Tablet 2A device. Each of these USB adapter emulators only requires one bypass capacitor and comes in a 2.90mm x 1.60mm package. The circuit in Figure 3 is a quick implementation of a single dedicated charger system that is compatible with Apple 1A and USB BC1.2–compliant devices. This adapter emulator connects a resistive divider to the data lines by default, but can automatically detect a USB BC1.2 device and short D+ and D- together as per the BC1.2 specification. Used in conjunction with an AC-to-DC 5V power supply, a variety of portable devices can be optimally charged by using an adapter emulator to communicate the proper current limits.

USB Charging 3
Dedicated chargers are relatively simple creatures. Charging downstream ports add the complexity of supporting USB 2.0 data rates and the capability of handling up to 1.5A of charge current. To distinguish itself from a dedicated charger, a CDP has internal circuitry outlined in BC1.2 that enables it to drive the D- line to a specific voltage when it senses a portable device driving D+ during the port-detection phase. This internal circuitry must only be switched on during port detection, and must only contribute a specified amount of parasitic capacitance on the bus when switched off. These limits are set by the USB 2.0 specification, which outlines the circuit parameters that guarantee high-speed USB communication.

After the port-detection phase, a CDP compliant with BC1.2 disconnects the mentioned internal circuitry and now normal USB data transfer can occur. Interestingly enough, there is one issue that arises in CDPs that does not occur with DCPs: digital noise margins. According to the USB 2.0, a ground current of 100mA through a USB cable can result in a 25mV difference between host ground and device ground. Since currents can be up to 1.5A, both a CDP and a portable device that are compliant with BC1.2 must be able to resolve data with a maximum ground offset of 375mV from device to host. The takeaway from these critical issues is that one cannot haphazardly build a CDP. Care must be taken to ensure proper operation.

USB Host Adapter Emulator
A USB host adapter emulator combines high-speed USB analog switches to handle full USB 2.0 traffic at 480Mbps and USB charger adapter emulator circuitry. In addition to DCP and proprietary charger profiles, host adapter emulators can be configured for SDP and CDP passthrough modes, as outlined in BC1.2. In CDP passthrough mode, the devices emulate CDP functionality when a device is first attached. Then, to support normal USB 2.0 traffic they hand over control of the D+ and D- lines to the USB host transceiver after the charger detection phase.

The configurability of this class of devices makes host adapter emulators especially suitable for computers. For example, when a computer is connected to its power supply, it can enable a high-current USB charging port by configuring its host adapter emulator as a CDP. When running off a laptop's battery power, the computer can switch the adapter emulator to a standard USB port configuration to limit the current draw to 500mA maximum. By reconfiguring its adapter emulator as a dedicated charger, a laptop can still offer high-current charging from its USB port while it is powered down but plugged in.

One important consideration of host adapter emulators is how they handle a USB bus when they are reconfigured. Improper switching from one state to another can cause a fault in downstream USB devices. Consequently, a bus reset or current-limiting switch is often included to account for changing configurations. For example, in addition to supporting SDP passthrough, CDP passthrough, DCP, Apple 2.1A, and Samsung 2A modes, the MAX14640, MAX14641, MAX14642, MAX14643, and MAX14644 devices issue a bus reset to ensure that downstream devices are aware of any change in the host. They also feature an automatic current-limit switch-control output that resets portable devices whenever the host transceiver reconfigures the adapter emulator through I2C or goes into standby.

The charger and host adapter emulators previously mentioned are designed to be coupled with a separate power supply, either from a wall adapter or computer's power supply. Other than at home and near a computer, the third most common place to charge a USB device is in an automobile. The most common auxiliary power outlets in a vehicle provide 12V DC, and in special cases 24V DC. However, this voltage can fluctuate widely in different operating environments. Given the variations of battery voltage with temperature, the actual voltage provided may be as low as 9V or as high as 28V; it may have temporary surges up to 40V. Some USB port applications, such as car chargers and navigation systems, require both an automotive-qualified USB charger/host adapter emulator and a rugged DC-DC converter to create the 5V necessary for USB power.

Using an adapter emulator gives the added advantage of isolating the host USB transceiver from potential ESD damage, a short on the USB lines, or a battery short circuit. The DC-DC converter needs to guarantee proper operation over a wide range of input voltages. The ability to preserve the car battery is a critical feature, so a well-designed converter should include an adjustable current-limiting circuit. Additionally, a car charging system needs to sense the output current and communicate this diagnostic data to the control unit, which requires a current-sense amplifier. The MAX16984 is an example of a class of products dedicated to integrating the DC-DC converter, host adapter emulator circuitry, ESD protection, and current-sense amplifier into a single IC solution. The MAX16984 is designed for 4.5V to 28V inputs, with protection from load-dump transients up to 42V. It has built-in support for a resistive feedback network to monitor the VBUS voltage and a high-side current-sense amplifier to monitor the current going to the attached USB device. And, of course, it features USB BC1.2-compliant circuitry, supports Hi-Speed (480Mbps) USB data, and can emulate Apple 1A/2.1A chargers.

USB Charging 4Figure 4. A highly integrated DC-DC step-down converter with USB host charger adapter circuitry using the MAX16984.

Summary
The USB BC1.2 standard was defined in 2010 and immediately provided for battery charging of a portable device that is powered off. It also added provisions for charging dead or weak batteries. It defined three distinct types of USB ports, each described here. By adhering to the USB BC1.2 standard, USB ports can now communicate their power capabilities to USB-powered portable equipment. Battery charging can now be done safely for a wide range of portable devices. Finally, the development of USB adapter emulators adds significant configurability to the design of a USB port.

For USB ports committed to charging, the new charger adapter emulators increase the number of compatible pluggable devices. In dynamic applications, such as the different requirements placed on a USB port built into a computer, host adapter emulators provide a simplified design. In harsh automotive environments, integrated DC-DC converters and adapter emulators can manage the fluctuating voltage levels, cut cost, and save space.

General References
    The USB-IF. (2010, December 7). Battery Charging Specification Revision 1.2.
    Sherman, L., Maxim Integrated application note 4803, ” The Basics of USB Battery Charging: A Survival Guide.”
    Sherman, L., Maxim Integrated application note 3241, ” Charging Batteries Using USB Power.”
    channelE MAGAZINE FOR ELECTRONICS, 25-10-11, Simion, D., “Emulators and Detectors for USB Battery Charging: Industry Migrates to a Global Standard.”

Advertisement



Learn more about Electronic Products Magazine

Leave a Reply