You are not logged in.

#1 2020-03-07 08:22:34

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Graceful Shutdown

Powering off Raspberry Pi without proper shutdown could cause SD card corruption and force users to reflash SD cards time to time. NanoDLP supports shutdown GPIO since early versions and since 2017 Raspberry Pi firmware supports graceful shutdown.

NanoDLP listens to GPIO if state of GPIO changed to the required state, it will shutdown the printer during the idle mode and during the print it will just stop the printer.

To complete power-off it is possible to use Raspberry Pi kernel parameters (config.txt) to let external controller know that Pi is switched off. So it can cut the power completely.
GPIO state changes just after complete Raspberry Pi shutdown.
eg. dtoverlay=gpio-poweroff,gpiopin=20

Offline

#2 2020-03-07 10:36:22

fcollingwood
Member
Registered: 2017-07-11
Posts: 37

Re: Graceful Shutdown

Ideally we'd have a single push button for power - I can't see this working in that scenario

Offline

#3 2020-03-07 17:35:31

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: Graceful Shutdown

Why it does not work?
You push the button, nanodlp detects it send shutdown command to rpi OS. When it gets down CPU set state for poweroff GPIO, external controller send power completely off the printer.

Offline

#4 2020-03-14 09:19:54

fcollingwood
Member
Registered: 2017-07-11
Posts: 37

Re: Graceful Shutdown

Sorry, I wasn't clear.  Ideally you want one push button to turn everything on or off. This would not ne able to turn the printer on again

Offline

#5 2020-03-19 09:03:33

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: Graceful Shutdown

You can do it using "WAKE_ON_GPIO"

Offline

#6 2020-03-19 19:27:12

fcollingwood
Member
Registered: 2017-07-11
Posts: 37

Re: Graceful Shutdown

You can't if the relay that switches the PSU is GPIO controlled. The PSU will be powered down, there will be no power to the Pi.

Offline

#7 2020-03-20 19:18:13

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: Graceful Shutdown

Exactly you need an extra controller.

Offline

#8 2020-03-23 10:45:04

fcollingwood
Member
Registered: 2017-07-11
Posts: 37

Re: Graceful Shutdown

What use will an extra controller be if there is no mains power to the PSU?

It seems that the push to make on/off switch needs to be double pole, one pole applying mains to the PSU (Bypassing the relay), the other controlling the shutdown GPIO.

Offline

Board footer

Powered by FluxBB