Page 1 of 1

Shutdown indicator?

Posted: Thu May 31, 2018 11:37 am
by st0rmforce
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?

Re: Shutdown indicator?

Posted: Thu May 31, 2018 11:58 am
by B.Goode
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.

Re: Shutdown indicator?

Posted: Thu May 31, 2018 12:05 pm
by st0rmforce
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?

Re: Shutdown indicator?

Posted: Thu May 31, 2018 12:33 pm
by thagrol
Have a look at the gpio_poweroff devicetree overlay.

Re: Shutdown indicator?

Posted: Thu May 31, 2018 1:10 pm
by st0rmforce
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