Pi-Zero-UpTime is an UPS for Raspberry Pi Boards and Clones

Since for a headless Raspberry Pi it makes no sense to use a large UPS (Uninterruptible Power Supply) to keep it running in case of power failure,  I bought and tested a Raspberry Pi battery kit a couple of years ago. The kit included an acrylic case,  a battery charging board, and LiPo battery and it worked most of the time as a UPS. “Most of the time” means the switch from mains to battery would not occur fast enough maybe 10% of the time (it depends on the load), so the Raspberry Pi board would reboot.

The kit also did not include a GPIO / I2C interface to report the charge level of the battery, so you would not be able to safely power the board when the battery is almost fully depleted. In recent years, it’s become more and more difficult to get batteries shipped from overseas, so a design based on standard batteries like rechargeable 18650 batteries may be preferable, since you can easily purchase them locally.

There are several UPS solutions for the Raspberry Pi on the market, but the latest Pi-Zero-UpTime UPS boardfrom Alchemy Power looks particularly interesting since it comes in Raspberry Pi Zero size, relies on a standard 14500 Li-Ion battery, reports when battery level is low via GPIO 26, and works with an Raspberry Pi boards with a 40-pin header, as well as “clones” like Tinker Board, ROCK64, ODROID-C2, and others.

Pi-Zero-UpTime Raspberry Pi UPS Board
Click to Enlarge

Key features of Pi-Zero-UpTime (aka PiZ-UpTime):

  • Works with Raspberry Pi Zero, Pi Zero W, and other 40-pin boards
  • Battery Support
    • Works with Lithium Ion 14500 (AA size) rechargeable battery
    • Recommended battery capacity – 700 mAh to 2,000 mAh
    • Includes battery management (BMS)
    • Safety
      • On-board circuitry prevent over charging, deep discharging.
      • Temperature monitor checks temperature
      • Hard shutdown when battery runs dangerously low, protecting the battery.
  • UPS – 5V out via 40-pin header or via micro USB for Pi-Zero without the header.
  • Misc
    • Reset switch for rebooting the Pi, or an external reset switch can be connected
    • GPIO 26 used to report low battery voltage.
    • Status LEDs, which can be turned off to save power
  • Dimensions – 65mm x 30mm x 18mm
  • Weight – About 20 grams, for reference the battery adds around 30 grams

Some Python code is provided to automatically shut down the Raspberry Pi when the battery is low. For reference, a 1,200 mAh battery lasts around one hour with the Raspberry Pi 3 connected to USB mouse and keyboard, monitor, and with WiFi and Bluetooth on.

Raspberry Pi Zero UPS / Raspberry Pi UPS
UPS Connected to Raspberry Pi Zero (left), and Raspberry Pi 3 (right) – Click to Enlarge

I first found PiZ-UpTime UPS board on Tindie where it is sold for $29.99, but the Raspberry Pi UPS board is also sold on Amazon and eBay. If you need more battery the company also sells Pi-UpTimeUPS taking two 18650 batteries for around $50. More details can be found on Alchemy products page.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

34 Replies to “Pi-Zero-UpTime is an UPS for Raspberry Pi Boards and Clones”

  1. Quite expensive given that if an appropriate board is chosen (one based on a tablet SoC and a battery capable PMU) no such external UPS is needed at all. Attach a battery to suitable boards and you’re done.

    Also while it’s nice that at least this UPS allows monitoring for ‘running low on battery’ via a GPIO pin IMO this is not sufficient if you really care about the U in ‘UPS’. For uninterruptible operation you need to monitor the PSU feeding the whole setup since we all know those wall warts all die eventually.

    For small UPS backed servers we use Olimex A20-OLinuXino called ‘Lime2’. These boards are great for many reasons. One is that you really just need to plug in any battery from Olimex shop and get full UPS functionality, another is ‘native SATA’ (though a bit slow) and a connected SATA disk still operating when running on battery. Most if not all other A20 boards forget this important detail and when they run on battery the SATA disk is unpowered.

    Since the PMU allows monitoring of input voltage and actual current you always know whole consumption but also ‘health state’ of the PSU feeding your server. And last year we had to realize that in one location a PSU started to die since input voltage dropped from 5.15V to below 5V. Running a small stress test resulted in the PSU’s voltage dropping even more. Since we knew that the whole setup (board + connected 2.5″ HDD in standby state) runs 20 hours on battery we decided to let the PSU slowly die and monitor what’s happening: https://forum.armbian.com/topic/5699-how-to-provide-and-interpret-debug-output/?do=findComment&comment=44210

    Only when input voltage fell below 4.0V the Lime2 got in real trouble since not capable to recharge the battery any more so we finally had to replace the PSU after watching it dying for several months. Now that we know the treshold we adjusted monitoring: input voltage dropping below 4.8V triggers an SNMP alert and we can schedule PSU replacement (happened two times since then in other locations).

      1. Sure, if you’re clueless you better orientate yourself based on feelings than technology. Choosing something less reliable and more expensive is one of the obvious results.

        1. But then again, no other board has a usable Windows on ARM build (rpi3 and rpi3+ has) build, so there’s that.

          Or just dealing with the hassle that comes associated with chinese boards makes the rpi a better buy, even if more expensive.

          1. > chinese boards

            Like the Olimex board mentioned before? Those ‘Chinese’ boards made in the EU with plenty of displays and other peripherals that just work, excellent mainline kernel support and even available in industrial temperature range unlike the RPi toys? This ‘Chinese’ board for example: https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2/open-source-hardware ?

            Did I mention already that Olimex unlike RPi Trading fully follows Open Source Hardware principles, publishes everything and takes care that everyone out there can use their designs?

            ‘Windows on ARM’? I thought the only currently available ‘Always Connected PCs’ Windows on ARM runs on are all based on a powerful Snapdragon 845 SoC that is magnitudes faster than the slow A-53 cores those Raspberries are equipped with?

          2. While it might be made in EU, it’s SoC is still sourced from china by a chinese designer, so that alone can be a problem in some applications (last time i checked allwinner SoC still need some closed source code to boot up).

            And yes, there is a port of Windows on ARM for rpi boards (still in development stage). While A53 are not fast, it’s enough to run legacy x86 apps. Thats something no other ARM SBC can do and can be useful in some applications.

          3. > (last time i checked allwinner SoC still need some closed source code to boot up

            Exactly this is a huge problem. The closed source bootloader needs to be analyzed by security professionals, which makes the whole platform pretty expensive to invest on. One additional problem with Allwinner is that the closed source bootloader in burned on the ROM. It can’t be changed. For example Intel ME code can be overridden at boot time and RPi bootloader comes from the SD card. Besides there’s a free open source RPi bootloader in the works as we speak. Allwinner’s ROM solution prevents all kinds of open source bootloaders. Allwinner also requires U-Boot in a certain specific SD card sector while RPi supports higher level logical partitions, which makes it a lot easier to set up booting.

          4. Wow, so many ‘alternative facts’ in one place! Amazing! 😉

            Every processor has a primary bootloader built in (or how is it possible that RPi 3 and 3+ support netbooting without SD card?). That’s true for every ARM SoC and also for such hybrid thingies like those VideoCore SoCs with some ARM cores crappliy integrated that are on the Raspberries.

            > there’s a free open source RPi bootloader in the works as we speak

            This one? https://github.com/christinaa/rpi-open-firmware/issues/37#issuecomment-388551489

          5. > last time i checked allwinner SoC still need some closed source code to boot up

            Not true (only if you use very new SoCs and also rely on Allwinner’s BSP stuff but who wants that?)

            Allwinner SoCs with mainline u-boot support running either mainline Linux or *BSD do not need any closed source crap at all since linux-sunxi community reverse engineered DRAM initialization. Situation with most other ARM SoC vendors is totally different (there we always need BLOBs for DRAM initialization that also ‘enable’ management processors — often Cortex-M — that also live inside the SoC).

            Worst case is Raspberry Pi where even a whole closed source RTOS has to be booted first to be able to initialize the ARM cores so a secondary OS like Linux can run.

          6. Even without opensource bootloader for rpi, i’d still trust brodacom silicon more than some chinese maker with razor thin margins.

            There is a reason why these things ain’t used a lot in production environment.

          7. > i’d still trust brodacom silicon

            LOL! The VideoCore is not Broadcom silicon but something from an UK company: https://en.wikipedia.org/wiki/Alphamosaic

            And then on the VideoCore SoCs that are used on Raspberries there are some ARM cores crappily integrated that are designed also in the UK by Arm Holdings. The Chinese stuff your feelings prevent you to use is also based on this UK stuff (even now that ARM is owned by Japanese SoftBank Group).

            BTW: Trump/CFIUS vetoed the Qualcomm aquisition since they consider BroadCom being too much tied to China.

            Anyway: Fun to read all those ‘reasons’ to prefer the inferior RPi hardware over something sane… 😉

  2. Our local classified site has cheap UPSes for sale. I’m already using a APC based UPS for my devices. This is kinda expensive yeah!

    1. > I’m already using a APC based UPS for my devices

      Great way to waste energy for nothing if it’s about powering devices in the ‘below 10W’ category 😉

      At least the el cheapo UPS I used prior to switching to energy efficient ARM boards with battery support needed way too much electricity for themselves.

      1. Possibly, but i have 3 ARM boxes on the UPS spckets and 1 x86 server on 1 of the 4 surge protected sockets since the UPS can’t handle the W of the server anyway. It serves me well and i wouldn’t want to pay ~ $30+ shipping ++ to get this stuff, although it’s an interesting device.

        1. It wouldbe interesting if it would allow powering off on shutdown and a hit would be some way to restart it… maybe a key fob or an ir remote or at least a button… I hate it when.I shutdown my pi and next time id like to start it realise it was wasting energy for days and wont start without powercycling.
          So maybe an axp209/203/221 or similar would be whats needed in such a board…

    1. Good find really! But it seems they don’t come with the charging part, only the UPS and output cable.

      1. > Good find really!

        LOL, yeah something on Aliexpress with just 6 orders and 0 feedback/reviews… what could possibly go wrong?! 😉

        BTW: any USB powerbank supporting ‘Pass-Through-Charging’ is the same as a dumb ‘5V UPS’ not able to signal ‘running low on battery’ (they usually do with a led so this could be used for a GPIO hack — still preferring Allwinner boards with PMU/battery support since way less hassles compared to such ‘solutions’)

          1. The battery ups and mains plug are one.

            The first one you plug your own power supply into.

        1. Even better find 🙂 This one with USB out for powering the device. (I forgot the fact that we can ofc use the PSU of the device as the input to such UPSes).
          Considering getting such one!

    1. And where’s the difference compared to any powerbank with ‘Pass-Through-Charging’ support? How does the board signal ‘running low on battery’ or even the PSU behind dying soon?

      1. For one it’s much cheaper than any power bank out there. If you need low battery indication, you can always implement that separately.

        1. > If you need low battery indication

          As explained in top comment ‘low battery indication’ isn’t enough if you really care about the U in UPS. Monitoring input voltage with SBC from PSU is mandatory to spot PSU’s dying soon.

        2. good 18650s dont come cheap, if you can get a ravpower (they support pass-thru charging) on discount it’ll likely be cheaper.

    2. Interesting! So one has to solder the input, the 18650 battery, then connect (solder as well ) the output? Do you have any links to where to order the “necessary” cables and other parts? 🙂
      BTW: what’s the key (Button) for on that device?

    1. > ‘The PiZero averaged an hour and a half without power.’

      That’s pretty underwhelming. Just 1.5 hours with a Pi Zero doing nothing?

      Olimex guys found out real boards with attached spinning 2.5″ SATA HDD survive +6 hours without mains due to their 6600mAh battery being attached: https://olimex.wordpress.com/2016/01/07/a20-olinuxino-lime-server-with-320gb-hdd-works-on-lipo-battery-over-6-hours/

      In our installations we realized that same combination is good for ~20 hours operation but we usually send the connected 2.5″ HDDs to sleep.

  3. The product has been updated to PiZ-UpTime 2.0. More current, does not use any GPIO, includes ADC on board which measures Vin, Vout and Vbattery. Also has connect points for external Vin, Vout, Vbattery and common ground.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC