Shut your Raspberry Pi Down Gracefully in your Car Using a Timer Relay

Опубликовано: 27 Июль 2026
на канале: productivAI
10,987
139

I originally made the conent for this video a few months ago but never got around to posting it. But since a number of people have asked me how I got the delayed shutdown working on my pi-based head unit, I went ahead and made the content available.
This video goes into step-by-step detail on how to program and wire in a physical timer relay to pair up with a shutdown script.
The timer comes with a trigger wire that can be connected to a gpio pin via a dry contact. Watch the video to see how it's all done!

Here's the timer that I used -
Mini Timer Time Delay Relay .1 Sec to 400 days. 12V 5A. Power on or Off Delay, Cycling and More-
https://amzn.to/2CIwmKd

Even though I provide step-by-step instructions in my video, I highly reccommend reading the manual -
http://docs.timersshop.com/Multifunct...

Also the company that makes the timer, timershop, has useful youtube videos that explain how to program the timers. They make a great supplement to my video if you need some additional resources -
   / @timersshop  

Here's my shutdown script that should work with any generic pi-based system -
https://pastebin.com/sCBi6TF3

Let me know if you have any questions! It's admittedly a pain to program, and the manual can be overwhelming, but once you know exactly what you want it's not so bad.