More uninterruptible supplies

UPSOk, here’s another one for you – this time a DIRT cheap UPS (that’s my theme for this week it seems – CHEAP) – but with the caveat that MAXIMUM draw is 1 amp.

Now – you may think that isn’t enough for a Raspberry Pi or whatever but headless with no ports – should be no problem I am told.

So – a little while ago I bought a  variety of little USB charger PCBs and one of the least expensive at £2.40 was this one from Banggood. Others I tested have an on-off button which has to be pressed for the output to come on – OR they won’t work when charging – or BOTH – so they’re all sitting in the bin despite one having a very nice blue LCD display.

But THIS one WORKS – you can run something on the large USB connector – while CHARGING the battery (a single 3v6 Lithium battery) – and any combination – i.e. you can plug the charger in and out and the output remains constant.

production lineSo – if your requirement is for under an AMP – you might want to get a Lithium battery and one of these.  For batteries I have a boatload of these as you see in the picture on the left, from an old laptop battery – turned out when I dismantled it that ONE cell had failed and the rest were spot-on – I put them on a shelf for the day they may prove useful.  Typically they are 3v6-4v2 at maybe 4.2Ah (I have some Ultrafire batteries of that capacity)

So taking step-up efficiencies into account, if you’re looking at a fully charged battery and a gadget using half an amp, you could be looking at keeping it running for maybe 6 hours with one of these? Not bad for under £3 + battery. You COULD connect more than one battery in parallel to increase capacity – and the advert even claims that – I’ll leave that to you as I’m not an expert on parallel Lithium batteries but it seems to me that to do that they should be pretty much matched.

The unit has two surface-mounted LED lights (could also be brought out as standard LEDs to a front panel) – red for charging – blue for load.

To put this to the test: I took a flat Lithium battery that had been sitting in a drawer for months – soldered it to the charger unit and plugged in a fully laden FriendlyArm NanoPiM1 complete with HDMI, wireless keyboard and mouse – this is WAY more than anything I’d considered but good for the ultimate test.

The M1 lasted about 10 seconds before the battery gave up.  That’s pretty much what I’d expected as the battery was flat – what was to come next would be critical.

I plugged in a decent USB supply to the smaller charger unit. The red charge light came on. No output. About 20 seconds later – the blue light came on, the output fired up and the M1 powered up without issue.

As the battery was charging – the M1 was doing just fine. The charger unit was running HOT – but then that’s what I’d expect – it was having to power far more than I would normally give it AND charge up a totally flat Lithium battery. Not exactly a typical situation. But it was coping. Just to push my luck – I was intermittently pulling out the charger lead and the M1 continued to run rock-steadily. 6 hours later both lights were on but temperatures were now down to “pretty warm” with the battery at “just warm” with the battery sitting at 4.17v. I disconnected the mains charger at which point the battery voltage dropped to 4.11v.

I finished off this blog article and checked my mail, a process which took maybe 15 minutes at the end of which the battery was just fine sitting at 4.06v.  Later this morning I took the charger off momentarily and then forgot out about it – went off to do some painting – 2 hours later the battery was still at 3.8v and the NanoP1-M1 was happily sitting there.

Overnight I left the M1 on the unit, on charge and the charge light has still not turned to green which is interesting – yet the tests show that the battery IS very much being charged. I guess the load must be pulling the voltage to just below the point where the charger considers this a full charge. During the evening last night I disconnected the mouse, keyboard and hdmi lead. This morning, the battery is cool, the charger is cool, all is well with the M1 and the battery voltage is sitting at 4.18v

Which is more than can be said for the blog which apparently came to a halt last night due to the number of people looking in!!! All fixed now thanks to a prompt response from the service provider.

I’m impressed  – I have three of these units, but now I see how useful they are, I can see more of them on the way.

Update April 2017: With a really flat battery, plugging in a Raspberry Pi 2 and power, the RED light on the unit activates- but sadly the battery does not appear to charge and the Pi does not come on. If the Pi is disconnected, the battery voltage immediately starts to rise. If the PI is then reconnected, the Pi works and the battery continues to charge.  Sadly, at a stroke, this makes the unit useless in the event that the battery becomes completely flat.

Update September 11 2017:  A picture is emerging here of manufacturers having to content with existing chips – the lower priced ones having severe limitations. Aidan and I have been discussing the subject.

The REASON we have problems with a lot of these designs is becoming clear.  Let’s say we need 1 amp – plenty of cheap voltage boost chips out there that will do the job. On the charging side, the most popular chip can charge at half an amp – and therein lies the problem.

Take a board like the one I’ve described – fully charged battery. Runs perfectly as the charger is not having to deliver much. On the other hand starting with a FLAT battery , we are expecting the charger not only to deliver a heavy current to the battery – but ALSO the full 1 amp to the unit it is powering – not going to happen. Now – you COULD say – what about simply using the input power supply, to power the load directly when there is mains power – and that’s the OBVIOUS question. DIODES is why. At heavy current even a schottky diode loses up to half a volt and you have to OR the two outputs together with diodes. So that’s no good.

So how about – using diodes to OR the battery and the input power supply to the boost converter?  That’s a BETTER idea but flawed… as that also lowers the potential voltage going to the boost convertor and these chips are not that good at delivering power when the incoming voltage is below 3v (battery minus diode drop).

Another way would be TWO boost convertors – chucking out 5.5v or so – dioded together to provide power – one gets power from the battery – the other from the incoming supply.  This one has merit and the likes of the MT3608 are cheap and at the output end, voltage loss is not a problem as you can simply compensate. When I say cheap – I mean REALLY cheap. Current thoughts are that one output would be maybe 0.1v or so higher than the other so that while there is mains power, the battery side is supplying nothing. As soon as power fails, the battery side takes over.  This would work without any controller as the chips handle over charge and over discharge protection but I still fancy a 328 in there to warn any Pi or similar computer that a power outage is on the way.

Similarly the inexpensive charging circuits are often seen in parallel and again you could increase the charging rate that way though there is a limit to how fast you should charge 18650 batteries…

Here is some interesting reading on the subject..

and more

If cost is not an issue, there’s a boost chip called the TPS61030 series (TPS61031) and this one is able to throw out over 2.5 amps with a 3volt input. At at 2.6volts it can STILL output over 2amps – it is however a lot more expensive than other alternatives and from a small production standpoint the chip packaging isn’t ideal.

So looking ahead I plan to play with the two-boost option – but right now a couple of Orange Pis just turned up for me to play with – priorities.


33 thoughts on “More uninterruptible supplies

    1. Yes I’m not sure but I think that’s one of the ones I tried…. to no avail.. again – requirements are – simultaneous charge and discharge, auto disconnect – and auto reconnect – and no rebooting when the power is removed or put back in – not many survive those tests!!

      In the ad it tells you that the pi will be instructed to do a clean shut down – GOOD… but will the board power up again when the battery has had some charge in it.. without attendance? Someone else’s turn to find out expensively whether or not this works.

      Right now, Aidan and I are set on an idea – two output units ORe’d together with diodes, each outputting 5.8v to be dropped (not worth using Schottky as you can get 5.8v no problem from the MT3608 units) – one gets power from 5v, the other gets power from the battery which is being charged by a separate charge chip which now of course does not need to be able to supply the output current….. it would not surprise me if Aidan is working on a board right now.

      1. Quite admitedly, test is the sole judge.
        Now, the supplier clearly states
        a-“When external power is removed it will keep your Raspberry Pi running for a programmable number of minutes or until the battery runs out, and then perform a clean shutdown. The system can also be configured to automatically boot the Raspberry Pi whenever enough battery power is available or when the external power is restored, making it a true UPS solution.”.
        b-” In addition the Raspberry Pi can be automatically booted when USB power is provided. ”

        Which seems to answer your requirements.

        That said, what really interested me is the integrated mcu that can shutdown and back on the raspberry on a time based functionnality plus the multi power sources (solar panel written somewhere)..

        Anyway, I’ll try it sometimes later.

        And finnally, it’s open source and describe/discused here

        Note, I have no link with this company…

  1. I was in Leroy Merlin in Spain the other week and picked-up one of these:
    They were on offer at the time, just under 4 euros each.
    Only 2000mah and 1A maximum output (and a specified 0.8A maximum input, but it seems to draw 1A according to my USB power meter), but I’ve been trying it with my Raspberry Pi 2B and it works well. It keeps the Pi running for around 5.5 hours and restarts automatically when the power is restored, even if the battery is totally flat. It recharges the battery whilst the Pi is being powered and there are no buttons to press to switch-on the output.
    The only drawback is that the input and output sockets are quite close together, so you have to choose your USB leads carefully.

    1. This sounds quite promising, especially considering the low price. I’d be interested to see how you get on longer term as I just remember me thinking the Tomo devices were up to the job but it didn’t take too long to find out otherwise – that said, I’m still using both of mine as they’re still better than running without any power cut protection at all.

      Please keep us updated!

    2. Well thank you for that Peter, that’s just the kind of solid information we need.

      Aidan and I have been looking into chipsets and discussing the subject over the weekend with a view to doing a little board.

      Later this morning I’ll have updated the blog with some ideas and thoughts – meantime thanks again – not doubt they’ll be getting a few more sales.

  2. I just received one of these DIY 2-cell PowerBank kits and tested with my A5 V11 Mini Router. It can supply power while charging. I have unplugged-replugged power source several times and the router did not reset even once. It is cheaper than this board (i also bought three of these) and also has an enclosure, charge status lights and a flaslight (in case you need to put it in a dark place) 😛

    1. They look good but despite the 1.5 amp output they can only handle 1 amp input so that limits the maximum current. If only they could both load and output 1.5amps – still might be useful to some – thanks for the info.

  3. Great board, i am using the same board with two 3000 mAh li-lion batteries for my wifi router backup from 4 months, Which works awesome and useful in india where power cuts more. also made a portable charger which is also useful for travel.

      1. Yes i connected two 3000 mAh mobile battery packs in parallel. in actual each 3000 mAh li-ion battery pack has two 1500 mAh batteries in parallel with battery protection circuit.

        So in total it will be four 1500 mAh batteries connected in parallel with this board.

  4. I have a few of these but one thing I haven’t been able to figure out is how to make them turn “on” when only battery and load connected. The only way to make it kick is to connect a power input. Once I do that, I can remove that power input and it continues to power the load from the battery. Have you had any success with this?

    1. Now I’m confused, Conor. The ones I have come on without power. As soon as you plug the load in they are working unless of course the battery is completely flat. You don’t have to connect a power input. Plug in a phone or a board – and the blue light comes on and they provide power. Tested all three. You must have some variation.

        1. Oh dear – can you see any difference at all between the picture of mine and your own units?

    1. OI had one of those and threw it away… groan.

      An update on the little charger unit – I left my M1 running for well over an hour with no external power….I’m not 100% sure about this but I noted the Debian screen had no icons on it..turned it off and on and all was fine – I can’t pinpoint what the cause was – possible the voltage went low? I’ll need to check that – but again – the unit is taking more than I would expect of a headless installation so at this point I’m not treating it as an issue. The bench is also a mess which might not have helped.

      1. Regarding quality of “case” UPSes – u r right, it’s a lottery, but i had nice experience.
        And for the issue with debian/no icons – probably not enough current. For example, I have a psu, which corrupts microSD on shutdown from time to time, but well it marked “5v 2a”, but I bet – there is NO 2 A here at all =).

        Get a “usb doctor” – small device with lcd screen, which is plugged between actual device and powersource. It will show you real picture. If voltage drops below 4.5v (10% of 5v) – this is a root cause.

        1. Yes you are right – got one of those doctors – good advice… all working fine incidentally.

      2. Update – removed power and left for another half hour – nothing to do with the PSU. Ignore previous concern

  5. On the banana Pi we can connect a lithium battery for run it and the chip on banana recharge the battery when it’s connected to usb so we don’t need such module, the AXP288 on M2+ and TC boards can normaly do that, Here they say it can support 2.8A with a usb 3.0 compatible charger so maybe a 1 or 2 A with the standard micro usb port. Have you found something for connect a battery ? I see only a rtc battery connector, maybe 2 gpio pins can be the connector but i didn’t find documentation about the power management :/

    Be careful about the Li-ion ultrafire they are most of the times recycled fake batteries, the best li-ion 18650 atm does 3,6Ah max, the NCR18650B batteries are really good for such application and they are cheapest than the li-po ( 13,29 for 4 batteries

    1. Hey thanks for that info Martin – much appreciated. The link to batteries has free shipping even to Spain and the pricing looks good.

      1. Yes it’s a good deal and it’s not a fake reduction, normaly they are around 15$-16$. Your modules are surly power banks modules and the parallel connection are really simple:
        Just charge each cell individually before connecte them in parallel and because they are used cells they can have different capacity, i use the Imax B6 for test it(i saved all my dead cells with this charger) but we can find also many 18650 charger/ tester on aliexpress and ebay.
        The 18650 li-ion are stronger than the Li-po and there is a lot of things about danger of unbalenced cells but from what I’ve read they are exaggerated(but maybe true for the first 18650 cells or fake chineses cells). This man made a video about it and explain why he doesn’t balence the cells:

        1. Thanks for that Martin – just off to the pub (half a mile down a steep hill) and I’ll look at the video later.. thanks for the info – the more the merrier – understanding how these things work is helpful. So what you’re saying is a one-off full charge – then solder 2 together and to the charger. I have to say up to now I’m well impressed even though the board does get warm. I think I may well put all my small processor boards on these – the mains in Spain is mainly rubbish (to paraphrase – I’m sure I could have done better), at least out here in Galera it is so these little devils are a life-saver.

          1. Yes but use the cells with the closest charge/discharge time (if you don’t have a li-po/ li-ion tester)because on the old laptop batteries, the cells have all differents capacity.
            I bought diffrents li-po batteries on aliexpress and they gave alsmost everytime one of these power bank chargers with the batteries(idk why) so i’ve many differents models and they all work with 1x +/- connectors, so i think there is no danger to solder 2 or 3 or 4 etc in parrallel it’s just when they are in series it’s better to use a BMS.
            I’ve the same temperature problem for my boosts(they are connected to 3-4v solar panels for produce 5v/5.5v, i think the problem is the current is too high for these small devices so i use two 5v boost in parallel and it’s surly possible to use a biggest module like this one: (,searchweb201602_4_10037_10017_507_10032,searchweb201603_11&btsid=0c3a86e1-599b-4445-bcc7-2db002ad8f7e) The problem is i’m not at 100% we can charge the batterie and at the same time power the M1.
            But the last year i made an antonmous Esp8266 powered with a solar panel and i used a TP4056 to charge the battery and at the same time power the Esp8266 and it worked. It’s a 1A max module, but it’s also possible to mount 3 in parrallel for distribut the current among the modules. I found a really cheap lot here:

          2. The Tp4056 is a bad idea because i juste remembered i added to the tp4056 output a 5v step up module that mean even more modules…

          3. Or it’s possible to connect the output of 2 Tp4056(so for 2×18650 or 4) in series for do 7,4v and use a buck module like the Lm2596(in aliexpress they cost around 0,69$) to have 5v, for a really cheap cost, around 1,5$ and it’s a powerful module(2A technically)with a protection for each cell but the negative point is we have to build it.

Comments are closed.