I am looking to provide power to my raspberry Pi upon power loss from 5v power supply. It just needs to provide power long enough for the Pi to safely shutdown (with the setup I have, I am estimating around 5 seconds to cleanly shutdown, but if it takes longer than this I can always add more caps to cover the time).
The circuit is as follows: The 5V battery/power supply source powers the Pi and charges the Caps through the 5v to 2.5V voltage regulator while plugged in. Upon battery being unplugged, the super caps then power the Pi through the boost converter, and a signal is sent to the Pi to shutdown immediately by the PNP transistor.
The super caps are 10F each, which should provide 8 seconds of usable power at 50% efficiency by my math.
2.7V Full
20F Capacity
2.0V Fully Drained
2000mw Average Draw from Pi
_
Joules = 20F * ((2.7V^2)/2) = 72.9 J
Unusable Joules = 20F * ((2.0V^2)/2) = 40 J
_
mW seconds = (72.9 J - 40 J) * 1000 = 32,900 mW seconds
_
Supply Time = (32,900mWs / 2,000mWs) * 50% (efficiency loss) = ~8 seconds
The PNP transistor should kick-in when the 5V power source drops off, thus sending a signal to the Pi on GP21 to shutdown immediately.
Assuming I can code this to shutdown fast enough, will this circuit work as I am expecting?
Thanks in advance for any help on this!
Note: The 3.3v is not used for anything in the sketch. My understanding is that the Pi is powered via 5V, not 3.3v.