Say you had a device that requires 5VDC to operate. It can actually run safely at about 4.8VDC. It normally runs off of USB power but I would like to rig it up to run off of a battery. Would it be possible to design a circuit that would allow the device to run and charge the battery when connected to a usb port and then when unplugged, run off battery power?


Yes, this is possible, however from a USB 2.0 port, you can actually only draw 100mA without requesting extra power from the host. In order to actually get up to the 500mA limit you have to inform the host that you need the extra power during the USB enumeration. See this post:

How to get more than 100mA from a USB port


It would be possible if the device which is the load consumes less current than the total current supplied from the USB port. So lets taken an example. A regular powered USB 2.0 port can deliver a maximum of 500mA at 5V to your device. If the device itself draws a total of 170 mA then there is a reserve capacity of:

500 - 170 = 330mA

This 330mA would be available for use to charge the battery minus any current that would be consumed by extra circuitry used to manage the battery charger and the battery usage mode selector.

  • 2
    \$\begingroup\$ A USB 2.0 port can deliver up to 500mA, USB 3.0 up to 900mA (this is not including dedicated charging ports which can source up to 1.5A) \$\endgroup\$ – Oli Glaser Sep 12 '12 at 22:59
  • \$\begingroup\$ @Oli Glaser - Thanks for the heads up on the 500mA for a regular USB2.0 port. I'll edit the answer to reflect that. \$\endgroup\$ – Michael Karas Sep 13 '12 at 0:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.