1

For context, I am using a raspberry PI 4 connected with it's charger (edit : I meant power supply, not charger). I wish to be able to turn it on when it receive a high value on a pin (for example,using another raspberry).

I have zero experience with circuits and don't want to fry mi PI so I want to make sure I don't do anything stupid.

from what I understand, it is possible to turn on and off the PI by shorting GPIO pin 3 and GND but in my case, I dont want to short the pins physically but use a software on another PI.

My current settup consist on 2 Raspberry, RA and RB, both have a battery (edit : I meant power supply here too) to have enough power. RA boot normaly and I set one of it's pin High or low with a script. this pin on RA is connected to a pin on RB and I want RB to only boot when this pin is High.

From the documentation I found, (https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README) I can edit my config.txt to set any pin to be used for shutdown but only GPIO3 can be used for boot.

So in the end, can I just add : dtoverlay=gpio-shutdown,gpio_pin=3 to the config.txt of RB and have RA turn it on (and maybe of) by only connecting the pin from RA to GPIO3 on RB ?

Thank you for your attention

2
  • Your question is confusing. You claim to be using a "charger" (you should not use a charger use a power supply) and then powering from battery.
    – Milliways
    Commented Jun 1, 2023 at 23:03
  • You are right, I messed up my translation, i meant a power supply actually
    – camp
    Commented Jun 2, 2023 at 6:37

2 Answers 2

1

Doing something (forcing a signal) to the PI GPIO (and to any electrical or electronic circuit really) requires a "reference" pin, which is this case is GND.

You can do something along the lines of using a NPN transistor acting as a switch, whose base is connected to the PI which will give the turn on command, emitter is connected to ground and collector is connected to both GPIO3 of the controlled PI and a (say) 1k resistor which is connected to +3V3.

This way when the "master PI" issues a high logic level, the transistor/switch will close, effectively shorting GPIO 3 of the second (controlled) PI to ground.

0

You can't "turn off" a Pi without extra circuitry (Pi400 possibly excepted).

The numerous posts about using GPIO pins to shutdown ACTUALLY just halt the CPU; most of the circuitry continues to run (which is why you can restart with GPIO) and it still draws significant current.

As the Pi is NOT "off" it can't be turned "on" - just rebooted.

DO NOT connect any powered circuit to GPIO3; this may damage the Pi.
It is possible to use an open collector transistor to short GPIO3 to Gnd.

There are a number of commercial products to control Pi power.


NOTE it is possible to put the Pi4 into a low power state see https://raspberrypi.stackexchange.com/a/114108/8697 but this requires external circuitry.

2
  • Thank you for your answer ! So I can't reboot my PI by just powering GPIO 3 with another raspberry.
    – camp
    Commented Jun 2, 2023 at 6:51
  • But you can drive a transistor from the other Pi. (It may be possible if you use a diode to isolate the Pi but a transistor is preferable.)
    – Milliways
    Commented Jun 2, 2023 at 6:56

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.