0

I have a Raspberry Pi 4 and 2.5V power sources.

  • One of the power sources is always on and I would like it to power my Pi.

  • The other one I will be connecting to a 5V to 3V converter and connect it to a GPIO so it could turn the Pi on and off whenever there's power.

I think I have the turn off figured out by writing a script that listens to the GPIO and have it shutdown when the voltage drops.

But how do I have it turn on when the power kicks back in? Is that even possible?

Please try to explain things as layman as possible as I am very new to these kind of stuff.

Rohit Gupta
  • 343
  • 2
  • 4
  • 11
Patrick
  • 9
  • 1

1 Answers1

1

You don't have to write ANY code to shutdown the Pi - the gpio-shutdown functionality is already in the kernel.

You CERTAINLY don't need a second power source.

NOTE this will NOT turn power off - the only way to do that is to turn the power off although there are devices which implement power control using external hardware.

Also note that when shutdown there is still power on the 5V & 3.3V pins.

NOTE Connecting 3.3V from an external source to a GPIO without some protection is inadvisable.

Milliways
  • 62,573
  • 32
  • 113
  • 225