0

I would like to control power of a Raspberry Pi 4 using another Raspberry Pi 4. Each Raspberry Pi is powered by its own official Raspberry power supply, to make sure each one gets enough power.

It should be possible to force a shutdown and power up the slave-Pi4 afterwards again. This has to work even when the slave-Pi OS is frozen.

Reason is: I'm building a Continuous Integration pipeline, where the master prepares an OS image for the slave-Pi to boot via network/PXE. In case the provided image is broken and fails to boot, the master should still be able to reset the slave to try a new image.

enter image description here

Is it possible to do this using GPIO pins? Which pins should be connected?

1 Answers1

2

You cannot do this with the standard 40-pin header. Per this link, there is a RUN pin on all Raspberry Pi 2, 3, 3+, 4, and Zero/Zero W boards that will restart them.

It is labelled RUN, and bringing it to GND will cause a reboot an RPi board. Note that it causes a hard reboot, with no opportunity for shutdown.

I am not certain, but specifically I think pulling RUN low will cause a halt/lockup, then releasing it to float allows it to reboot. But you should test this out to be sure. I'm also not sure if you must let it float or if it's OK to pull to HIGH. Again, you should test, and then built your circuit accordingly.

Note again this pin is not on the 40-pin header, and where you can find it varies by board model. Here is a picture of it on the RPi 2. Here it is on the RPi 3 (along with code and wiring that you may wish to investigate because it does what you want). It's not called out in the picture, but here you can see it on a Zero in the upper right hand corner. Here it is on a 4, next to a global_en pin that might also interest you.

Jeremy Impson
  • 283
  • 1
  • 3
  • 9