Stepper movement, hiccups, and microstepping



  • In a different thread, there was a discussion that kind of jumped off-topic to duet movement hiccups and different microstep settings to reduce them. I wanted to continue that discussion in a different thread as I think it's an area of confusion.

    While my own focus is how this all applies to a delta printer (which has special needs due to carriages having to move much faster at bed edges), I think the topic might be useful to other printer types as well.

    Is a "hiccup" really a bad thing? I understand it essentially means that the duet is trying to send movement steps too fast, but are any movements actually lost, or are things just slowed down? If they are just slowed down, are the movements on all stepper motors still kept in sync? If everything is kept in sync, is there any effective difference between lots of hiccups and just reducing the print speed via M220? (This is probably best answered by @dc42 )

    Viewed like that, couldn't hiccups be viewed only as an "informational" message that the printer is dynamically slowing the print down due to processor limitations? (It's not a problem! It's a feature!)

    On the other hand, if hiccups are A Bad Thing, the only way to reduce them without slowing print speed would be to reduce the resolution of movements - either by using lower resolution stepper motors (1.8 degree vs 0.9 degree) or reducing microstepping (32 vs 64.) This can impact print quality, but I'm not sure by how much. When the difference between 800 steps/mm and 400 steps/mm is 0.00125mm per step, would there be any difference in a 3D printed object even on the extreme edge of a delta build plate?

    Even the difference between 800 steps/mm and 200 steps/mm is 0.00375mm per step. What kind of difference would that show at the edge of a delta build plate? 0.01mm? Is there any "FDM" 3D printer that doesn't already have a margin of error at least that big just as a result of the plastics we're melting?

    I guess what this comes down to is: While "reducing speed" is often the Best Solution to a large number of hiccups, which is the better alternative: Reduce the resolution (via reduced microstepping) or just ignore the hiccups?


  • administrators

    When the the processor finds that it has spent more than X microseconds in the step generation interrupt service routine (because as fast as it generates steps, more become due), it resets the move start time forwards by Y microseconds so that it appears that no more steps are due yet, and records a hiccup. This gives the processor a short interval (up to Y microseconds) to attend to other work. So the smooth step pulse train is interrupted with a gap of up to Y microseconds. This doesn't really matter when using stepper drivers because Y is small, as long as hiccups are infrequent. It matters more for step-servo drives. The motors remain synchronised.

    Increasing axis microstepping above x16 is most unlikely to improve print quality. Increasing extruder microstepping above x16 might improve print quality when using an ungeared extruder.



  • @dc42 said in Stepper movement, hiccups, and microstepping:

    When the the processor finds that it has spent more than X microseconds in the step generation interrupt service routine (because as fast as it generates steps, more become due), it resets the move start time forwards by Y microseconds so that it appears that no more steps are due yet, and records a hiccup. This gives the processor a short interval (up to Y microseconds) to attend to other work. So the smooth step pulse train is interrupted with a gap of up to Y microseconds. This doesn't really matter when using stepper drivers because Y is small, as long as hiccups are infrequent. It matters more for step-servo drives. The motors remain synchronised.

    Can you simplify this from what happens internally to what impact a person sees? What this sounds like to me is that when the duet finds that it's running behind in generating steps, it just reschedules and continues. (Hey, I'm running late for my 5 o'clock appointment, so I'll reschedule it for 6 o'clock.)

    If that statement is true, then why would hiccups have any negative impact on print quality? Everything that should happen is still happening - it's just going a little slower. Yet, on this forum I've seen hiccups associate with skipped layers, layer shifting, bad extrusions, solar eclipses and perhaps even that hiccups are influencing political elections in the United States.


  • administrators

    A small number of hiccups is unlikely to impact print quality, except perhaps if you use step-servo drives. However, if the number gets very large then it could result in missed steps and hence layer shifts.


Log in to reply