• 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.
  • ?
    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
                                      • undefined
                                        dc42 administrators @nophead
                                        last edited by 10 Jul 2019, 11:47

                                        @nophead said in Testing Power Failure Feature:

                                        @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 depends on the PSU. If it has a single input accepting 110V to 240V without an input voltage selector switch, that will be true when you run the PSU on 220-240V mains, but not on 110V.

                                        The half CV^2 applies to adding an output capacitor too. The stepper drivers can work down to less than 10V. If the power failure is detected at 22V, then by the time the voltage has dropped to 10V, 79% of the energy has been extracted from the capacitor.

                                        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, 13:21 Reply Quote 0
                                        • undefined
                                          nophead @dc42
                                          last edited by 10 Jul 2019, 13:21

                                          @dc42 Free range PSUs normally use a PFC boost converter, so the reservoir is charged to the same voltage regardless of the input voltage. Otherwise the main down converter would need run at half the voltage and twice the current necessitating bigger heatsinks, etc.

                                          A standard compliant PSU needs active PFC at these powers anyway, so free range input comes for free as it already has a boost converter to allow it to take sinusoidal current over the full cycle rather than just at the mains peaks.

                                          Cheap PSUs just have a switch and voltage doubler. I haven't come across wide input range PSUs of any size that don't use one of these two techniques, have you?

                                          undefined 1 Reply Last reply 10 Jul 2019, 14:52 Reply Quote 0
                                          12 out of 27
                                          • First post
                                            12/27
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA