# Raspberry PI - power for graceful shutdown - my BMW example

**URL:** <https://forum.realdash.net/t/raspberry-pi-power-for-graceful-shutdown-my-bmw-example/7611>\
**Category:** Custom Hardware / Electronics\
**Created:** [February 17, 2025, 8:05pm UTC](https://forum.realdash.net/t/raspberry-pi-power-for-graceful-shutdown-my-bmw-example/7611 "2025-02-17T20:05:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BMW468LS](https://forum.realdash.net/user_avatar/forum.realdash.net/bmw468ls/32/1794_2.png) [@BMW468LS](https://forum.realdash.net/u/BMW468LS)\
**Post date:** [February 17, 2025, 8:05pm UTC](https://forum.realdash.net/t/raspberry-pi-power-for-graceful-shutdown-my-bmw-example/7611/1 "2025-02-17T20:05:07Z")

</div>

I’ve been finishing up my dash install in my LS Swapped BMW 2012 128i. I’m using a Raspberry PI 5 with 16gb RAM (8GB is probably fine I just had it) and an NVMe SSD. I know one of the struggles with the PI installs is graceful startup/shutdown. The BMW, and many modern cars, have multiple B+ circuits that change from awake to sleep/sleep to awake on programmed timings. For the BMW, there are at least three (technically there are 4 or more but 3 useful):

Terminal 30 - always hot with 12v  
Terminal 30g - hot when the CAS (one of the computers) wakes up, triggered by several possible events depending on model and options  
Terminal 30 switched - hot on initiation start/run on the key (or button)

Other cars likely have something similar so you’ll need to investigate.

Knowing the above we have some choices that allow the PI to be powered/shutdown in several scenarios, including doing it gracefully. My version is below. I’m using a Waveshare 8inch LCD and powering it separately from the PI so I can control it with different timings.

Hopefully this will help or at least get you to thinking.

 ![Dash Wiring](https://forum.realdash.net/uploads/default/original/2X/0/0e5f455a7bc47514f0727fbd73a5bf187646e7b1.png)

---

<div class="post-metadata">

**Author:** ![BMW468LS](https://forum.realdash.net/user_avatar/forum.realdash.net/bmw468ls/32/1794_2.png) [@BMW468LS](https://forum.realdash.net/u/BMW468LS)\
**Post date:** [February 17, 2025, 8:09pm UTC](https://forum.realdash.net/t/raspberry-pi-power-for-graceful-shutdown-my-bmw-example/7611/2 "2025-02-17T20:09:26Z")

</div>

And before anyone asks, here are the specific devices I’m using with success:

CAN adapter (changed to candlelight firmware): [Amazon.com: DSD TECH SH-C30G Isolated USB to CAN Adapter Based on Canable 1.0 Pro : Electronics](https://www.amazon.com/DSD-TECH-SH-C30G-Isolated-Adapter/dp/B0CDGGBZDT)

Timed relays: [Amazon.com: [2 Pack] DC 6-30V Timer Relay Programmable Delay Relay Module Cycle Timer with LED Display / 5V Micro USB, Smart Home Controller : Tools & Home Improvement](https://www.amazon.com/6-30V-Programmable-Module-Display-Controller/dp/B085TL38NH)

12V step down buck convertors: [Amazon.com: Klnuoxj DC 12V/24V to 5V USB C Step Down Converter Type-C Interface 5A 25W Waterproof Buck Module Power Adapter Compatible with Raspberry Pi 4, Cell Phones 2-Pack : Electronics](https://www.amazon.com/Klnuoxj-Converter-Interface-Waterproof-Compatible/dp/B0CRVVWL4Y)

Waveshare 8" LCD display: [Amazon.com: waveshare 8inch Capacitive Touch Display Compatible with Raspberry Pi 5/4B/3B+/3A+ and CM3/3+/4 1280×800 Resolution IPS DSI Interface : Electronics](https://www.amazon.com/dp/B0BLZ5QCD3)

---

<div class="post-metadata">

**Author:** ![realdashdev](https://forum.realdash.net/user_avatar/forum.realdash.net/realdashdev/32/6_2.png) [@realdashdev](https://forum.realdash.net/u/realdashdev)\
**Post date:** [February 18, 2025, 11:46am UTC](https://forum.realdash.net/t/raspberry-pi-power-for-graceful-shutdown-my-bmw-example/7611/3 "2025-02-18T11:46:18Z")

</div>

Thank you for sharing this info!

---

<div class="post-metadata">

**Author:** ![BMW468LS](https://forum.realdash.net/user_avatar/forum.realdash.net/bmw468ls/32/1794_2.png) [@BMW468LS](https://forum.realdash.net/u/BMW468LS)\
**Post date:** [February 18, 2025, 6:39pm UTC](https://forum.realdash.net/t/raspberry-pi-power-for-graceful-shutdown-my-bmw-example/7611/4 "2025-02-18T18:39:12Z")

</div>

I will note that the relay to the GPIO connected shutdown relay should be hooked like a pushbutton switch. Opto isolated from the car. I didn’t give much info above on it above so thought I’d add that bit of info. Google how to do a push button switch on GPIO pins and mimic that with the relay (i.e. with a resister like this: [Using a push button with Raspberry Pi GPIO | Raspberry Pi HQ](https://raspberrypihq.com/use-a-push-button-with-raspberry-pi-gpio/))

I am using this one: [AEDIKO 4pcs DC 12V Relay Module 1 Channel Relay Board with Optocoupler Isolation Support High or Low Level: Amazon.com: Industrial & Scientific](https://www.amazon.com/dp/B095YFJ69T)

I’ll update the schematic when I get a chance. Don’t want anyone to fry their PI if not done correctly.
