I bought this USB battery hoping to use it as a uninterruptible power supply for a Raspberry Pi 2.

I researched it, and users said it could be charged while also powering devices...just what a UPS should do. However, when I tested it, I found a big problem. Even when the battery is fully charged, when I plug or unplug the input cable to the battery, there's a brief voltage drop on the output plugs that causes the Raspberry Pi to reboot.

Is there an easy way I can fix this? I've pried off the housing, and it's three of these cells wired in parallel onto a fairly large and complicated-looking control board.

Would soldering a large capacitor onto the VCC/Gnd pins of the battery's output plugs work? Or should I attach a capacitor the the RPi's power input pins? Or would I be wasting my time?

How would I measure the length of the voltage/current drop, so I'd know what size of capacitor to use? I tried measuring the DC signal with my DSO (DS202), but I could figure out how to detect the length of the drop.

Edit: Using an Arduino to measure Vcc with an ADC pin, I found unplugging it causes a 1-3 second brownout, while plugging it in causes a 1-3 millisecond brownout. I was able to fix the plugging-in brownout by placed a 4700uF capacitor across the Vcc/Gnd pins of the output USB jack. However, the unplugging-brownout time is too large to fix even with a supercapacitor. What other options do I have?

I also think I found a fault in the control circuit. When the pack is unplugged and running solely on the battery cells, the output voltage is 5V. However, when it's plugged in, even when fully charged, the output voltage is 4.7V.

Edit: It seems the plug-in-brownout was in part due to a bad external USB power supply and cable. I was using one of those cheap small cube wall adapters with USB jacks in them, with a long USB cable. It says it's rated for [email protected], but the voltage was measuring between 4.5-4.7V. When I replace it with a USB single-piece wallwart, the voltage measured 5V.

So now the only remaining problem is the 1-3 second brownout when the external power is removed, likely caused by the controller slowly switching circuits to the internal battery. How can I fix this?

  • 2
    \$\begingroup\$ For the DSO question: set the trigger slightly (say 0.5V) below the normal DC voltage and set the scope to oneshot mode (opposite of "run"). That should give you the leading edge of the drop pulse. Adjust timebase and retry until whole pulse is on screen. Then either measure it by hand or use the DSO "measure" feature. \$\endgroup\$
    – pjc50
    Aug 5, 2015 at 13:52
  • \$\begingroup\$ It's been a while since the last post was published and I just happened to be here out of curiosity. "The easiest fix" caught my eyes. From the OP I got the impression that when Vin is removed from the main, Vout from the powerbank takes a short while (1~3) seconds before coming to play. If I got that right, how would that "easiest fix" solve the brown out period, since neither D1 nor D2 is bringing juice to C1 during that time period. Please enlighten. \$\endgroup\$
    – visitor
    Feb 12, 2018 at 10:34

2 Answers 2


Most battery packs now uses a "line interactive" or "offline" design so there is an interrupt when you switch the input power. You can shop around and try to find one with "online" design (that is, the battery pack have the cells, output of the charger and input of the boost converter all paralleled together without switching elements in the middle)

  • \$\begingroup\$ Unfortunately, I can't find a single one that advertises this feature. It was hard enough finding ones that advertise the ability to charge both the battery and load simultaneously. \$\endgroup\$
    – Cerin
    Sep 14, 2015 at 12:13
  • \$\begingroup\$ @Cerin Then you maybe have to roll your own. \$\endgroup\$ Sep 14, 2015 at 12:34

"The easiest fix":


simulate this circuit – Schematic created using CircuitLab

An MBRA340 will "cost" you about 0.36V at 1A forward voltage. That should be fine for Arduino modules running on 5VDC. When the 5V Vin drops below the 5V vout of the pack, the Diodes will make sure the current flow switches over instantaneously.

The optional capacitor is for some smoothing to compensate for all the extra wiring you will be adding, but won't really make much of a difference towards the working of the diodes themselves (in this scale of operation). If you add it I'd say keep its value between 10uF and 220uF, super large caps may present a switch-on burden in some cases and they wouldn't be immensely useful anyway.

An option for close-to-no-voltage-drop would be fiddling around with MOSFETs to replace the diodes, but that a couple of steps further in theory, so to avoid confusion I won't add any of that here. Especially since Schottky Diodes with a drop of 0.2V to 0.4V at 1A are readily available and should work just fine.

About the DSO, pjc50 answered that perfectly in the comment, to offer answer-completeness, I will quote verbatim;

For the DSO question: set the trigger slightly (say 0.5V) below the normal DC voltage and set the scope to oneshot mode (opposite of "run"). That should give you the leading edge of the drop pulse. Adjust timebase and retry until whole pulse is on screen. Then either measure it by hand or use the DSO "measure" feature. – pjc50

With the small note, that to trigger on a switch-over event with the diodes in place, you can attach the scope on the "Main 5V" line and that should drop to (near) 0V, so it should offer plenty triggering.

  • 1
    \$\begingroup\$ I see that this would work, but right now, there's just one USB cable running from my battery pack to my RPi. To apply your circuit to my RPi would require creating a complicated USB harness to sit between the incoming USB power, battery pack and RPi. I opted for a USB battery pack over a simple Lipo battery to avoid that wiring nightmare. Why wouldn't a capacitor across Vout and Gnd work? \$\endgroup\$
    – Cerin
    Aug 5, 2015 at 15:02
  • \$\begingroup\$ I think the issue is due to the internal charge and switch circuitry of the battery pack. This wouldn't actually do anything different. Except for maybe the capacitor. \$\endgroup\$
    – Passerby
    Aug 5, 2015 at 15:10
  • \$\begingroup\$ @Passerby Fair dues. I was not really paying attention as it turns out. Drowned in the land of 4D maths today >.<. I'll have to mod my answer when I'm back home. \$\endgroup\$
    – Asmyldof
    Aug 5, 2015 at 17:27
  • \$\begingroup\$ @Asmyldof, Alternatively, could I just use a diode to short the 5V input to the 5V output inside the battery pack? That would be similar to your circuit, but would remove C1 and would replace D2 with a wire. \$\endgroup\$
    – Cerin
    Aug 5, 2015 at 17:53
  • 1
    \$\begingroup\$ @Cerin If you want a no-mess solution, then you need to buy a product dedicated to your needs. Trying to hack one product (a powerbank) into something else (UPS) is the definition of "mess". \$\endgroup\$
    – Agent_L
    Sep 6, 2017 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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