APPLICATION NOTE Automatic Detection of USB Port vs Wall Adapter Power Introduction Skyworks AAT3685 is a versatile Lithium-ion/polymer (Li-ion/poly) battery charge control I/C capable of charging single-cell Li-ion/poly batteries at constant current rates up to 1 A. The AAT3685 also uses an automatic charge reduction technique that allows the device to safely operate from Universal Serial Bus (USB) port power sources for charging batteries. This unique charger can be programmed for two discrete constant current charge levels. Collectively, these features make the AAT3685 an ideal solution for portable product applications that use both an AC wall adapter and a USB port for a charge source supply through a single input power connector. Highly integrated portable products that use the USB port for both data communication and as a power source typically rely on their internal USB interface controller to detect the presence of a USB port connection. In this manner, a device can be set up so the battery charge controller defaults to a fast charge constant current based on the capacity of a wall adapter when power is applied and no USB port host is detected. When a device is connected to an actual USB port, the system detects a USB host ID and can then set the battery charge controller to a level at or below 500 ma to match the current capacity available from most USB ports. Using a USB controller to detect and set the charger I/C for USB charging works well for devices that possess such capabilities. However, for low-cost products that do not contain a USB interface controller or do not have a requirement for data transfer, detecting the presence of a USB port versus a higher power wall adapter can be problematic. The AAT3685 can solve this dilemma with the addition of a simple external circuit using just two resistors and a general purpose NPN bi-polar transistor. For additional information about the AAT3685, refer to the device Data Sheet, document #201888. USB Port vs Adapter Power Selection Using USB Port ID The AAT3685 circuit shown in Figure 1 has the battery charge current programmed by two set resistors, RSETH and RSETL. The constant charge current is selected by the system microcontroller using the AAT3685 PWRSET function. The USB control is programmed so that when no host USB ID is detected, the system defaults to the high battery charge current level set by RSETH, which may be as high as 1 A. When a USB ID is detected from a USB host, the system selects the lower charge current set by RSETL. Typically, RSETL is programmed for a 500 ma charge rate. If the detected USB port is incapable of supplying 500 ma because of other system load demands or due to a fault with the port, the AAT3685 charge reduction function automatically reduces the battery charge current level to prevent the USB port from shutting down. The AAT3685 Data Sheet provides a more detailed description of the automatic charge reduction function. Solution for Low-Cost Systems With No USB Controller The solution shown in Figure 1 is the obvious choice when a device has the full capabilities provided by an integrated USB controller and system microprocessor. However, many low-cost devices that do not use a USB controller do not have the benefit of integrated hardware and firmware battery charger control. A simple circuit can be implemented to control the AAT3685 PWRSEL function to toggle the appropriate charge current level depending upon the type of power source connected to the device. To solve the USB port versus wall adapter power dilemma, the USB port, itself, provides a simple solution. The USB Specification (Rev 2.0) mandates the D+ and D data lines to be terminated with a 15 kω ± 5% impedance. This data bus termination impedance is valid for both low-speed and fullspeed devices. Refer to the USB Specification, Rev 2.0, Chapter 7, Section 7.1.5.1, for additional information regarding USB port source and termination impedance. See Figures 2 and 3 for USB port data bus terminations as defined in the USB Rev. 2.0 specification. If a wall adapter that uses a USB connector to provide power to a portable product leaves the D+/D data pins open or not connected, there is an easy way to differentiate between a wall adapter and a real USB port that share the same input connection to the device. The USB port will possess a 15 kω impedance to ground on both the D+ and D pins, where the wall adapter will exhibit an infinite impedance to ground. Refer to Figures 4 and 5 to see the simplified equivalents between a wall adapter and an actual USB port. 202742A Skyworks Proprietary Information Products and Product Information are Subject to Change Without Notice March 19, 2013 1
Figure 1. AAT3685 with USB ID Controlled Charge Current Figure 2. Full-Speed Device Cable and Resistor Connections Figure 3. Low-Speed Device Cable and Resistor Connections 2 March 19, 2013 Skyworks Proprietary Information Products and Product Information are Subject to Change Without Notice 202742A
Figure 4. Wall Adapter Equivalent Circuit Figure 5. Equivalent DC Circuit of a USB Port Application Circuit for Automatic Power Source Detection For simple low-cost products that do not have the luxury of USB port control functions, a simple discrete circuit can be used in place of a microcontroller to affect power source detection and selection of the appropriate battery charge current level. Figure 6 shows the complete AAT3685 application circuit with the automatic power source detection. All that is required for the typical AAT3685 application circuit is the addition of two resistors and a low-cost NPN bi-polar transistor. A common 2N2222A or equivalent device is sufficient. Figures 7 and 8 show the equivalent circuits for both wall adapter and USB port power operation. When a wall adapter is applied to the device input connector, the SETH resistor is selected and the AAT3685 charges the applied battery at this preset high level, which may be programmed up to 1 A. Figure 8 depicts a USB port power source connected to the device input. The internal 15 kω impedance on the D+ data line pulls the base of the NPN transistor low and, in effect, pulls the PWRSEL pin on the AAT3685 low. The AAT3685 then sets the battery charge current to a lower charge current as programmed by SETL. This lower charge current for USB charging is typically set to 500 ma. Since the AAT3685 provides an automatic charge reduction feature, the system designer does not need to worry about the capabilities of any given USB port. If the port in question cannot source a full 500 ma for any reason, the automatic charge reduction function reduces the battery charge current to the level necessary to maintain a USB port voltage for valid operation. Conclusion By adding three low-cost discrete components to the AAT3685 application circuit, a simple automatic power detection system can be implemented for cost-sensitive portable products that do not use complex USB data controllers. Besides automatic power source detection, the AAT3685 provides fault-free operation with a wide variety of host USB ports and always charges a Li-ion/poly battery with the greatest constant charge current for a given situation. Collectively, with USB port power functions and the ability to accept power from a high current wall adapter, battery charging times are reduced to the minimum possible for any given power source. 202742A Skyworks Proprietary Information Products and Product Information are Subject to Change Without Notice March 19, 2013 3
Figure 6. Complete AAT3685 USB/ADP Source Supply Auto-Detect Circuit Figure 7. AAT3685 Power Detection Circuit; Wall Adapter Power Detection, Charge Current Set to RSETH High Level Figure 8. AAT3685 Power Detection Circuit; USB Port Detection, Charge Current Set to RSETL Low Level 4 March 19, 2013 Skyworks Proprietary Information Products and Product Information are Subject to Change Without Notice 202742A
Copyright 2006-2012, 2013 Skyworks Solutions, Inc. All Rights Reserved. Information in this document is provided in connection with Skyworks Solutions, Inc. ( Skyworks ) products or services. These materials, including the information contained herein, are provided by Skyworks as a service to its customers and may be used for informational purposes only by the customer. Skyworks assumes no responsibility for errors or omissions in these materials or the information contained herein. Skyworks may change its documentation, products, services, specifications or product descriptions at any time, without notice. Skyworks makes no commitment to update the materials or information and shall have no responsibility whatsoever for conflicts, incompatibilities, or other difficulties arising from any future changes. No license, whether express, implied, by estoppel or otherwise, is granted to any intellectual property rights by this document. Skyworks assumes no liability for any materials, products or information provided hereunder, including the sale, distribution, reproduction or use of Skyworks products, information or materials, except as may be provided in Skyworks Terms and Conditions of Sale. THE MATERIALS, PRODUCTS AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, INCLUDING FITNESS FOR A PARTICULAR PURPOSE OR USE, MERCHANTABILITY, PERFORMANCE, QUALITY OR NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHT; ALL SUCH WARRANTIES ARE HEREBY EXPRESSLY DISCLAIMED. SKYWORKS DOES NOT WARRANT THE ACCURACY OR COMPLETENESS OF THE INFORMATION, TEXT, GRAPHICS OR OTHER ITEMS CONTAINED WITHIN THESE MATERIALS. SKYWORKS SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO ANY SPECIAL, INDIRECT, INCIDENTAL, STATUTORY, OR CONSEQUENTIAL DAMAGES, INCLUDING WITHOUT LIMITATION, LOST REVENUES OR LOST PROFITS THAT MAY RESULT FROM THE USE OF THE MATERIALS OR INFORMATION, WHETHER OR NOT THE RECIPIENT OF MATERIALS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Skyworks products are not intended for use in medical, lifesaving or life-sustaining applications, or other equipment in which the failure of the Skyworks products could lead to personal injury, death, physical or environmental damage. Skyworks customers using or selling Skyworks products for use in such applications do so at their own risk and agree to fully indemnify Skyworks for any damages resulting from such improper use or sale. Customers are responsible for their products and applications using Skyworks products, which may deviate from published specifications as a result of design defects, errors, or operation of products outside of published parameters or design specifications. Customers should include design and operating safeguards to minimize these and other risks. Skyworks assumes no liability for applications assistance, customer product design, or damage to any equipment resulting from the use of Skyworks products outside of stated published specifications or parameters. Skyworks, the Skyworks symbol, and Breakthrough Simplicity are trademarks or registered trademarks of Skyworks Solutions, Inc., in the United States and other countries. Third-party brands and names are for identification purposes only, and are the property of their respective owners. Additional information, including relevant terms and conditions, posted at www.skyworksinc.com, are incorporated by reference. 202742A Skyworks Proprietary Information Products and Product Information are Subject to Change Without Notice March 19, 2013 5