Core Electronics Forum

Need help with power options for Raspberry Pi in Car

Hi,
I am quite new to this Forum but I did a fair amount of searching and skimming through existing forum posts on UPS but could quite get if it would work in my line of use. Basically, I have a Raspberry Pi with a 10.1 inch touch screen set to be a in car display for a OpenAuto Pro project for android auto. OpenAuto Pro basically has everything to get things running basic for android auto to work, but I have one issue, and that is Power. I want to route a power source like a cigarette lighter port as a main power since it provides power once the ignition turns on. What I want is something that auto boots raspberry pi when I turn the ignition on the car, providing power to the raspberry pi, and safe shut down for “x” amount of seconds when ignition of car is turned off (main power cut). Is there any HAT that can do that to a Raspberry Pi 4? I will also be adding a usb sound car for MIC jack, separate USB dongle as it is required for OpenAuto (apparently the built-in one will not work), and a USB flash drive as my main root as booting speeds of usb ssd are faster than Micro SD. I was looking into PiJuice HAT or Raspberry Pi UPS HAT DFROBOT since it was mentioned in the forums and has something closely related to what I want. Can either of these HATs work what I want or is there one better than the two just listed? If either of the one does provide the functionality that I want, How do I approach this method? Again, I am fairly new to coding, but I express a lot of interest especially the project I wanted to take a stab at. simple, ignition on (main power on from cigarette lighter port) auto boot Raspberry pi, Ignition off (Main power from cigarette lighter port unplugged) safe shut down “x” seconds. I do not want safe shut down based on battery percentage.
Would love to see your opinions on this and thank you for taking your time in reading this.
Eagerly waiting for your responses.

2 Likes

Hi Lawrence,

Welcome to the forum! I have a couple of ideas but both will probably need to be looked at a little closer to make them work.

My first idea is to use the PiJuiceHAT to act as a UPS and have it shutdown at a very high battery charge, so that when power is removed the UPS continues to supply power for a couple of % then shuts down. The PiJuice can be configured with scripts to shutdown at whatever level. https://core-electronics.com.au/pijuice-hat.html

My second idea is to design some sort of custom built circuit to supply power after the supply is turned off and have a digital input of the Pi monitor for power supply loss so the shutdown script can be triggered.
This isn’t something I’ve designed before though so I’m not sure how involved it would be.

1 Like