• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

A solution to shutdown Duet and SBC

Scheduled Pinned Locked Moved
Duet Hardware and wiring
5
13
905
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    chas2706
    last edited by 22 Nov 2020, 21:09

    If anyone is interested I have a solution that synchronises shutdown between the Duet and SBC.

    Complete shutdown of both Duet and SBC is performed by pressing the atx power button in DWC.

    Without this solution there are two problems, firstly the power relay or SSR does not latch until the pi has fully booted and has run config.g where M80 exists.

    Secondly, there is no facility to shutdown both the SBC and Duet together.

    For the solution you just need an arduino and a relay or SSR of which are very cheap - and a bit of coding for the arduino.

    Anyone interested ?

    If so I will upload the code.

    undefined 1 Reply Last reply 17 Aug 2021, 09:32 Reply Quote 0
    • undefined
      PCR
      last edited by 22 Nov 2020, 21:13

      Have you seen execonmcode?

      1 Reply Last reply Reply Quote 0
      • undefined
        chas2706
        last edited by 22 Nov 2020, 21:17

        @PCR said in A solution to shutdown Duet and SBC:

        Have you seen execonmcode?

        Yes and used it too.
        The problem with that IMO is that all is ok until the next firmware update.
        When it happened to me it caused major problems with the Duet firmware operation. Then you have to disable it and wait for the updated version - and RRF is changing all the time.

        1 Reply Last reply Reply Quote 0
        • undefined
          chas2706
          last edited by 22 Nov 2020, 21:19

          execonmcode would be a great solution if it became a built in plugin and therefore updated everytime.

          ? 1 Reply Last reply 23 Nov 2020, 07:12 Reply Quote 0
          • undefined
            chas2706
            last edited by 22 Nov 2020, 21:25

            ....but you would still have to hold the power button for 30+ seconds on start up until the SBC boots and has read the config.g file that contains the M80 command to latch the power relay or SSR.

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User @chas2706
              last edited by 23 Nov 2020, 07:12

              @chas2706 said in A solution to shutdown Duet and SBC:

              execonmcode would be a great solution if it became a built in plugin and therefore updated everytime.

              you never know, wilriker might just get around to it when the dust settles and the plugin interface is released along with RRF 3.2

              anyways, without having seen the elaborate design, can't help think the arduino is a bit overkill and having the SSR latch before the pi has booted could be solved with a pull up resistor?

              1 Reply Last reply Reply Quote 0
              • undefined
                chas2706
                last edited by 23 Nov 2020, 21:59

                @bearer said in A solution to shutdown Duet and SBC:

                anyways, without having seen the elaborate design, can't help think the arduino is a bit overkill and having the SSR latch before the pi has booted could be solved with a pull up resistor?

                You got me re-visiting execonmcode and wondering why I stopped using it.
                The answer is easy. It is not a solution to enable remote shutdown of the whole system.
                shutdownsbc.service will shut down the SBC but then you cant power off the duet because you no longer connected!
                So my solution involving a £2.50 arduino uno surely cannot be overkill?

                1 Reply Last reply Reply Quote 0
                • undefined
                  dhusolo
                  last edited by 23 Nov 2020, 22:14

                  I'd be interested in checking this out

                  1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User
                    last edited by 23 Nov 2020, 22:46

                    I guess I don't see why the duet can't turn the ssr of itself after having asked the pi to turn off. any feedback the arduino get, the duet could get, or a simple G4 would do the trick to let the pi shutdown with a minimum of grace

                    so it might not be overkill in terms of $, but added complexity imho (without having seen it ofc..)

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      chas2706
                      last edited by 23 Nov 2020, 23:00

                      @bearer said in A solution to shutdown Duet and SBC:

                      I guess I don't see why the duet can't turn the ssr of itself after having asked the pi to turn off. any feedback the arduino get, the duet could get, or a simple G4 would do the trick to let the pi shutdown with a minimum of grace
                      so it might not be overkill in terms of $, but added complexity imho (without having seen it ofc..)

                      Don't get what you saying. How can you shut the rest of the system down after SBC is down? You no longer have connection or control. You could send a G4 delay but then the pi is in shutdown process and duet has no control, the pi is dead. The pi needs to shut down first, then duet. Pi can't shut down duet after it is shut down itself and you now have no control over duet????

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User
                        last edited by A Former User 23 Nov 2020, 23:29

                        If the Duet can't keep a command or two in its pipeline then there is no need to turn the pi off-off*, enough to save whatever state you wanna keep and go read-only before telling the Duet to pull the ssr low, or move the ssr to the Pi. But you've made your point, not gonna beat a dead horse.

                        *)it will poweroff when duet power off the psu, being in a clean state already. if holding a physical button for 30 seconds was the problem to solve then it follows there is no need for a 5v stand-by supply (or it could be powered down along with Vin as it serves no purpose after the Pi is done.

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          chas2706
                          last edited by 23 Nov 2020, 23:35

                          @bearer said in A solution to shutdown Duet and SBC:

                          If the Duet can't keep a command or two in its pipeline then there is no need to turn the pi off-off, enough to save whatever state you wanna keep and go read-only before telling the Duet to pull the ssr low, or move the ssr to the Pi. But you've made your point, not gonna beat a dead horse.

                          My last word.... If you need a complete power down, In your senario you power down the duet and leave the pi shutdown but not powered off. No point beating a dead horse!

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            semi55 @chas2706
                            last edited by 17 Aug 2021, 09:32

                            @chas2706 I would be interested, could you please upload your code?

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Unless otherwise noted, all forum content is licensed under CC-BY-SA