Ideas for 1 second circuit with power and disconnect

Thread Starter


Joined Mar 31, 2024
Hello All,
New to the forum. I have a project I’m working on with a Raspberry Pi 5 which now includes a J2 jumper to create your own extended power button. I would like to create a circuit that when a switch is on, it shorts the 5v J2 jumper for one second to turn it on. When the switch is turned off, it would do the same to power it off. If it‘s held for 3 seconds, it goes into power settings which is not ideal.

The end goal is not really a switch, but a “key” that stays in, connects the circuit to power up and when the key is out the circuit disconnects and powers down.

I was able to play around with this using a momentary button and a 100mA capacitor in series and it did what I needed for button press and hold, but I’m having trouble figuring out the disconnect. I would assume I need to transistor or a relay that powers up a second capacitor and releases on open circuit. I’m also want to make sure I’m making a circuit that is safe for the RPI.