Push-Button switch with delay to Turn On/Off Raspberry PI

Thread Starter

Kevin Pilgrim

Joined Sep 14, 2018
3
Dear Forum,
For a mobile project I need a circut to turn on/off a raspberry pi with delay. Idealy with a 2-3 second delay to prevent that a user accidentally powers on or off. Since the PI also has a HDMI Display attached the maxmimum current is 1A. I tried this here http://www.mosaic-industries.com/em...n-switch-turn-on/latching-toggle-power-switch but I did not get it to work.

I would like to implement it with SMD ic/components.

Thanks for any helP!
 

crutschow

Joined Mar 14, 2008
34,201
Below is a toggle delay circuit that should do what you want.

U1 and U2 can be any inverting gates, such as a CD4001 NOR gate, or a CD4049 buffer.

The LTspice simulation shows a delay of about a 2.6 seconds for both turn on and turn off.

M1 can be just about any logic-level (max Vgs threshold of ≤2V) P-MOSFET with an on-resistance of ≤100mΩ.

upload_2018-9-14_14-31-21.png
 
Last edited:

KMoffett

Joined Dec 19, 2007
2,918
It appears that all the circuits that use logic gates must remain powered even when the switched load is off. Or am I wrong?\

Ken
 

AnalogKid

Joined Aug 1, 2013
10,971
1. Do you want the circuit to wait 2-3 seconds after a brief momentary button push and then switch the power?

-or-

2. Do you want the user to have to hold down the button for 2-3 seconds before the circuit switches the power?

ak
 

crutschow

Joined Mar 14, 2008
34,201
Does this look about right ;-)?
That will work but you only need one chip, not two.
There are are 4 gates in each package, and you can use two of them for the circuit.
It appears that all the circuits that use logic gates must remain powered even when the switched load is off.
Due to C2 and C3, the circuit I posted should come up in the power-off state when the power is applied.
And it takes only leakage current when energized in the static state.
1. Do you want the circuit to wait 2-3 seconds after a brief momentary button push and then switch the power?
-or-
2. Do you want the user to have to hold down the button for 2-3 seconds before the circuit switches the power?
Since he stated
with a 2-3 second delay to prevent that a user accidentally powers on or off.
I would think it's number 2.
 

KMoffett

Joined Dec 19, 2007
2,918
KMoffett said:

It appears that all the circuits that use logic gates must remain powered even when the switched load is off.

Due to C2 and C3, the circuit I posted should come up in the power-off state when the power is applied.
And it takes only leakage current when energized in the static state.


But you don't show any power for U1/U2. When Vdd is supplied, but the output to the load is OFF, doesn't U1/U2 still have to be connected to Vdd, drawing a small current?

Ken

 

crutschow

Joined Mar 14, 2008
34,201
But you don't show any power for U1/U2. When Vdd is supplied, but the output to the load is OFF, doesn't U1/U2 still have to be connected to Vdd, drawing a small current?
Yes.
But the CD4011 data sheet states that the quiescent current is less than a microamp, which will be insignificant for all but the smallest battery source.
 
Top