I've been recently trying to set up something of a "last gasp" UPS for a Raspberry Pi to shut it down when I turn off my 3D Printer (thus killing the RPi's power as well). It doesn't need to last very long - maybe 30 seconds with minimal (500ma or less) load - which lead me to look into supercapacitors. Problem is, I'm having trouble figuring out the best way to rig them up. I've found ICs (like the LTC3226) which would suit the purpose exactly but they're fine-pitch surface mount chips, which is beyond my ability and facilities to use, and no-one seems to make a pre-built module using them. However, I have found that a pre-built HAT for an RPi exists for this exact purpose that uses a Li-Ion battery instead. And you can buy them without the battery. I'd use it with the battery but that seems superfluous, given it'll discharge itself mostly through the idle current of an "off" RPi, wasting power and needlessly wearing the battery. But if I were to put a pair of supercaps in place of the Li-Ion battery instead...? I know from things I've heard in the past that Li-Ion batteries are charged differently to NiCad or NiMH. I don't know if this difference would impact the ability of such a charger to work with supercaps instead. And if I search for it, all I'm finding are people asking if they can charge batteries from (super)capacitors - not exactly helpful. My alternative theory (at present) is to use a 5v boost converter from the caps, with either a mosfet to limit the charging current and stop them trying to charge themselves, or a transistor and set of resistors to achieve the same result (and hoping the voltage loss isn't a problem). The "kill" switch would be provided from an optocouple hooked to the 5v input line before any of the RPi's regulation circuitry.