This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Method of powering a device via USB

Other Parts Discussed in Thread: BQ24180, BQ24050

I'm working on a battery powered device with embedded USB. The device has a Li+ battery charger, and I wish to both power the device and charge the battery when it's plugged into a powered USB port on a computer. My understanding is that I can draw up to 500mA of current in this way (assuming its not a hub).

I'd also like the option of powering this device from an AC power adapter with a mini usb plug on one end (commonly seen on cell phone wall adapters). When powering the device from a wall adapter I could potentially draw much more current to more quickly charge the battery.

My question is: If there's only one USB interface on my device, how can I determine if it's plugged into a wall adapter or a computer? And then make a determination on how much current I can draw? The wall adapter I imagine is a dumb device, and unable to report its current capabilities.

I know many battery charger IC's have a power path capable of switching between two seperate power interfaces: A DC wall adapter input and a seperate USB plug. I'd rather not have two seperate power interfaces though. Just the one mini USB plug.

Thanks for your suggestions.

  • If you have a microcontroller in your system, such as the MSP430, then this is usually done by simply looking at the D+/D- lines on the USB.  Since you're using the same plug for both sources, the adaptor USB plug could be configured in hardware to short D+/D-.  A uC could detect this and make that call for you.  The bq24150 and bq24180 are switching chargers that can run off USB and an adaptor.

    If you don't have a uC, then the bq24050 does what you need I believe.  It will automatically detect what is plugged in and base its charging current based on that determination.