REFERENCE SCHEMATIC 3241

Charging Batteries Using USB Power

By:  Len Sherman
© Jun 25, 2004, Maxim Integrated Products, Inc.

Abstract: Many devices with rechargeable batteries use USB power to recharge the batteries while they are connected. This application note describes the power available from USB and how it can be used to charge batteries, including circuits and some hints.

The USB interface specification includes the ability to power devices. This enlightened change from the serial and parallel ports of the past allows a dramatic increase in the variety of devices that can be conveniently connected to a PC.

One way to use USB power is battery charging. Since many portable devices, like MP3 players and PDAs, exchange information with PCs, device convenience is significantly enhanced if battery charging and data exchange take place simultaneously and over one cable. Combining USB and battery-powered functionality gives rise to a whole range of "untethered" devices, such as removable web cameras, that operate while connected to a PC or not. In many cases, it is no longer necessary to include an awkward AC adapter or "wall wart."

Battery charging from USB can be complex or straightforward, as dictated by the demands of the USB device. Design influences range beyond the typical chorus of "cost", "size," and "weight." Other key considerations include: 1) how quickly a device with a discharged battery must operate with full functionality when plugged into a USB port; 2) the time that can be allowed for battery charging; 3) power budgeting within USB limits; and 4) the necessity of including AC adapter charging. These issues, and solutions thereto, will be addressed after some discussion of USB from a power point of view.

USB Power

All host USB host devices like PCs and notebooks can source at least 500mA, or five "unit loads" per USB socket. In USB terminology, "one unit load" is 100mA. Self-powered USB hubs can also supply five unit loads. Bus-powered USB hubs are guaranteed to supply only 1 unit load (100mA). According to the USB spec, and illustrated in Figure 1, the minimum available voltage from a USB host or powered hub at the peripheral end of the cable is 4.5V, while the minimum voltage from a USB bus-powered hub is 4.35V. These voltages allow very little headroom when charging Lithium batteries, which typically require 4.2V, making charger dropout extremely important.

Figure 1. USB Voltage drops (from Universal Serial Bus Specification Rev 2.0).
Figure 1. USB Voltage drops (from Universal Serial Bus Specification Rev 2.0).

All devices that plug into a USB port must start out drawing no more than 100mA. After communicating with the host, the device can determine if it can take the full 500mA.

USB peripheral devices contain one of two receptacles. Both are smaller than the socket found in PCs and other USB hosts. The "Series B" and the smaller "Series Mini-B" receptacles are shown in Figure 2. Power is taken from pins 1 (+5V) and 4 (GND) on the Series B, and from pins 1 (+5V) and 5 (GND) on the Series Mini-B.

Figure 2. These receptacles for USB peripherals differ from the large four-pin sockets found on hosts and hubs. Power and data connection pins are shown.
Figure 2. These receptacles for USB peripherals differ from the large four-pin sockets found on hosts and hubs. Power and data connection pins are shown.

Once connected, all USB devices must identify themselves to the host. This is called "enumeration." There are practical exceptions to this rule, which are discussed at the end of this article. In the identification process, the host determines the power needs of the USB devices and gives, or denies, the OK for the device to increase its load from 100mA maximum to 500mA maximum.

Simple USB/AC Adapter Charging

Some very basic devices many not want the software overhead that is needed to sort out and optimize use of the available USB power. If the device load current is limited to 100mA (termed "one unit load" in USB parlance) any USB host, self-powered hub, or bus-powered hub can power the device. For such designs a very basic charger and regulator scheme is shown in Figure 3.

Figure 3. With simple charging at 100mA from USB and 350mA from an AC adapter, no enumeration is needed for the charger because the USB charge current does not exceed one unit load (100mA). The 3.3V system load is always drawn from the battery.
Figure 3. With simple charging at 100mA from USB and 350mA from an AC adapter, no enumeration is needed for the charger because the USB charge current does not exceed "one unit load" (100mA). The 3.3V system load is always drawn from the battery.

This circuit charges the battery whenever the device is docked to USB or plugged into the AC adapter. At the same time, the system load is always connected to the battery, in this case through a simple linear regulator (U2), which can supply up to 200mA. If the system continuously draws that amount of current while the battery is charging at 100mA from USB, the battery will still discharge since the load current exceeds the charge current. In most small systems, the peak loads occur only for a fraction of the total operating time, so as long as the average load current is less than charging current, the battery will still charge. When the AC adapter is connected, the charger (U1) maximum current increases to 350mA. If USB and the AC adapter are connected at the same time, the AC adapter is automatically given precedence.

One characteristic of U1 that is required by the USB spec (but is also wise for chargers in general) is that current is never allowed to flow back to a power input from either the battery or another power input. In conventional chargers, this can be guaranteed with input diodes, but the small difference between the minimum USB voltage (4.35V) and the required Lithium battery voltage (4.2V) makes even Schottky diodes inappropriate. For this reason all reverse current paths are blocked within the U1 IC.

The circuit of Figure 3 has limitations that may make it inappropriate for some rechargeable USB devices. The most obvious is its relatively low charge current, which translates to long charge time if the Li-Ion battery capacity is more than a few hundred mA-hours. The second limitation occurs because the load (linear regulator input) is always connected to the battery. In this case, the system may not be able to operate immediately upon being plugged in if the battery is deeply discharged since there may be a delay before the battery reaches a sufficient voltage for the system to operate.

Load Switching and Other Enhancements

In more advanced systems, a number of enhancements are often required in or around the charger. These can include selectable charge current to match the current capability of the source (USB or AC Adapter) or battery, load switching when power is plugged in, and over-voltage protection. The circuit in Figure 4 adds some of these features by means of external MOSFETs driven by voltage detectors in the charger IC.

Figure 4. SOT-23 power MOSFETs add useful features such as over-voltage protection and battery disconnect when external power is applied. The active power source drives the system directly while the battery charges unloaded.
Figure 4. SOT-23 power MOSFETs add useful features such as over-voltage protection and battery disconnect when external power is applied. The active power source drives the system directly while the battery charges unloaded.

MOSFETs Q1 and Q2 and diodes D1 and D2 bypass the battery and connect the active (USB or AC adapter) power input directly to the load. When a power input is valid, its monitor output (UOK\ or DCOK\) goes low to turn on the appropriate MOSFET. When both inputs are valid, the DC input has precedence; U1 prevents both inputs from being active at the same time. Diodes D1 and D2 prevent reverse current from flowing between inputs via the "System Load" power path, while the charger has built-in circuitry to prevent reverse current through the charging path (at BATT).

MOSFET Q2 also provides AC adapter over-voltage protection up to 18V. An under/over voltage monitor (at DC) allows charging only when the AC adapter voltage is between 4V and 6.25V.

The last MOSFET, Q3, turns on to connect the battery to the load when no valid external power is present. When either USB or DC power is connected, the Power On (PON) output immediately shuts off Q3 to disconnect the battery from the load. This allows the system to operate immediately when external power is applied, even if the battery is deeply discharged or damaged.

When USB is connected, the USB device communicates with the host to determine if the load current can be increased. The load starts out at one unit load and is increased to five unit loads if the host allows it. This 5-to-1 current range can be problematic for conventional chargers (not designed for USB). The problem is that the current accuracy of conventional chargers, though adequate at high current, usually suffers at low current settings due to offsets in the current-sense circuitry. The result can be that the low range (for one unit load) charge current may have to be set too low to be useful in order to be sure that it never exceeds the 100mA limit. For example, with 10% accuracy at 500mA, the output would have to be set for 450mA to ensure it never exceeds 500mA. That alone is acceptable; however, to ensure that the low range charge current does not exceed 100mA, the nominal current would have to be set at 50mA, and the minimum could then be 0mA, which is clearly unacceptable. If USB charging is to be effective in both ranges, sufficient accuracy is needed to allow the maximum possible typical charge current without exceeding the USB limits.

In some designs, the system power needs are such that it is impractical to separately power the load and charge the battery with less than the 500mA USB budget, but doing so from an AC adapter is not a problem. The connection in Figure 5, a simplified subset of Figure 4, does this in a cost-effective way. USB power is not routed directly to the load. Both charging and system operation still take place on USB power, but the system remains connected to the battery. The limitation is the same as in Figure 3: if the battery is deeply discharged when USB is connected, there may be a delay before the system can operate. But if DC power is connected, Figure 5 operates in the same manner as Figure 4 with no wait regardless of battery state because Q2 turns off, passing the system load from the battery to the DC input via D1.

Figure 5. A simplified design does not pass USB power to directly to the load, but does so for the DC input. When USB is connected, the system is still powered, but from the battery while it also is charging.
Figure 5. A simplified design does not pass USB power to directly to the load, but does so for the DC input. When USB is connected, the system is still powered, but from the battery while it also is charging.

Nickel-Metal Hydride Charging

Though Lithium-Ion batteries provide the best performance for most portable information devices, Nickel-Metal Hydride (NiMH) cells can still be a viable choice in minimum-cost designs. A good way to keep cost low when the load requirements are not too severe is by using one NiMH cell. This requires a DC-DC converter to boost the typically 1.3V cell voltage into something the device can use (typically 3.3V). Since some type of regulator is needed for any battery powered device, the DC-DC converter is really then only a different, not an additional, regulator.

The connection in Figure 6 uses an unusual approach to charge the NiMH cell and switch the system load between the USB input and the battery with no external FETs. The "charger" is actually a DC-DC step-down converter (U1) operated in current limit. It charges the battery with between 300 and 400mA. Though not a precise current source, it has adequate current control for the purpose and is able to maintain current control even into a shorted cell. A big advantage of the DC-DC charging topology over more common linear schemes is efficient utilization of the limited USB power resource. When charging one NiMH cell at 400mA, the circuit draws only 150mA from the USB input. That leaves 350mA for system use while charging.

Figure 6. Simple NiMH charge/power supply arrangement automatically hands off power to USB without a complex MOSFET switch array.
Figure 6. Simple NiMH charge/power supply arrangement automatically hands off power to USB without a complex MOSFET switch array.

Load hand-off from the battery to USB is accomplished by diode or-ing (D1) USB power with the boost converter output. When USB is disconnected, the boost converter generates 3.3V at the output. With USB connected, D1 pulls the DC-DC boost converter (U2) output up to approximately 4.7V. When U2's output is pulled up this way, it automatically turns off and draws less than 1uA from the battery. If the shift of the output from 3.3V to 4.7V output when USB is connected is not acceptable, then a linear regulator can be inserted in series with D1.

A limitation of this circuit is that is relies on the system to control charge termination. U1 acts only as a current source and will over-charge the cell if left on indefinitely. R1 and R2 set U1's maximum output voltage at 2V as a safety limit. The "Charge Enable" input functions both as a means for the system to terminate charging and as a way to reduce USB load current prior to enumeration, if necessary, since the charger's 150mA input current is more than one unit load.

What Your Mom Didn't Tell You About USB

With any standard, it's interesting to see how actual practice diverges from the printed spec or how undefined parts of the spec take shape. Though USB is, with little doubt, one of the best thought out, reliable, and useful standards efforts in quite some time, it has not been immune to the impact of the real world. Some observed USB characteristics that may not be obvious, yet can influence power designs, are:
  • USB ports do NOT limit current. Though the USB spec provides details about how much current a USB port must supply, there are mile-wide limits on how much it might supply. Though the upper limit specifies that the current never exceed 5A, but a wise designer should not rely on that. In any case, a USB port can never be counted on to limit its output current to 500mA, or any amount near that. In fact, output current from a port often exceeds several Amps since multi-port systems (like PCs) frequently have only one protection device for all ports in the system. The protection device is set above the TOTAL power rating of all the ports. So a four-port system may supply over 2A from one port if the other ports are not loaded. Furthermore, while some PCs use 10-20% accurate IC-based protection, other will use much less accurate poly-fuses (fuses that reset themselves) that will not trip until the load is 100% or more above the rating.
  • USB Ports rarely (never) turn off power: The USB spec is not specific about this, but it is sometimes believed that USB power may be disconnected as a result of failed enumeration, or other software or firmware problems. In actual practice, no USB host shuts off USB power for anything other that an electrical fault (like a short). There may an exception to this statement, but I have yet to see it. Notebook and motherboard makers are barely willing to pay for fault protection, let alone smart power switching. So no matter what dialog takes place (or does not take place) between a USB peripheral and host, 5V (at either 500mA or 100mA, or even maybe 2A or more) will be available. This is born out by the appearance in the market of USB powered reading lights, coffee mug warmers, and other similar items that have no communication capability. They may not be "compliant," but they do function.


Related Parts
MAX1555 SOT23, Dual-Input, USB/AC Adapter, 1-Cell Li+ Battery Chargers Free Samples  
MAX1692 Low-Noise, 5.5V Input, PWM Step-Down Regulator Free Samples  
MAX1722 1.5µA IQ, Step-Up DC-DC Converters in TSOT  
MAX1874 Dual-Input, USB/AC Adapter, 1-Cell Li+ Charger with OVP and Thermal Regulation Free Samples  
MAX8881 12V, Ultra-Low-IQ, Low-Dropout Linear Regulators with POK Free Samples  


Next Steps
EE-Mail Subscribe to EE-Mail and receive automatic notice of new documents in your areas of interest.
Download Download, PDF Format (84kB) Download, MOBI Format (Kindle)  
Share
Other Channels  Email this page to an associate or friend. 


The content on this webpage is protected by copyright laws of the United States and of foreign countries. For requests to copy this content, contact us.

APP 3241: Jun 25, 2004
REFERENCE SCHEMATIC 3241, AN3241, AN 3241, APP3241, Appnote3241, Appnote 3241