I started a project to embed a Raspberry Pi in an old radio. One of the challenges is that the radio has a hard power-off button, so I want the Pi to have power for another 10-30 s so it can shutdown itself. The Pi has a hat with a power converter so it's powered by 12 V rather than the normal 5 V. The 12 V comes from an external PSU, so I can bypass the switch, I don't need a capacitor to provide actual power.
I gave it a try but I have admittedly not done any circuit design since I stopped playing with Fisher Technik, 35 years ago. So the below is an attempt.
Questions:
- Will the above work, or did I oversee something?
- Can it be done in a simpler/better way?
- The values for resistors/capacitor are just randomly chosen. What would be reasonable values to achieve this 30 s delay?



