I'm new to electrical engineering and not yet familiar with all the terminology and methodology, please bear with me.
What the circuit should do
I want a pushbutton to power on the Arduino. Using the same pushbutton I want to send signals to the Arduino (e.g. power off after 2 sec press). Also there has to be a way to programmatically power off after x minutes.
Below the circuit I build to accomplish this task. My idea was to use a soft latch circuit. Q1 is turned off by the current flowing through R1 and R2 by default. When button 1 is pressed, current flows through Q1, R2, button 1, R3 and to GND. Q1, being activated, in turn activated Q3, which should permanently activate Q1. To "turn Q1 off" I power Q4 to shorten Q3 to GND. sense is there to determine if the button was pressed.
This circuit does not work as it is not latching. Is my approach right, but the circuit wrong, or is there generally a better solution to fulfill my requirements?