I created following UPS circuit to shutdown my Raspberry Pi 3A+ properly:
I would really appreciate if somebody can review my circuit. I know it's a little bit hard to read, but I'm sorry. I'm a beginner in creating circuits. The UPS is powered by a 4.5 F supercapacitor to power my Raspberry Pi for 15-20 seconds after the 24 V supply (VCC) has been unplugged.
Following signals are important:
- VCC = 24 V
- +5V = 5.15 V from my adjustable LM2596 regulator to supply my Raspberry Pi in "normal mode"
- VCAP = Voltage of my supercapacitor
- UPS = Output voltage to supply my Raspberry Pi after VCC has been unplugged
- ON/OFF = Turning the adjustable LM2596 on and off
How I want how it to work:
If somebody has unplugged the VCC (24 V) and the voltage drops below the Zener voltage of 20 V, the LM2596 gets shut down by the "ON/OFF"-signal. Over another transistor Q1 and Q7, I use the "VCAP"-voltage to power on the voltage regulator U4 which than regulates the "UPS"-voltage to 5 V to power the Raspberry Pi for a few seconds.
The supercapacitor gets powered by the 5 V output of my LM2596. Logically, the supercapacitor can only be charged if the LM2596 is turned on. And this only happens if the voltage of my power supply (VCC) is above the Zener voltage of 20 V.
My idea was, that if I wire the supercapacitor directly in parallel with my 5 V of the LM2596, the voltage drops over time if the supercaps get discharged. So I used the second voltage regulator, which can regulate 5 V down to 0.9 V to stable 5 V at the output.
I hope somebody can review my circuit. If you have any advice, I would appreciate it.
Update: VCC is my 24 V input to power the LM2596. The LM2596 converts the 24 V to stable 5 V to supply my Raspberry Pi and other parts of my circuit. If the 24 V gets unplugged, I want to supply my Raspberry Pi over the "UPS" voltage.