st0rmforce
Posts: 7
Joined: Wed Mar 02, 2016 11:39 am

Shutdown indicator?

Thu May 31, 2018 11:37 am

I hope this is the best place for this.
Is there a pin can be used, or configured to be used, as an indicator that the pi has finished shutting down?

I'm working on a project with a pi 2 (although I may be swapping it out for a pi 3 at some point, if that matters) that's going to run from an ATX power supply. I'd like the pi to be able to shut everything down when it gets shut down, like a PC does.

Is there any way to do that, or am I going to be forced to keep the pi running forever on the standby rail and control the power-on pin with gpio?
I'd much prefer to run it from the main 5v rail and toggle the power pin when the pi shuts down, but I have no idea if there's any way to tell externally that the safe shutdown is complete.
Any ideas?

[edit] to be honest, I'm not too worried about how long it takes to turn off the power after shutdown, so maybe some kind of pin-flashing program could be run at startup and I could make a circuit to monitor it, then turn off the power a number of seconds after the pin stops flashing?

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Shutdown indicator?

Thu May 31, 2018 11:58 am

maybe some kind of pin-flashing program could be run at startup and I could make a circuit to monitor it, then turn off the power a number of seconds after the pin stops flashing?

In that case your problem is solved, because a number (10?) of steady flashes of the green Activity led, followed by one slightly longer flash, is the standard behaviour of an RPi as the OS shuts down - at least when running the Raspbian Operating System.

st0rmforce
Posts: 7
Joined: Wed Mar 02, 2016 11:39 am

Re: Shutdown indicator?

Thu May 31, 2018 12:05 pm

B.Goode wrote:
Thu May 31, 2018 11:58 am
maybe some kind of pin-flashing program could be run at startup and I could make a circuit to monitor it, then turn off the power a number of seconds after the pin stops flashing?

In that case your problem is solved, because a number (10?) of steady flashes of the green Activity led, followed by one slightly longer flash, is the standard behaviour of an RPi as the OS shuts down - at least when running the Raspbian Operating System.
That sounds like it would be prone to false positives. Plus, is there a pin connected to the activity led?

User avatar
thagrol
Posts: 3078
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Shutdown indicator?

Thu May 31, 2018 12:33 pm

Have a look at the gpio_poweroff devicetree overlay.
Arguing with strangers on the internet since 1993.

st0rmforce
Posts: 7
Joined: Wed Mar 02, 2016 11:39 am

Re: Shutdown indicator?

Thu May 31, 2018 1:10 pm

thagrol wrote:
Thu May 31, 2018 12:33 pm
Have a look at the gpio_poweroff devicetree overlay.
Brilliant, that's exactly what I want :D

Return to “Advanced users”