I'm trying to design a circuit that will control the power to a raspberry pi with a button. The basic usage is:
- first button press-> rasp powers up.
- second button press-> rasp continues with power but detects that should shutdown.
- (After the shutdown sequence is done, raspberry shuts off).
The design envisioned is a circuit with a normally off button that is connected to a binary counter (74LS161AN). The idea is to count the button presses and use the XOR of the counter's 2 least significant bits as a control for the power to the rasp. The XOR I intend to use is 74LS86. The msb of the counter's 2 bits is how the rasp detects it should shutdown. The rasp cuts its power by ouputing a High to a gpio that is connected to the counter reset.
This button/counter contraption is sort of working on a breadboard but now needs a transistor that actually takes the output of the XOR and controls the voltage in the rasp. power. Do you think that BD135 is a good choice for this? (datasheet) I chose it because Raspberry is powered by a 1.2A power supply, therefore the transistor needs to handle more current (bd135 has max collector current of 1.5A). It also needs to be NPN.
I have a few doubts if this is going to work, for example, how do I know if the XOR can supply enough current for the transistor base? Actually what does it mean when the high level output current of the XOR is -0.4mA ?
If this transistor would not work, could you point one that does and explain the reasoning to select it? I am a bit lost..
Thank you very much.
PS: between the button and the counter there is a 555timer in monostable to clear the bounces.