Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Sensorless detection for Z max

    General Discussion
    4
    12
    796
    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.
    • Torro
      Torro last edited by

      Hi,

      Is there a possibility to activate stall detection for Z max? Z min has a "normal" endstop switch.

      Thanks!

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

        You could create a macro called HomeZmax that configures a Zmax endstop as stall detection, configures the stall detection parameters, configures temporary speed, accel, and jerk settings for the Z axis, reduces motor current, and then does a zmax homing move. All the pieces are there in the documentation to be put together.

        Something like...

        ; HomeZMax.g
        ; Called to home Z to max endstop
        ; Uses the Z axis StallGuard detection as a Z-Probe
        ;
        
        M291 R"Are you sure?" P"Press OK to Home to ZMax. Or Cancel to abort." S3
        M574 Z2 S3			; Set motor stall at the high end for Z Max.
        M915 (whatever driver and stall detetion parameters)
        M201 Z20 ; set whatever z axis acceleration you need for consistent stall detection without triggering false positives
        M913 Z30 ; set lower z motor current
        
        G91				; Relative positioning
        G1 S1 Z330 F300			; Move bed until endstop triggers
        
        M291 P"Probing complete. Restoring settings." S3
        
        M913 Z100   		      				; restore current to 100%
        M201 Z300 						; Restore acceleration
        M915 Z S63 F1 R0					; Set StallGuard sensitivity for normal movement
        M574 Z1 S2						; Use zprobe and home to Z Min.
        

        But this would need to be customzied for your own setup.

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 0
        • jckray
          jckray last edited by

          Yes, this is possible. I used this for a while on my printer but ended up switching to a limit switch as my printer is fully enclosed and when printing high temp materials the temperature inside the enclosure was affecting the stall guard sensitivity. This resulted in a lot of false triggers when homing to z max. If you want to give it a go I described how below.

          In your config.g
          Configure Z max endstop with stall detection via M574
          Configure stall guard sensitivity etc for the Z motor driver using M915

          Now you can home z with something similar to the following

          M400 ; make sure everything has stopped before we make changes
          G91 ; use relative positioning
          G1 S1 Z9999 F1500 ; home z
          G90 ; back to absolute positioning
          M400 ; make sure everything has stopped before we reset the motor currents

          John
          Founder of Hydra Research LLC, developers of the open-source 3D printers and providers of 3D printing services.
          https://www.hydraresearch3d.com/

          1 Reply Last reply Reply Quote 0
          • Torro
            Torro last edited by

            The thing is, my Bed is very heavy and when the Motors are disabled, it falls down. So in the end Script i added a g1 z278 and then Shut off to minimize the impact. 280mm is maximum.
            now, i want the printer to drive slowly to z max and when stall is detected, Motors off and M81.

            I'll try to write something and post it here for check.

            Thanks!

            1 Reply Last reply Reply Quote 0
            • Torro
              Torro last edited by Torro

              I hope that should do it:

              M574 Z2 S3
              M915 P2 S10 F1 R0
              M913 Z40
              G91
              M208 Z300
              G1 S1 Z300 F500
              M18
              M81 S1

              Speeds, Motor current and the S Parameter of M915 are not final. I just guess...
              I need that only when prints are finished.

              Thanks!

              1 Reply Last reply Reply Quote 0
              • Torro
                Torro last edited by

                It works almost...
                the updated value for Z max works and it drives until it "crashes" softly.
                but the Motors try to go further.

                I tried S values from - 40 to 40.
                Z current from 30 to 50%
                Speed at F500 feels good, tried 700, same behaviour.

                The belt does not "jump" ober the pinion.

                is the S value in the Negative area more sensitive? Or the opposite?

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

                  You may need to move faster to get a good stall.

                  Z-Bot CoreXY Build | Thingiverse Profile

                  Torro 1 Reply Last reply Reply Quote 0
                  • fcwilt
                    fcwilt last edited by

                    Hi,

                    If you have a Z-min endstop and you have homed the Z axis you know where Z-max is and you only need to issue a move to that value.

                    Why is that not acceptable?

                    Thanks.

                    Frederick

                    Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

                    1 Reply Last reply Reply Quote 1
                    • Torro
                      Torro @Phaedrux last edited by

                      @phaedrux said in Sensorless detection for Z max:

                      You may need to move faster to get a good stall.

                      that was it! thank a lot!
                      G1 S1 Z300 F3000

                      i had to reduce the acceleration as well. But now, it´s perfect.

                      Now, i could store it in stop.g or in the endscript from s3d. which would you prefer?

                      1 Reply Last reply Reply Quote 0
                      • Torro
                        Torro last edited by

                        is there any other case, than a finished print, that causes to run stop.g?
                        I have to add a M0 in the slicer endscript to activate stop.g , correct?

                        What, if the endscript contains a M81 S1? Has the M0 to stand before or after the M81? i guess before, but "remebers" the duet the command after processing the stop.g?

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

                          I prefer to have all my end gcode contained in stop.g and the slicer only has M0. I use multiple slicers regularly so it's easier to just modify one place than each slicer.

                          You can put your stall code in stop.g and then at the end have M81 S1

                          Z-Bot CoreXY Build | Thingiverse Profile

                          1 Reply Last reply Reply Quote 0
                          • Torro
                            Torro last edited by

                            Ok Thanks again!

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