I solved this originally by having a separate microcontroller monitoring the power in the car. It was permanently connected and only drew about 4 mA. When ACC came on it waited about 15 seconds before turning on the PC power (which allowed cranking time). When ACC went off it sent a shutdown command to the PC then waited about 30 seconds before cutting the PC power (allowing an orderly shutdown).
Yes there are edge cases, but this was a great solution.
That reminds me. While I was getting the above system sorted I did throw together a relay based solution. Couple of relays, couple of diodes, couple of resistors and a couple of GPIO. Never got around to building it though - the overlay solution was good enugh.
It's probably still hanging around on the forum somewhere.
If I find it on my PC it'll post it here.
Statistics: Posted by thagrol — Sun Sep 08, 2024 10:53 pm