Configurable shutdown period?

Information, updates, questions, issues regarding BWS CAR PS project.
Post Reply
mentalinc
Posts: 18
Joined: Tue Mar 12, 2019 8:19 pm

Configurable shutdown period?

Post by mentalinc » Fri Mar 15, 2019 8:41 am

Is it possible to have the shutdown delayed for a user set period i.e. and hour?

Like this:
https://youtu.be/vMvMXd4RvdA?t=1109

In short, turn off the ignition, the pi turns the display off but keeps running for an hour and if the ignition isn't turned back on it turns off.
If the ignition is turned on the screen comes on and you're already booted so its an "instant on". great for quick stops like the gas station or popping into the shops.

Thoughts or guidance on how to make this possible?

BlueWave
Site Admin
Posts: 516
Joined: Tue Sep 18, 2018 6:30 am

Re: Configurable shutdown period?

Post by BlueWave » Sat Mar 16, 2019 1:51 pm

Sure it is possible. You can either write your own service similar to our for BWS CAR PS (and turn off our), or you can modify current script for shutdown according to your requirements.

Hisma
Posts: 43
Joined: Wed Nov 28, 2018 9:38 pm

Re: Configurable shutdown period?

Post by Hisma » Sun Mar 31, 2019 8:29 pm

As mentioned the PW Car PS works fine, as does other variants like the mausberry. I am the person that did the video you linked, and here's a video that explains in more detail what I did (if you didn't find this video yet) -
https://www.youtube.com/watch?v=rknBevexOcU

mentalinc
Posts: 18
Joined: Tue Mar 12, 2019 8:19 pm

Re: Configurable shutdown period?

Post by mentalinc » Wed Apr 17, 2019 6:55 pm

Thanks @Hisma

Can you please explain what the relay is for between the timer and the GPIO pin?
Can we not just use a step down from 12v to 3.3v something like a LM2596 for example?

Hisma
Posts: 43
Joined: Wed Nov 28, 2018 9:38 pm

Re: Configurable shutdown period?

Post by Hisma » Thu Apr 18, 2019 1:19 pm

As you stated, the relay is simply acting as an interposing relay to isolate the 12V from the GPIO voltage. You can accomplish the same thing by stepping down the voltage, sure. In my case, I already had a relay board in my car as I was using it to trigger my backup cam etc, so it made sense to re-use it.

mentalinc
Posts: 18
Joined: Tue Mar 12, 2019 8:19 pm

Re: Configurable shutdown period?

Post by mentalinc » Sat Apr 27, 2019 9:09 am

I assume for the reverse cam you just hooked up the 12v fromt he reverse bulb and ran in through the relay..
Did you need to change the amps at all or is the drop to below 3.3v enough (but closer to 3.3 than 0v) enough?
I.e. do I need to play with resistors to change amps etc?, I can't see anyone saying they needed resistors..

Hisma
Posts: 43
Joined: Wed Nov 28, 2018 9:38 pm

Re: Configurable shutdown period?

Post by Hisma » Sun Apr 28, 2019 4:03 pm

You don't need any additional resistors. With a standard 12V relay board, you just feed the 12V signal from the camera on the input side of the relay, and on the output side, you take 1 wire to 3.3V on the pi, and another wire to a gpio pin.
You can do the exact same thing with a 12V ignition trigger wire. Ignition on = relay on. Ignition off = relay off, script starts shutdown timer.

Post Reply