Dr. Scott M. Baker has built a new add-on designed to make powering his Raspberry Pi projects easier: a supercapacitor-based uninterruptible power supply (UPS).
"An uninterruptable power supply can serve several purposes," Baker explains. "To provide resiliency when power brownouts occur. Sometimes power will be disrupted for a very short time, just long enough to cause a CPU to reset. A UPS can smooth out these brownouts and provide consistent power. For moderate time outages, a UPS can provide enough power to safely shut down the computer. Data is saved, corruption is prevented. For long term outages, a UPS can provide power that keeps the computer operational for the duration of the outage — you can keep working while the power is out.
"For my use case, a SCSI emulator in a vintage PC, purposes (1) and (2) are valid, but purpose (3) is unnecessary. I wanted the RASCSI to be able to save its data properly when the power is cut. I have no need for it to continue working during a prolonged power disruption. I need about 30 seconds of uptime. For this level of backup, a supercapacitor UPS is ideal. Supercapacitors charge quickly. Supercapacitors have a good lifespan over many charge/discharge cycles. The vintage computers I’m working on, there might be months between the times when I power the computer on — there’s no need to keep a battery charged during those months."
Baker's design takes five 10F 2.7V capacitors and places them in parallel with a shunt regulator to limit their output voltage to 2.5V, giving around 12.5V total output. A DC-DC converter then takes this and drops it down to 5V, suitable for powering the Raspberry Pi - although an alternative regulator can be installed to lower the voltage to 2.5V for other projects. A Microchip ATtiny85 provides supervision of the device, monitoring input and battery power while offering an I2C bus for communication back to the host Raspberry Pi — meaning that the Raspberry Pi is able to check on the UPS and, if necessary, trigger a safe shutdown or other action in the event of power loss.
The original standalone design was quickly followed by a HAT add-on, offering the ability to sit directly atop the host Raspberry Pi and communicate with it via the general-purpose input/output (GPIO) header. Initial attempts with 1.25A buck-boost module, however, proved insufficient to power a Raspberry Pi 4 — something Baker believes can be resolved by building it with an 8A boost module in its place, though the solution is untested.
Full details, along with links to the source code, can be found on Baker's website.