Homing Z in full steps
-
Is it possible you're hitting mechanical resonance with full-stepping? Screws rigidly coupled to the motor can be a MAJOR resonance issue with full-stepping or half-stepping.
Another question is whether your commanded move rate is hitting a step-doubling frequency -- if you are commanding full steps and the Duet is sending two step pulses at a time due to high frequency, that's not going to work at all. But I don't imagine this is happening at low speeds.
Overall though, I'm not sure I think there is any benefit to what you're trying to do. What's important to Z quality is setting your layer heights to a multiple of full steps so every layer occurs at the same microstep index, not necessarily only doing layers at full step positions. Angle errors attributable to microstepping (eg driver current control issues and detent torque variation) are fully repeating by microstep index. Microstep 7 always has the same error, microstep 13 always has the same error, etc. And torque doesn't vary by a meaningful amount: every microstep position provides about +/-5% as much torque as the full steps.
-
@rcarlyle said in Homing Z in full steps:
Is it possible you're hitting mechanical resonance with full-stepping? Screws rigidly coupled to the motor can be a MAJOR resonance issue with full-stepping or half-stepping.
I have them coupled with one of these flexible aluminium couplings. I would not count this as being too rigid. But as a matter of fact I ordered new parts today to switch this to a 1:2 geared belt-driven assembly.
Another question is whether your commanded move rate is hitting a step-doubling frequency -- if you are commanding full steps and the Duet is sending two step pulses at a time due to high frequency, that's not going to work at all. But I don't imagine this is happening at low speeds.
At the lowest limit of RRF 30mm/min I cannot imagine this to be the cause.
Overall though, I'm not sure I think there is any benefit to what you're trying to do. What's important to Z quality is setting your layer heights to a multiple of full steps so every layer occurs at the same microstep index, not necessarily only doing layers at full step positions. Angle errors attributable to microstepping (eg driver current control issues and detent torque variation) are fully repeating by microstep index. Microstep 7 always has the same error, microstep 13 always has the same error, etc. And torque doesn't vary by a meaningful amount: every microstep position provides about +/-5% as much torque as the full steps.
Now this is very interesting. I always understood this recommendation that the motor should be used at its native full-step positions.
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.
-
@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.
-
@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.
-
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.)
-
@phaedrux said in Homing Z in full steps:
(i.e. Stiff bed, high steps per mm, single Z motor.)
And I'm out.
-
@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
-
@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.
-
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.)
-
@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.
-
@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.)
-
@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.
-
@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?
-
@wilriker, you may also need to reduce acceleration when using full steps.