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

    DUET3 any pin to detect poweroff and aid Zbraking?

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    @dc42 @phaedrux
    8
    22
    1.3k
    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.
    • Phaedruxundefined
      Phaedrux Moderator @engikeneer
      last edited by

      @engikeneer said in DUET3 any pin to detect poweroff and aid Zbraking?:

      Just send G29 S1 after you have homed to Z max to load the heightmap

      As long as the Z0 point is the same when homing with Z max and homing with the probe, this will work just fine.

      The best way to ensure this is to have a macro that homes z using the probe and then moves to Z max and sets the actual Z axis length so that when the Z max endstop is used the position is correct.

      Example

      ; 0:/macros/Bed Leveling/0_Set Zmax height.g
      ; Automates measuring the Zmax height for optical endstop at ~300mm
      ;
      M291 P"This will set Z0 and calibrate Zmax height" R"Proceed?" S3
      M291 P"Homing all axis" T5
      G28			; Home all
      G90			; Absolute positioning
      M98 P"0:/macros/0_Center Nozzle.g"	; Move nozzle to bed center	
      M291 P"Adjust nozzle height until it's touching bed" Z1 S3
      G92 Z0 			; set Z0
      M291 P"Bed will now drop to Z300" S3
      G1 Z300			; Move bed down 300mm
      G1 S3 Z300 F200
      M500 ; save m208 value for z axis to config override
      M291 P"Adjust optical endstop flag until light just turns off" R"Set Zmax=300mm" S3
      M291 P"ZMax homing will now be tested, starting with homing Zmin" S3
      M291 P"Homing to Zmin" T5
      G28 Z
      M291 P"Ready to test Zmax homing?" R"Proceed?" S3
      M291 P"Homing to Zmax" T5
      M98 P"0:/macros/2_HomeZMax.g" ; Test Zmax homing
      M291 P"ZMax homing test complete. Printer will now home all." R"Proceed?" S3
      G28	; Home all
      M291 "ZMax calibration complete." S3
      

      Z-Bot CoreXY Build | Thingiverse Profile

      JayTundefined 1 Reply Last reply Reply Quote 2
      • o_lampeundefined
        o_lampe @JayT
        last edited by

        @jayt said in DUET3 any pin to detect poweroff and aid Zbraking?:

        What I understood from heightmap is its for mesh bed compensation. Even if I reload map using G29, how will it get applied when I resume print after power failure ? Can you elaborate on this for me please?

        I never had a power failure, but fom what I know, the last position is stored on SD.
        After homing to Z-max and applying G29 S1 but before hitting the resurrect button, you can direct the nozzle to that position and see if it's reasonable. With a little luck you are somewhere in the infill so it's safe to do minor adjustments to the position if needed.

        Worst case in a power failure scenario is the bed temp dropping to a point where it's almost certain you'll kick off the part when you continue printing.
        If you see power grid failures often where you live, it's probably safer to use a backup battery. (old e-bike or RC hobby LiPo batteries)

        A more advanced πŸ˜‰ solution would be an automatically compensated counterweight : You'd install two empty buckets as counterweights for the empty bed and during print you fill them with water to compensate for the filament weight. A peristaltic pump parallel to the extruder could do this. Change mixing ratio for different filament density.
        ...crazy idea, I know 😁

        1 Reply Last reply Reply Quote 1
        • JayTundefined
          JayT @Phaedrux
          last edited by JayT

          Thank you for all the replies. I used M569.7 with one of the out signal, so on power off, the bed fall is now quite less. So I donot wish to include counter balance, but instead check if G29 can help.

          @phaedrux , @engikeneer :
          a) I need a little help to understand what happens when I run G29 S1 on power on, when config is read. From my understanding, this will load the height map, but to perform mesh bed compensation. It does not apply correction to ball screw like we do in bed levelling in one shot right? it will be a correction that will apply at each layer right until taper height?

          b) Suppose first few layers we applied mesh bed compensation. Now after say Xmm height, power goes off.
          Now if I use Zmax homing and resume, will it not resume at proper height? Will there be chances of nozzle hitting the print due to compensation applied?

          c) @dc42: Is there a way, the way we save heightmap , we can use this to run Auto-level on power up by updating few things in the firmware? I am ready to try if there is a way?

          Phaedruxundefined 1 Reply Last reply Reply Quote 0
          • Phaedruxundefined
            Phaedrux Moderator @JayT
            last edited by

            @jayt G29 S1 should not be used in config.g. The heightmap should only be loaded after your Z axis has been homed. In the case of power loss resume, the correct place to load it would be in the resurrect-prologue.g file after the Z axis has been rehomed.

            Z-Bot CoreXY Build | Thingiverse Profile

            JayTundefined 1 Reply Last reply Reply Quote 1
            • JayTundefined
              JayT @Phaedrux
              last edited by

              @phaedrux : ok understood.
              Can you clarify one more question, IF we define taper height, and after Zmax home-> resume-> it will again apply correction for defined taper height right?
              i.e. if taper height is 10, then on resume if Zprinted is >10mm, it will again apply correction for 10mm ?
              (I know this is silly question, but I am new to this topic. )

              Phaedruxundefined engikeneerundefined 2 Replies Last reply Reply Quote 0
              • Phaedruxundefined
                Phaedrux Moderator @JayT
                last edited by

                @jayt said in DUET3 any pin to detect poweroff and aid Zbraking?:

                it will again apply correction for defined taper height right?
                i.e. if taper height is 10, then on resume if Zprinted is >10mm, it will again apply correction for 10mm ?

                That sounds correct to me.

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 0
                • engikeneerundefined
                  engikeneer @JayT
                  last edited by

                  @jayt no, it will only apply correction from z=0 to z=10 (in decreasing amounts). So if you resume a print at z =50, no correction will occur

                  E3D TC with D3Mini and Toolboards.
                  Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
                  i3 clone with a bunch of mods

                  JayTundefined 1 Reply Last reply Reply Quote 2
                  • JayTundefined
                    JayT @engikeneer
                    last edited by JayT

                    @engikeneer @Phaedrux : Both of yours answers are contradictory 😟
                    Can you check if you have these settings in place?

                    @dc42 : Any way to apply last learned deviation corrections, after Zmax homing , on power up , by changing RRF? I tried to check few files, in Zleadscrewkinematics.cpp, can we use function: "Write ResumeSetting()" to call function that applies last learned corrections (if saved) ? Do you suggest to do so?

                    oozeBotundefined Phaedruxundefined 2 Replies Last reply Reply Quote 0
                    • oozeBotundefined
                      oozeBot @JayT
                      last edited by

                      @jayt In the original thread you linked, there are photos we posted of an early prototype which used a bank of relays to assist in z-braking. We gave up on that idea and worked with LDO to create a high torque stepper with integrated 24v brake.

                      IMG-7122 (1).png

                      We are having great success with these steppers and the new motor brake functionality in the 3.4 betas. We'll be selling these on website as soon as it launches, but please reach out now if you think it could help you as we have them in stock. FYI - the specs are

                      • class H (high temp)
                      • 1.8Β° step angle
                      • 8.5Kg-cm Holding Torque
                      • 2.0 amp
                      • 24v 5w electromechanical brake
                        • 50ms on/off delay
                        • 6Kg-cm Holding Torque
                      1 Reply Last reply Reply Quote 1
                      • Phaedruxundefined
                        Phaedrux Moderator @JayT
                        last edited by

                        @jayt said in DUET3 any pin to detect poweroff and aid Zbraking?:

                        @engikeneer @Phaedrux : Both of yours answers are contradictory
                        Can you check if you have these settings in place?

                        I misread your question. @engikeneer is correct.

                        Z-Bot CoreXY Build | Thingiverse Profile

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