Close
0%
0%

PowerUPS

Open-Source Solar + Lithium-Ion (LiPo, Li-ion, LiFePo4) UPS for Raspberry Pi

Similar projects worth following
Design of an open-source smart UPS (uninterruptable power supply) for the Raspberry Pi that supports solar power input and 1S lithium-ion battery (LiPo/Li-Ion/LiFePo4).

With the ESP32-S3 PowerFeather making it easy to create ESP32-based solar + LiPo/Li-Ion projects, it’s time to power something bigger! The next logical step is to give your single board computers like the Raspberry Pis some PowerUPS (pun intended). This enables much more computing power on your remote/off-grid projects - maybe something needing a vision, audio processing, or some sort of edge AI.

However, unlike the ESP32-S3 PowerFeather, I will be building this in public with the hardware design (schematic & layout) available from the start. I hope to leverage the stuff I learned and did for ESP32-S3 PowerFeather in this new project; and in turn, the stuff here can also be fed back into it to make it even better.

If you’re interested in supporting this project, please do take a look at what the ESP32-S3 PowerFeather can do. If you like what you see, consider purchasing one to use in your project. The proceeds will be used as to fund the development of PowerUPS.

You can also show your support by following this project, liking or sharing it to other people. You can also join the Discord server for discussion about PowerUPS.

Goals

For now, the primary target are Raspberry Pi Zero’s, but should be also usable for full-sized Raspberry Pi’s  provided there aren’t too many USB devices attached.

As mentioned, the design will be similar to ESP32-S3 PowerFeather, but scaled up to support higher currents. So some of the things that ESP32-S3 PowerFeather can do,  that you can expect PowerUPS to also be able to do are:

  • Supply voltage/current measurement
  • Battery voltage/current measurement
  • Battery charge %, health %, time-to-full/time-to-empty estimate
  • Battery temperature sensing
  • Battery charging current reduction/cutoff based on temperature
  • Solar panel MPP voltage adjustable from firmware/software
  • etc.

But since it is a UPS for Raspberry Pi, I also hope to implement software features like:

  • Shutdown/wakeups based on
    • Schedule
    • Battery level
    • Supply presence
  • RTC functions
  • Programming API from Raspi OS
  • etc.

However, for this particular UPS, I have additional hardware design goals:

  •  LiFePo4 support

LiPo/Li-Ion are popular because of their high power density. There’s a reason why almost all consumer devices right now use it - it’s well-known and safe enough if treated well.

LiFePo4 has an advantage in lifespan (more charge/discharge cycles) and operating temperature range. However, its biggest advantage by far is it has more stable chemistry, and can take much more abuse without going up in flames. See that stability in action in this video:

LiFePo4 support means users that want to trade off the power density for more safety have that option.

  • Bottom-mount/under-slung

Some other UPS’s already do this, with the UPS connected via pogo pins. I thought it was a good idea so I’m also doing it for PowerUPS. Mounting under the Pi means that it won’t interfere with other HATs - especially cooling solutions. 

  • Use of Raspberry Pi’s 5 V USB connector

Most existing Pi UPS’s have their own USB connectors, and ask their users to use that instead of the Pi’s USB connector. While this is no big deal most of the time, the biggest reason why I want to still support using the Pi’s USB connector is the use of gadget mode. This is especially true on Pi 4 and onwards, where the USB input  also has data, and can be configured such that the Pi can act as a USB device. If the UPS advises users to not use the Pi's USB connector, then they can't also use gadget mode.

Initial Design

Components Selection

  • Charger - BQ25622E

Here, I went with the BQ25622E, which is a higher max charging current version of the charger IC used in the ESP32-S3 PowerFeather,  the BQ25628E (3 A vs 2 A). Other than that, the footprint, registers, functionality and behavior seems to be mostly the same so I can take advantage of the existing circuit design and SDK code for the PowerFeather.

  • Fuel Gauge - MAX17260

The LC709204F...

Read more »

  • 1 × Texas Instruments BQ25622E Battery charger
  • 1 × Analog Devices MAX17260 Battery Fuel guage
  • 1 × Onsemi FAN48623 5 V Boost Converter
  • 1 × Microchip AVR128DB28 Microcontroller

  • Double checking the design...round 2

    powerfeatherdev11/01/2024 at 07:52 0 comments

    Ok, so I had time to double check the design again. I was hoping there wouldn't be anything major, but alas, I missed a couple of major stuff:

    • Wrong footprint for the FAN48623. I initially used a 0.35 mm pitch footprint, but somehow missed in the datasheet that the part is 0.4 mm pitch.
    • Incorrect pitch part for the battery and external DC terminal block. The mistake was from when the terminal block was originally going to be 5 mm pitch, but decided to use a 3.5 mm pitch one due to space constraints.

    With these issues out of the way, I am now more comfortable placing the order for the first prototype units in the coming week. 

     Also, I designed the USB supply protection accessory that I mentioned:

    This has the same ideal diode circuit as the one on the PowerUPS main board, and prevents the supply from being back-powered by PowerUPS. The supply goes on one end, and the cable to the Pi's USB port on  another. 

    Again, this is so that the Pi's USB port can still be used with PowerUPS, *unlike* for other UPS's which asks the user to use the USB connector on the UPS instead. (PowerUPS doesn't even have a USB port on its own - though it can still take external DC sources like solar panels using a screw terminal block).

  • Double checking the design

    powerfeatherdev10/26/2024 at 13:28 0 comments

    As I mentioned in my initial post, I wanted to review the design with fresher eyes before I send them off for prototype manufacturing. I was pretty confident that I handn't miss anything, but oh boy... there was some major mistakes in that design. Here were the major ones:

    1. Needed to use HSS configuration for NCV68261

    The ideal diode circuit has been correct to use back-to-back NMOS for HSS + ideal diode configuration:

    The initial design actually had the control circuity powered from the charger output, and so initiallly I turned off the 5 V boost converter itself so this HSS mode was not necessary. 

    But in the design in my initial post, the control circuity is now powered by the 5 V boost converter, with its bypass mode enabled for power saving. In this case, the additional NMOS is necessary since even if the initial lone NMOS (now Q3) is off, the body diode can still conduct.

    2.  Flipped footprint for DMN3016LFDE

    The way the PCB is layout, all of the SMD components are mounted at the back. It can get pretty confusing, especially since I'm used to the 'normal' way of them being at

    the top. 

    Previously, I flipped the gate and the smaller source pad, when it should have been the other way. 

    These are the two big errors. There some smaller stuff to fix like wrong part numbers, 5 V boost convert NC pins not being connected to ground, etc. Other than these fixes,, there is one more major change, and that is using a real power mux for the inputs. I decided to use TPS2120.

    And that's it. I will wait another few days, redo the checks and see if I missed anything this time...

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates