0
\$\begingroup\$

I am trying to use usb battery bank as a backup power source for my diy project.

Project is using arduino to control transistors and to turn few devices (like pumps and lights) on and off. Power source is 12v 3a adapter.

I would like to have usb with battery connected always and if possible to charge it when main power is available.

Controller must know when main power is not available that it is running on battery.

This schematic is based on answer of Automatic Power Selection Circuit

schematic

simulate this circuit – Schematic created using CircuitLab

N Mosfet is added to detect if main power is not available.

Will battery charge if I remove D2 diode? If not how could I get charging to work?

Is there anything wrong with this circuit or is there better way to do this?

Update:

I added voltage regulator from 12v and diode to 5v. Is there something else required for battery charging? Battery is standard 2200ma usb battery pack for phones.

\$\endgroup\$
  • 2
    \$\begingroup\$ Do you believe that a USB power bank expects to have 12V connected to its output? \$\endgroup\$ – Ignacio Vazquez-Abrams Aug 29 '16 at 21:55
0
\$\begingroup\$

I think it depends on the USB battery pack. I have never seen one that can take 12V for charging but they might be out there.

If your pack only takes 5V then you will need to replace the D2 diode with something like a voltage regulator that has the appropriate current blocking directions.

\$\endgroup\$
  • \$\begingroup\$ That was mistake, I will use standard usb battery pack for mobile phones. I will look into voltage regulator with current blocking direction. Thanks \$\endgroup\$ – Bobi Aug 29 '16 at 22:20
  • \$\begingroup\$ Your latest schematic edit looks good to me with the exception that the diode drop would prevent the battery from fully charging (or charging at all depending on the charger IC in the pack) \$\endgroup\$ – Daniel V Aug 29 '16 at 22:24
  • \$\begingroup\$ Can I fix this by selecting higher voltage regulator and select diode to drop voltage to 5v? \$\endgroup\$ – Bobi Aug 29 '16 at 23:00
  • \$\begingroup\$ In theory yes, but the diode drop is temperature dependent and hard to control in general. If your battery pack accepts 5V +/- some generous tolerance it might work. I would give it a try \$\endgroup\$ – Daniel V Aug 29 '16 at 23:10
  • \$\begingroup\$ I checked in store battery pack doesn't have any other information other than that it is usb and 1000ma max charge. \$\endgroup\$ – Bobi Sep 2 '16 at 7:52
0
\$\begingroup\$

I would suggest a PowerPath circuit topology. You could easily find many ICs for that job.

Linear Technology has very affordable solutions. The most cheap common is the LTC4412, a tiny PowerPath controller. In page 10, Figure 2 and 3 show some solutions that might fit your demands.

Consider the "WALL ADAPTER INPUT" as your main 5V input. If you want always 5V output from a rechargeable battery even when the main 5V power is absence, just put a DC to DC step-up converter after the battery charger and before the Primary mosfet.

\$\endgroup\$
-1
\$\begingroup\$

if you are sure 5V can power up your circuit the the below text can help you if you remove D2 ,12V power source directly connect to 5V battery and it is very dangerous. you should charge battery with 5V, a simple way i can offer to you is use from 7805 linear regulator with this circuit

schematic

simulate this circuit – Schematic created using CircuitLab

and better way is use switching Dc/Dc converter with enable pin and monitor battery voltage with one ADC for power down the system when battery voltage came down in discharge and disable converter when battery arrived to 5V in charge processes.

\$\endgroup\$
  • \$\begingroup\$ sorry,Input and output of regulator are connected wrong \$\endgroup\$ – M Fallahi Aug 30 '16 at 0:04
  • 3
    \$\begingroup\$ Please edit your response, then. You should also edit your answer to use proper capitalization and punctuation to make your text more readable. \$\endgroup\$ – user2943160 Aug 30 '16 at 0:47

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.