1

I have my Pi 3 powered over the 40 pin header, and my project makes use of all of the GPIO pins.

Is there a good way to tell just over the 40 pin header whether the Pi is powered on? I figured it could be possible to tell through power consumption or something similar. I'm trying to use this information to control the Teensy & relay I'm using to turn it on and off.

Is it possible to turn it on and off also just via the 40 pin header and skip the relay? I remember there was a reset pin, which should be usable to turn on a powered off Pi since application GPIO pin mappings only take effect once the Pi is started/the application loaded afaik? I found examples for how to restart and shutdown but not power on.

2 Answers 2

2

On a Raspberry Pi 3 B you can get the power status from Pin 6 (Ground) and 8 (Txd). These are often used to add a status LED.

Pin 6 is the third one down on the right and pin 8 is the fourth one down on the right.

4
  • 1
    I think that relies on the UART being in use on that pin. There is no guarantee of that.
    – joan
    Mar 1, 2020 at 8:43
  • So, my application itself already uses every GPIO pin. I'm assuming I wouldn't be able to stack them somehow?
    – ieatpizza
    Mar 1, 2020 at 9:34
  • 1
    @ieatpizza - so your application uses every pin, and you want to know if there's a pin you can use to determine whatever it is you want to determine ... you see the problem - if you're already using every pin, then how can a pin do something else? Mar 1, 2020 at 9:39
  • I was just wondering if it was possible to determine this by looking at power consumption or something similar, figuring a halted Pi would be using far less power. Or if I could get it to turn off its 3.3v port or something on shutdown then use that as my power indicator. :)
    – ieatpizza
    Mar 1, 2020 at 9:42
2

If the Pi is powered on there will be voltage on the 5V pin (and usually the 3.3V pin although the Pi4 can power this off).

The Pi has NO power control so by definition it is ON if you apply power.

This is presumably not the answer you expected, and you probably want to know if the SoC is running. The Pi can be powered on but shutdown (or halted).

The latter is more problematic - you can get the Pi to assert a signal when shutdown but this is more of a transient signal to enable control of external circuitry.

There are many suggested indicators that the Pi is running, but none are particularly reliable, and depends on configuration.

There are various restart options depending on model and how/if the Pi was shutdown.

I could continue with more options, which differ by Pi model - you should ask a more specific question about what you actually want to do.

If you are using all GPIO there are no options other than cycling power or pulling the Reset pin (misleadingly labelled RUN) low.

2
  • It's a RPi 3 Model B, there's a separate Teensy used to control power on the project. When the battery level drops to a certain % the Teensy sends a 'shutdown' message to the Pi and waits 30 seconds. When turning the Pi back on, the battery wasn't fully dead, so I was going to have it turn off then turn back on the relay providing power to the Pi. Was just wondering if there was a more effective way of doing this.
    – ieatpizza
    Mar 1, 2020 at 9:49
  • Do not add detail in Comments - edit your Question. If you are cutting power the Pi will reboot when power is applied.
    – Milliways
    Mar 1, 2020 at 10:21

Your Answer

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

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