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

Testing Power Failure Feature

Scheduled Pinned Locked Moved
Tuning and tweaking
6
27
2.0k
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
    FairladyZ
    last edited by 9 Jul 2019, 07:53

    I setup the power failure feature as described in the wiki. When I send M911 S25 my printer moves up, retracts, and saved the pause location. I then turn my printer off and on and send M916. The printer then rehomes X and Y and resumes printing as I want it to. However, when I unplug the printer this does not happen. It seems that the power runs out too fast for the printer to move or even save anything. When I turn the printer back on and send M916 nothing happens. Is there a better way to test power failure? I've tried unplugging the cord and flipping the power switch.

    1 Reply Last reply Reply Quote 0
    • undefined
      FairladyZ
      last edited by 9 Jul 2019, 08:13

      Running M916 seems to be working now. Strange since I didn't change anything. However, the printer is still not moving or retracting. It seems that it only has enough power left to save the restart data and can't do anything else. Is there anyway to fix this?

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by 9 Jul 2019, 08:24

        What kind of power failure detection circutry are you using?

        1 Reply Last reply Reply Quote 0
        • undefined
          DocTrucker
          last edited by 9 Jul 2019, 09:10

          Can or do you kill the heaters as soon as the warning is raised? May buy you a little time before the PSU drains to a voltage level that is too low to run the steppers.

          Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

          undefined 1 Reply Last reply 9 Jul 2019, 12:03 Reply Quote 0
          • undefined
            FairladyZ @DocTrucker
            last edited by 9 Jul 2019, 12:03

            @doctrucker Currently I run "M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" on detection of power failure.

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User
              last edited by A Former User 7 Sept 2019, 12:10 9 Jul 2019, 12:09

              That only reduces the motor currents. Are you perhaps supplying AC to the heaters, if not they need to be shut down to conserve whatever energy is left in the power supply output buffer. (Although not sure if 0% is the best target)

              undefined 1 Reply Last reply 9 Jul 2019, 12:55 Reply Quote 0
              • undefined
                FairladyZ @A Former User
                last edited by 9 Jul 2019, 12:55

                @bearer I added "M104 S0" to the M913 command in the config.g file and have not seen any changes

                1 Reply Last reply Reply Quote 0
                • ?
                  A Former User
                  last edited by 9 Jul 2019, 13:04

                  That brings me back to exactly what kind of hardware is doing the power loss detection, and what kind of power supply is in use? It may well be the supply just doesn't have enough power after the fact.

                  undefined 1 Reply Last reply 10 Jul 2019, 08:02 Reply Quote 0
                  • undefined
                    Phaedrux Moderator
                    last edited by 9 Jul 2019, 16:42

                    12v or 24v?

                    Z-Bot CoreXY Build | Thingiverse Profile

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      FairladyZ @A Former User
                      last edited by 10 Jul 2019, 08:02

                      @Phaedrux 24v
                      @bearer That is most likely the case. I have decided that since it saves the restart data and I am able to restart the print as long as the print head being close to the print does not ruin anything, I will leave this project until later. I think I should look into a different power supply but at this point I am fairly happy with how it works currently.

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User
                        last edited by 10 Jul 2019, 08:04

                        Adding capacitors to the existing supply could help, but how effective it wold be would entirely depend on how the power loss is detected in the first place.

                        undefined 1 Reply Last reply 10 Jul 2019, 09:29 Reply Quote 0
                        • undefined
                          dc42 administrators @A Former User
                          last edited by dc42 7 Oct 2019, 09:38 10 Jul 2019, 09:29

                          @bearer, the Duet detects power loss on-board. The power loss threshold voltage is set in the M911 command. using 24V power, you would typically set it to about 22V.

                          The heaters are automatically turned off when the voltage dips below the threshold set in M911. Typically, the power fail script should use M913 to reduce power to motors other than Z and E, to help save enough power to raise Z and retract filament. See https://duet3d.dozuki.com/Wiki/Setting_up_to_resume_a_print_after_a_power_failure.

                          Duet WiFi hardware designer and firmware engineer
                          Please do not ask me for Duet support via PM or email, use the forum
                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                          undefined 1 Reply Last reply 10 Jul 2019, 09:51 Reply Quote 0
                          • undefined
                            nophead @dc42
                            last edited by 10 Jul 2019, 09:51

                            @dc42 Is there a way to configure another input? I normally use an opto coupler to detect mains zero crossings to get an early warning of mains failure.

                            undefined 1 Reply Last reply 10 Jul 2019, 09:58 Reply Quote 0
                            • undefined
                              dc42 administrators @nophead
                              last edited by 10 Jul 2019, 09:58

                              @nophead said in Testing Power Failure Feature:

                              @dc42 Is there a way to configure another input? I normally use an opto coupler to detect mains zero crossings to get an early warning of mains failure.

                              Not yet, although I plan to add one.

                              Duet WiFi hardware designer and firmware engineer
                              Please do not ask me for Duet support via PM or email, use the forum
                              http://www.escher3d.com, https://miscsolutions.wordpress.com

                              1 Reply Last reply Reply Quote 0
                              • ?
                                A Former User
                                last edited by 10 Jul 2019, 10:00

                                But an arbitrary input assigned to a trigger could get the job done surely, and detecting mains loss instead of voltage sag would make adding capacitance more effective, if needed at all.

                                undefined 1 Reply Last reply 10 Jul 2019, 10:06 Reply Quote 0
                                • undefined
                                  dc42 administrators @A Former User
                                  last edited by 10 Jul 2019, 10:06

                                  @bearer said in Testing Power Failure Feature:

                                  But an arbitrary input assigned to a trigger could get the job done surely...

                                  It wouldn't provide the same near-instant execution that the built-in power failure code does.

                                  Duet WiFi hardware designer and firmware engineer
                                  Please do not ask me for Duet support via PM or email, use the forum
                                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                                  1 Reply Last reply Reply Quote 0
                                  • ?
                                    A Former User
                                    last edited by 10 Jul 2019, 10:22

                                    Interesting, hopefully configurable inputs will be good to go by the time i get around to adding power loss stuff. 👍

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      dc42 administrators
                                      last edited by 10 Jul 2019, 10:36

                                      If we assume that the power draw of the machine after the firmware turns off the heaters and XY motors is 10W (basically the power needed to drive the Z and extruder motors, plus a little for the Duet itself), then adding 10000uF capacitance on the 24V power rail should provide 190ms additional time. On a delta where you can't turn any motors off, it should still provide 100ms extra time; and on a delta the Z move will be fast anyway.

                                      How much extra time would be provided by an external power fail input will depend on the power supply and the nature of the power fail detection.

                                      Duet WiFi hardware designer and firmware engineer
                                      Please do not ask me for Duet support via PM or email, use the forum
                                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                                      undefined 1 Reply Last reply 10 Jul 2019, 10:50 Reply Quote 0
                                      • undefined
                                        nophead @dc42
                                        last edited by 10 Jul 2019, 10:50

                                        @dc42 It is far more effective to use the energy stored in the main reservoir capacitor in the PSU that is charged to 340-400V because E = CV^2, and it can usually drop a long way before the PSU output falls at all. That is why I like to look for two missing mains half cycles when doing power fail detection. On a decent PSU it can give you seconds. I haven't done it on a 3D printer yet though.

                                        undefined 1 Reply Last reply 10 Jul 2019, 11:47 Reply Quote 0
                                        • ?
                                          A Former User
                                          last edited by 10 Jul 2019, 11:00

                                          I was thinking the same ☝
                                          (but thinking usually never leads to anything good 😀 )

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