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

    Homing Z in full steps

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    5
    17
    1.9k
    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.
    • deckingmanundefined
      deckingman @wilriker
      last edited by

      @wilriker said in Homing Z in full steps:

      But the only real problem that could arise from not following this assumption would be when the printer lost power and you want to resume. Because even with very precisely repeating endstop switches it is rather likely that it will trigger at another microstep then before. But yeah, this would be off then a worst case of a half full step which is to be ignored anyway.

      So, thanks for clarifying! This saves me from a lot of trouble. 🙂

      I might have got this wrong but I seem to recall reading in another thread that DC42 said on power up, the difference between motors could change by as much as 4 full steps. Can't remember the reason and apologies to DC if I have misquoted him.

      Ian
      https://somei3deas.wordpress.com/
      https://www.youtube.com/@deckingman

      wilrikerundefined 1 Reply Last reply Reply Quote 0
      • wilrikerundefined
        wilriker @deckingman
        last edited by

        @deckingman I remember this as well. But in any way there is a rehoming necessary after power loss and in that case 1 full step off is the same as 120 full steps off because in the end it only counts on which microstep the endstop is triggered and you can never be more than +-0.5 full steps away from the previous homing-trigger-microstep.

        Manuel
        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
        with probably always latest firmware/DWC (incl. betas or self-compiled)
        My Tool Collection

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

          One of the potential benefits of using StallGuard to home the Z axis was that it should ideally stall out on a full step. However, in practice, the suitability for implementation is very printer specific. (i.e. Stiff bed, high steps per mm, single Z motor.)

          Z-Bot CoreXY Build | Thingiverse Profile

          wilrikerundefined 1 Reply Last reply Reply Quote 0
          • wilrikerundefined
            wilriker @Phaedrux
            last edited by

            @phaedrux said in Homing Z in full steps:

            (i.e. Stiff bed, high steps per mm, single Z motor.)

            And I'm out. 😂

            Manuel
            Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
            with probably always latest firmware/DWC (incl. betas or self-compiled)
            My Tool Collection

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

              @wilriker Don't feel bad. I would consider my printer to qualify on all those counts, but I would have to switch from a 3 point bed mount to a 4 point to make the bed solid enough to stall consistently across the bed surface.

              Thinking about the problem, and the way the motors behave, if you really wanted to ensure a fullstep position at the start of your print you could maybe do it manually with a rather unorthodox homing macro.

              • Home the printer as normal to allow safe movement of all axis
              • Use M291 Z1 to move the print head down until it touches the bed
              • Cycle power to the Z motors with M84 Z to force them to jump to the nearest full step
              • Use G92 Z0 to set the z position and re-home Z
              • Start your print

              Z-Bot CoreXY Build | Thingiverse Profile

              wilrikerundefined 1 Reply Last reply Reply Quote 0
              • wilrikerundefined
                wilriker @Phaedrux
                last edited by

                @phaedrux No worries, I don't feel bad. I knew that the printer I started out was acceptable at best with some parts being... less than that. 😁 This machine is for tinkering and I will continue to upgrade it probably until I quit this whole 3D printing and switch to 4D into-existence-thinging. 😂

                Re unorthodox homing macro: I thought of something similar already but after @RCarlyle's clarification I just stopped with this endeavor. 😉 I will just make sure to always use multiples of my full steps (currently 0.04mm and changing to half of that soon). I adjusted all related settings in Cura and also made some macros with appropriate Z hop presets. 🙂

                Manuel
                Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                with probably always latest firmware/DWC (incl. betas or self-compiled)
                My Tool Collection

                1 Reply Last reply Reply Quote 0
                • RCarlyleundefined
                  RCarlyle
                  last edited by

                  Power loss is an interesting case. The detent torque of the motor will make it try to turn to the nearest full step (one coil 100%) position on power loss. So it would power down to full step +A,+B,-A, or -B in the cycle. (Assuming a fine leadscrew thread pitch that is self-locking so the motor is not overhauled by the bed/gantry weight. All bets are off with Tr8x8 and ball screws.) If you're at a half step position, the detent torque is unstable and could send you in either direction. Friction and gravity load may stop you anywhere though.

                  Then on power-up enable, the driver energizes to whatever it considers the index 0 microstep position. Could be +A(100%) full step or on some drivers it could be a +A(71%)+B(71%) half step. (I'm too lazy to check what the older 498x and newer 2660 Duet drivers do but I think it's the latter.) At this point the motor will snap backwards or forwards up to +/-2 full steps from the powerdown position. If you have multiple motors, and one snaps +2 while another snaps -2, there's your 4 full step maximum relative error.

                  Sidenote: terminology on full step vs half step positions is inconsistent. For the physical motor (rotor/stator teeth aligned) the "full step" positions are single-coil-on-100% positions. However, when modern microstepping drivers "full step" they actually use the four half step positions (two-coils-on-71%), because this is a superior way to run the motor. (Less torque ripple, less resonance.)

                  wilrikerundefined 1 Reply Last reply Reply Quote 0
                  • wilrikerundefined
                    wilriker @RCarlyle
                    last edited by

                    @rcarlyle said in Homing Z in full steps:

                    At this point the motor will snap backwards or forwards up to +/-2 full steps from the powerdown position.

                    I don't get why it would move up to +/- 2 full steps even though I at least think I understood all of the rest.

                    Manuel
                    Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                    with probably always latest firmware/DWC (incl. betas or self-compiled)
                    My Tool Collection

                    RCarlyleundefined 1 Reply Last reply Reply Quote 0
                    • RCarlyleundefined
                      RCarlyle @wilriker
                      last edited by

                      @wilriker bipolar two-phase steppers have 50 rotor teeth and four distinct places those teeth can line up with the stator poles. That's how you get to 200 steps per rev. (400 steps/rev motors have 100 teeth instead.) So there are four full step positions for each rotor tooth and the microstepping sequence repeats four times before it starts over for the next rotor tooth. So with 1/16th microstepping there's actually 64 distinct microstep angles with different +/- signs for the coil energization. When you do more than four full steps, that sequence repeats.

                      When you stop the motor, it can stop anywhere in the four step range. But when you power-on enable the driver, it will ALWAYS energize to a particular microstep in that four step range. The motor will jump to the power-on position from wherever it stopped. That means it pulls to the nearest rotor tooth, which can be up to 2 full steps away from the current location. (Half of the four-step sequence.)

                      wilrikerundefined 1 Reply Last reply Reply Quote 2
                      • wilrikerundefined
                        wilriker @RCarlyle
                        last edited by

                        @rcarlyle Thanks! Your detailed explanation plus the animation of a stepper on Wikipedia (visual clues often help me understand things better) I think I got it now. Or at least this will iterate in the back of my mind until I finally understood it. 🙂 👍

                        Manuel
                        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                        with probably always latest firmware/DWC (incl. betas or self-compiled)
                        My Tool Collection

                        1 Reply Last reply Reply Quote 0
                        • wilrikerundefined
                          wilriker
                          last edited by

                          @RCarlyle I just realized that I probably had my motors running at only a little over 25% of their rated current (because I rewired them in parallel and did not double the motor current - see this thread).

                          I guess that would (also) explain why they where just rattling when switching to full steps, wouldn't it?

                          Manuel
                          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                          with probably always latest firmware/DWC (incl. betas or self-compiled)
                          My Tool Collection

                          dc42undefined 1 Reply Last reply Reply Quote 0
                          • dc42undefined
                            dc42 administrators @wilriker
                            last edited by

                            @wilriker, you may also need to reduce acceleration when using full steps.

                            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
                            • First post
                              Last post
                            Unless otherwise noted, all forum content is licensed under CC-BY-SA