BlueWave Studio forum
Change shutdown script - Printable Version

+- BlueWave Studio forum (https://bluewavestudio.io/community)
+-- Forum: Hardware for head-unit (https://bluewavestudio.io/community/forum-87.html)
+--- Forum: Power Supply and Safe Shutdown (https://bluewavestudio.io/community/forum-91.html)
+--- Thread: Change shutdown script (/thread-923.html)



Change shutdown script - azkue5 - 07-12-2019

Hello,

I want to change the shutdown script that automatically shutdowns the unit when the car power is off. I've made a circuit that gives 3.3 V when the car is on and 0V when the car is off. How should I change it? Sorry I'm new using Raspberry...

Thank you in advance!


RE: Change shutdown script - skrimo - 07-12-2019

Check my "shutdown using three relays" tread. The script that you need is in there.


RE: Change shutdown script - nvs231 - 10-23-2019

(07-12-2019, 07:53 AM)azkue5 Wrote: Hello,

I want to change the shutdown script that automatically shutdowns the unit when the car power is off. I've made a circuit that gives 3.3 V when the car is on and when the car is off. How should I change it? Sorry I'm new using Raspberry...

Thank you

Not sure if this is what your after, but you can trigger your Pi to Gracefully shutdown just by connecting GPIO3 (pin 5) to ground. you can add a switch or in my case, a 5 pin NC relay. I run 12v from ON power on my ignition across the post (85) to vehicle Ground (86) then GPIO3 to (30) and Ground (pin 9) to (37a). then just add this line to your /boot/config.txt dtoverlay=gpio-shutdown

I run a 3a 5v stepdown off the ACC power on the ignition with 2x 2.5v 22f super caps to keep the pi alive in the event that I switch off my ignition too fast (3 amp power is a must in order to charge the caps).

hope that helps


RE: Change shutdown script - andyj - 10-24-2019

My advice would be to do it with software instead of hardware. You can either do it with Bluetooth detection or the USB connection. I'm using Bluetooth at the moment. It checks periodically over 15 minutes and if the phone isn't detected then it shuts down. That way I can fill up with fuel without it shutting down and having to restart it. I also have a momentary switch that resumes from a halt state if I need it.


RE: Change shutdown script - hugo1111 - 12-27-2022

(10-24-2019, 08:28 PM)andyj Wrote: My advice would be to do it with software instead of hardware.  You can either do it with Bluetooth detection or the USB connection.  I'm using Bluetooth at the moment.  It checks periodically over 15 minutes and if the phone isn't detected then it shuts down.  That way I can fill up with fuel without it shutting down and having to restart it. I also have a momentary switch that resumes from a halt state if I need it.

Hi Andy,

Would you be ever so kind to share your Bluetooth detection script please ? I cannot make the Mausberry script to work so I agree with you that a software solution is ideal.

Many thanks

Hugo