I have a project that uses a single-board computer, and requires a power backup of some sort so it can safely shut itself down in the event of a power failure without hosing its filesystem. Didn’t find quite what I was looking for – my SBC is an Odroid C2 and its GPIO header doesn’t quite match the pinouts for Raspberry Pi 2/3 so RPi hats won’t work – so I rolled my own.
Here, have a couple pics:
It’s not a hat or shield. This is intentional. It’ll work with anything, so making it a hat/shield kinda defeats the purpose of universal application. Besides, the capacitors are a bit big and making it conform to the shape of a specific SBC would be awkward.
The design goal focuses heavily on minimalism, and to that end the whole thing is only a handful of parts. Despite that, it sports power-MOSFET active rectification with an *extremely low* voltage drop (around 30mV) and active charge balancing to keep the supercapacitors happy. Target is a 3A maximum load at 5.0VDC, with 5.4VDC being the upper voltage limit. 3.3VDC is also easily doable but will derate running times.
It’ll deliver 750mA @ 5VDC dropping to 4.6VDC (a typical low-voltage cutoff level for 5VDC SBCs) in about 25 seconds, and can dump 3A for 6 seconds before dropping to 4.6VDC. Stretching the uptime can be accomplished by adding a suitable boost supply to the output, which moves the dropout voltage down to whatever the boost supply can handle. A 3A load from 5.0 down to 3.3, for example, can be maintained for about 15 seconds instead of 6.
There’s a power-good header for connecting to a SBC, and a simple script can be run on the SBC to poll whatever GPIO pin it’s tied to. The power-good pin will be pulled off ground (to ~2.5VDC) when the UPS has power. If the pin drops to ground, throw a “sync” to force writes to storage and then do a “sudo shutdown now.” If it’s not being used with a SBC, the power-good header can be ignored or used for other purposes like driving a shutoff transistor.
There is one caveat to this design. Since it uses supercaps, at least initially after power-up the SBC or whatever connected to the output won’t receive much current until the supercaps get enough of a charge on them to stop hogging the supply. This may prevent a connected SBC from booting for 10 seconds or so after applying power.
Also, there are power resistors to act as inrush limiters and they’ll get pretty warm during the first several seconds of charging, and this should be planned for.
I’m looking into whether to offer this as a kit, and to that end worked out a PCB layout that allows using up to 400 farad supercaps for even longer runtime (3A over 5.0 >> 4.6 for 24 seconds, 750mA over 5.0 >> 4.6 for 1:40) – long enough to stay up over short power interruptions without needing to shut down immediately. The kit version would be a flatter layout with M3 mounting holes on all corners, and having the supercaps attached to the board edge allows for multiple capacitor case sizes.
Everything is already RoHS/REACH compatible, so if it does turn into a kit it won’t add regulatory hassles to whatever projects it might join.
EDITED TO ADD: If the kit thing comes to fruition I’ll do a post on that with relevant details over in /r/ElectronicsList and add a link.