• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    deckingman @wilriker
    last edited by 4 Sept 2018, 18:21

    @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

    undefined 1 Reply Last reply 4 Sept 2018, 18:31 Reply Quote 0
    • undefined
      wilriker @deckingman
      last edited by 4 Sept 2018, 18:31

      @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
      • undefined
        Phaedrux Moderator
        last edited by 4 Sept 2018, 19:10

        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

        undefined 1 Reply Last reply 4 Sept 2018, 19:40 Reply Quote 0
        • undefined
          wilriker @Phaedrux
          last edited by 4 Sept 2018, 19:40

          @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

          undefined 1 Reply Last reply 4 Sept 2018, 19:46 Reply Quote 0
          • undefined
            Phaedrux Moderator @wilriker
            last edited by Phaedrux 9 Apr 2018, 19:47 4 Sept 2018, 19:46

            @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

            undefined 1 Reply Last reply 4 Sept 2018, 20:08 Reply Quote 0
            • undefined
              wilriker @Phaedrux
              last edited by 4 Sept 2018, 20:08

              @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
              • undefined
                RCarlyle
                last edited by 4 Sept 2018, 23:13

                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.)

                undefined 1 Reply Last reply 5 Sept 2018, 11:12 Reply Quote 0
                • undefined
                  wilriker @RCarlyle
                  last edited by 5 Sept 2018, 11:12

                  @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

                  undefined 1 Reply Last reply 5 Sept 2018, 15:00 Reply Quote 0
                  • undefined
                    RCarlyle @wilriker
                    last edited by 5 Sept 2018, 15:00

                    @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.)

                    undefined 1 Reply Last reply 5 Sept 2018, 17:35 Reply Quote 2
                    • undefined
                      wilriker @RCarlyle
                      last edited by 5 Sept 2018, 17:35

                      @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
                      • undefined
                        wilriker
                        last edited by 5 Sept 2018, 18:13

                        @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

                        undefined 1 Reply Last reply 5 Sept 2018, 21:10 Reply Quote 0
                        • undefined
                          dc42 administrators @wilriker
                          last edited by 5 Sept 2018, 21:10

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