I would like to trigger the new Raspberry Pi 5 power button from an Arduino.

My understanding is that, when pressed, the button connects GPIO #20 to the ground:

pwr_key: pwr {
        label = "pwr_button";
        // linux,code = <205>; // KEY_SUSPEND
        linux,code = <116>; // KEY_POWER
        gpios = <&gio 20 GPIO_ACTIVE_LOW>;
        debounce-interval = <50>; // ms

The PCB also has two pads (picture here) :

The J2 jumper is located between the RTC battery connector and the board edge. This breakout allows you to add your own power button to Raspberry Pi 5 by adding a normally open (NO) momentary switch bridging the two pads. Briefly closing this switch will perform the same actions as the onboard power button.

I think that one pad is the ground. The other is the one that has to be connected to the ground.

My plan is to use a N-channel MOSFET for that. I can choose between AO3400A (datasheet) and 2N7002 (datasheet).


simulate this circuit – Schematic created using CircuitLab

My question is:

– Is it really that simple or am I missing something? – Which MOSFET has the most suitable characteristics between the two, given the choice?

  • \$\begingroup\$ Why would there be ground? The only purpose of such a switch is to cut the power, which literally means cutting the power line, not replacing it with a different signal. \$\endgroup\$
    – Lundin
    Commented May 2 at 11:45
  • \$\begingroup\$ Also a N channel with pull down on the gate would mean that the Arduino must be present in order for the Rasp Pi to work at all. Is that the intention? \$\endgroup\$
    – Lundin
    Commented May 2 at 11:49
  • 1
    \$\begingroup\$ @Lundin The switch is a normally open momentary switch that connects, I think, GPIO 20 to the ground. A process on the raspberry monitors that GPIO and initiates the shutdown when the button is pressed for longer than 50 ms (debouncing time). Pressing the button again initiates the boot sequence. Just like a power unit on a PC. I am designing an ATMEGA-based board that will monitor power and initiate startup and shutdown of several raspberry pi boards, depending on external requirements. The board also drives a display and an input keypad. \$\endgroup\$
    – PeterG
    Commented May 2 at 14:55

1 Answer 1


Confirm that you are connecting one pad to ground make sure it is connected up the right way around, in other words the ground is connected to the ground. Given that it should work fine.

The AO3400A has better performance particularly at low gate voltages but you do not need any sort of performance so the answer is the cheapest or what you have on hand.

  • \$\begingroup\$ Thank you. What do you mean by "connecting the ground up the right way ?" \$\endgroup\$
    – PeterG
    Commented May 2 at 14:59
  • \$\begingroup\$ One of the J2 pads is already grounded. If you mix up your 'to raspberry' connections you'll connect the ground of your circuit to the pwr_on pin. Assuming your circuit is grounded elsewhere it will force pwr_on constantly to ground and be like holding down the power button all the time. \$\endgroup\$ Commented May 2 at 15:12
  • \$\begingroup\$ Yes, of course. I understand. Thank you. I do believe that settles it then. \$\endgroup\$
    – PeterG
    Commented May 2 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.