Following on from my previous question I'm trying to create a shutdown controller for my Raspberry Pi. The Raspberry Pi needs to be powered from the battery, but should power-down after the Pi detects that the ignition has been turned off.
The Pi will take a 3.3V feed from the ACC line (I have other components that will take 5V from the ACC line via a 7805, so I will step down to 3.3V using a voltage divider unless anyone has a better suggestion - I'll also be driving a uPD6708 which takes 5V CMOS I/O, so will have to step-down from 5V to 3.3V on another 2 lines).
Software running in the RPi will set one of the GPIO pins high, presumably when the RPi shuts down the GPIO pins will all go low. So Q1 should turn the relay on, keeping the RPi's power on as long as the ignition is on, or the GPIO pin is high.
I have 3 fuse kits with a 1000uF cap and some kind of transformer/inductor, so I may as well use one of them on each the 12V battery and 12V accessory line.
This shut down controller claims to draw only 50uA in standby - if I used a CMOS 4071 OR gate that would be a start, but from what I've read, you'd need more current from the OR gate to saturate the transistor - is that right?
Bearing in mind that I need to level-shift 5 lines from 3.3V to 5V and 2 from 5V to 3.3V in addition to the requirements of this sub-circuit, can anyone recommend components/alternatives for OR1, Q1, RLY1 and/or any modifications?
Here's my attempt at following @Connor Wolf's suggestion.
- R1 and C3 need to be be chosen to allow the RPi to shut down properly
- I've added C1 because I image that it will take a brief moment before the relay switches after the ignition is turned off - I've got no idea how long that is, but I suppose the RPi is going to be drawing about 700mA from the capacitor, in addition to the 555 and relay
@Nick suggests it could be simpler - like this perhaps? I tried to remove the diodes so that I could just use an off-the-shelf 12V-5V 1A USB power supply (or a pair of them). The 555 datasheet says that it outputs 3.3V (max source 100mA? This page says 200mA). The RPi will take read the ACC line at 3.3V to determine when to shut down.