- Provide a stable powersupply with short time UPS function
- Backup short power interruptions <2sec. without user notice
- Mechanically stable USB-C powersupply connector instead of micro USB
- Shutdown function using a power button
- No maintenance cost caused by dead batteries
- No risk of fire because the powersupply is using supercapacitors instead of using risky LiIon techology
- Connector for external power button
- Connector for an expansion board with relay & power LED to switch loads without draining current from the supercaps
Addon board with
- External power LED
- External relay option to switch high current loads
The UPS function is limited to an operation time of approx. 30..60 seconds. That is far enough for a save shutdown.
The powersupply remembers its last state. It excacly comes up in the last mode it was running.
- If the device was disconnected by removing the power cord while it was on, it will restart in "on-mode" after reconnecting the power cord
- If the device was off when removing the power cord it will remain off after reconnecting it and can be started using the power button
- If it was switched off by the power button it must be switched on by the power button
- If it was shut down by the shutdown command or via the user interface it will come up if the power button is pressed or the supply cord is (re-)connected
All those functions are available in a PIhat compatible PCB
Initially it was designed for arcade machines but there are a lot of usecases where it fits like:
- IoT server
I'm using it on all of my raspi computers at home because it is so convenient just to remove the power cord without the risk of corrupted SD-cards.
How it works
The design is based on the supercap charger LTC4041 from Linear Technology. I was following mainly the application note for that chip.
An additional µcontroller is taking care of the interface to the raspi and interacting with the LTC4041.
Backup UPS funktion
This is not a really UPS backup power function. It is just to bridge small power outage glitches of < 2s.
Shutdown on power loss
The µcontroller is "listening" to the power fail output of the LTC4041. If it indicates a power fail. The µcontroller is waiting until the backup time of 2s is expired, then it gives notice to the raspi by pulling the power good signal low. After a period of approx. 25s it switches the supply to the raspi off.
Shutdown on button press
If the power button is pressed the µcontroller gives notice to the raspi by pulling the power good signal low. After a period of approx. 25s it switches the supply to the raspi off.
Shutdown using the Linux shutdown command
The raspi is pulling a specific GPIO (24 or 26) low. The µcontroller recognizes it and is switching the supply to the raspi after 25s off.
Remembering the last state
The state of the powersupply is recorded in the eePROM of the µcontroller. This means that after re-powering or pressing the power button it comes up in the same state as it was before switching off the power. A kind of wear leveling algorithm is used to ensure a lifetime of > 1 million switching cycles recoded in the eePROM.
|Input Voltage||5V .. 5.2V|
|Output Voltage (Power cord connected)||same as input voltage|
|Output voltage during shutdown||4.72V .. 4.88V|
|Output current (Power cord connected)||limited by wall plug max. current|
|Supercapacitor charge current||1A max.|
|Backup time (500mA load current, 25F Supercap)||60s (theoretical vallue, load will be disconnected after 20s)|
|Backup time (1000mA load current, 25F Supercap)||25s (theoretical vallue, load will be disconnected after 20s)|
Performance (with 35F Supercaps)
Raspberry PI 3B with official TFT display powered by the official raspberry pi USB-C supply
Images showing the shutdown procedure
Channel 1 - Supercap Voltage (UPS function works as long as voltage is >2.5V)
Channel...Read more »