This time the project is not for an old computer, the target is the raspberry pi, I saw many posts about the lack of a switch to turn on and off a raspberry pi and when you do a shutdown you never know when you can remove the power supply.
Recently I came up with this problem again so I decided to solve it and the result is the design below.
The connector J1 has the following signals:
Pin1 - 5volts from power supply.
Pin2 - GND from power supply
The connector J1 has the following signals:
Pin1 - 5volts to raspiberry pi
Pin2 - GND to raspiberry PI
Pin3 - GPIO14 from raspberry PI
Description:
When SW1 is pressed the capacitor C1 starts to charge and at the same time the transistor Q2 turn on the transistor Q1 so raspberry pi turn ON, while the raspberry are turning ON, the voltage for raspberry is manteined by cap C1, the time is ON is about 10 seconds, after this the voltage is mantained by GPIO14 once raspberry gets on line. If you experience some problems with this time you can change the capacitor C1 for another one with more capacitance.
When you shutdown raspberry PI it will turn off GPIO14 the signal that mantain the power ON, so transistor Q2 will turn off transistor Q1 and respberry PI stops receive 5volts, and you can presse SW1 again to turn it on.
I tested with a raspberry PI 3 and worked like a charm.
Using this with raspberry PI 3 the heatsink stayed cool, the current stayed about 550mA all the time with only the operating system running and samba.
I believe that the raspberry PI 4 will give us another scenario because it consumes more current and takes longer to turn on and off.
