You still have the problem that if the main supply dips the Pi will brownout.'ere 'tis:
car psu B_schem.jpg
OK, an opto and a couple of transistor too.
Acc comes on energise the first relay which powers the Pi and feeds a GPIO through an optocoupler. Pi sets GPIO high which activates the second relay.
Second relay keeps power to the Pi even whn not present on the first.
Pi monitors the opto. When it indicates Acc has been gone for more than, say, a minute it triggesr a safe shutdown which cuts power to teh second relay thus cutting power to the Pi.
True. Not something I had considered at the time (six years ago). I'll leave that to better EEs/circuit designers than me.
And unless I missed something your solution also didn't cover brownouts.
Statistics: Posted by thagrol — Sun Sep 08, 2024 11:25 pm