pulse when ignition is switched on or off

Thread Starter

bloo62

Joined Jan 1, 2019
1
Hello
I'm putting a raspberry pi in my camper van to run carplay and want a way of switching the pi on and off with the ignition so need a pulse of a few seconds to do a soft shutdown.

is there a way to do this easily?
 

Ya’akov

Joined Jan 27, 2019
7,440
Welcome to AAC.

I think your best bet is to make circuit that controls the GPIO pin for shutdown (I assume you are using the normal method).

It would have a largish cap, possible a small supercap that would charge when the accessory power of the car went hot (ignition in ACC position). Then it would pull the GPIO pin low after a sane interval. When ACC goes cold, the circuit would pull the GPIO pin low, getting its power from the supercap.

This assumes the RPi has power regardless of the ignition state.

I believe the best approach would probably be to use a small MCU, like an ATTiny85 and an N-channel MOSFET.
 
Top