Thinking about putting an embedded server (Raspberry Pi based) into the trunk or dash of a car.
Regulating 12VDC down to 5V is not difficult, and the device will automatically go through its 10~30sec bootup sequence just fine. Most people would have no problem just killing the power and letting the device halt, but that's not a best practice. It takes up to 20sec for the system to shut down orderly, once commanded to do so. This ensures any files on the SD card have been closed properly.
I figure I can make some kind of power cache from a small inline battery or ultracapacitor, but I need to (1) avoid interruption of power to the main unit, while (2) giving a TTL signal to the GPIO pins that reflects whether there is power available or not. A software daemon or ISR can then watch the signal change and invoke the orderly shutdown.
What's the best kind of circuit to perform this?
Regulating 12VDC down to 5V is not difficult, and the device will automatically go through its 10~30sec bootup sequence just fine. Most people would have no problem just killing the power and letting the device halt, but that's not a best practice. It takes up to 20sec for the system to shut down orderly, once commanded to do so. This ensures any files on the SD card have been closed properly.
I figure I can make some kind of power cache from a small inline battery or ultracapacitor, but I need to (1) avoid interruption of power to the main unit, while (2) giving a TTL signal to the GPIO pins that reflects whether there is power available or not. A software daemon or ISR can then watch the signal change and invoke the orderly shutdown.
What's the best kind of circuit to perform this?