[Guide] How To Select Extruder Microstep Setting



  • As part of the thread Extruder Linearity a calculator has been developed to calculate the optimal/minimum extruder microstep setting. The original spreadsheet has been converted into an online version and can be found at

    microstep-calculator

    If you find any issues or have ideas for improvements please reply in this thread (preferred) or open an issue at the corresponding GitHub issues page.



  • Just playing around with values inglcan already see that someone printing miniatures with tiny nozzles and layer heights could potentially gain from using higher microstepping. Tomorrow I'll do some test slicing to see what kind of move distances I would get if I were to try out my 0.15mm nozzle.



  • One thing that might potentially be a problem is will the stepper a actually move 1 256th of a microstep? This is purely conjecture but I'd imagine that those little pancake steppers that have become quite popular and which might be a bit borderline on torque, would maybe struggle to move at very high microstepping. Just something to bear in mind when testing.....



  • @deckingman I added this concern as another note to the page.



  • To make it simpler to find very short print moves in GCode files I just created a small tool that does that for you. It is a command-line tool but I provide a version for the three major operating systems.

    You can find it at Print Move Distance Statistics as source code in Go and readily compiled releases at GitHub releases.

    You feed it with GCode files like

    $ pmds --summary *.gcode
    

    and it will output the statistics similar to the following

    Summary
    Shortest Print Move: 0.0009mm
    Average Print Move: 1.8779mm
    Longest Print Move: 179.5543mm
    Percentiles:
      1% of print moves are <= 0.0127mm
      2% of print moves are <= 0.021mm
      3% of print moves are <= 0.0408mm
      4% of print moves are <= 0.0524mm
      5% of print moves are <= 0.0726mm
      6% of print moves are <= 0.0971mm
      7% of print moves are <= 0.1212mm
      8% of print moves are <= 0.1414mm
      9% of print moves are <= 0.157mm
     10% of print moves are <= 0.1745mm
     15% of print moves are <= 0.2047mm
     20% of print moves are <= 0.2254mm
     25% of print moves are <= 0.2614mm
     30% of print moves are <= 0.286mm
     35% of print moves are <= 0.3179mm
     40% of print moves are <= 0.3431mm
     45% of print moves are <= 0.3779mm
     50% of print moves are <= 0.4254mm
     55% of print moves are <= 0.4801mm
     60% of print moves are <= 0.5532mm
     65% of print moves are <= 0.6434mm
     70% of print moves are <= 0.7581mm
     75% of print moves are <= 0.9123mm
     80% of print moves are <= 1.0678mm
     85% of print moves are <= 1.6035mm
     90% of print moves are <= 2.9938mm
     95% of print moves are <= 5.5499mm
    100% of print moves are <= 179.5543mm
    

    At the top you have regular simple values like min, max and average. Below that you will find a percentile distribution of the values. Every higher percentage always includes all values from lower percentages. In the above example this means 8% of all print moves are shorter or equal to a distance of 0.1414mm for all input files (if you omit the --summary parameter in the command it will additionally output one such statistic per file).

    I chose to make the percentiles denser at the start as we worry more about short moves then longer ones.

    I will also link this tool on the calculator website later. EDIT: Done!

    What do you think?

    EDIT: Just if you are curious: the base for the example output above where nearly all gcode files I currently have on my Duet's SD Card. 136 MiB in 37 files including a Benchy. 😉 These were all sliced with versions of Cura between 3.2.1 and 3.4.1.



  • Aaand already the first bug fix release. 😁



  • Update for microstep-calculator

    I just added another column to the result table (to the left of max retraction speed) that will give you the shortest possible print move with the selected settings where number of microsteps for the extrusion is exactly 1.



  • @deckingman Since thinking about this stuff and implementing the calculator I already switched my extruder from 16x w/I to native 256x microstepping. I never before had stallGuard log any stalls (although it was configured to do so for a long time). Today I had my first print with the new setting and my GCode console was plastered with stall warnings, so definitely it reduces torque - though it does not really have to mean that there were actual stalls it might just be that the sensitivity setting is to sensitive now. I will have to examine the print for quality later.

    Anyway your theory on this definitely has some reality. 👍



  • Ok, my first print with 256x microstepping has massive under-extrusion. This means stall warnings were actual stalls and not just the setting being too sensitive.

    According to the calculator for my extruder the shortest print move would be slightly over 0.3mm (X-Y distance). According to the result of my analysis tool as listed above there are about 35% of moves in my GCODE files that are shorter, yet I never suffered from under-extrusion this much.

    I know think that RRF combines several G1 commands into one continuous print move.
    So, I wonder now if I should port this functionality to my tool because currently it does not represent actual print moves by the printer but only what the slicer did. Or should I abandon my analyzer tool altogether?

    Any thoughts, anyone?



  • I'm curious what current you're running your extruder motor at. 85% of rated?

    Wouldn't combining the G1 moves lead to longer extrusion and less missed steps anyway? Or am I missing what that really means?

    Perhaps 128 is the better way to go as DC42 has suggested elsewhere.



  • @phaedrux Actually I run then at 77.7% of rated current, i.e. 700mA of 900mA. Since the Duet will only use increments of full 100mA anyway, I won't get any closer.

    I will retry the same print with 128x and probably also with 16x+I.

    Also I still use my ungeared MK8 extruder with only about 97 steps/mm which might also be another factor here.

    EDIT: regarding the combining of commands: yes, this leads to longer extruder moves with less skipped steps and makes it possible to reach higher speeds as you do not have to accel/decel all the time. But this also means that GCODE in the file can contain arbitrary short moves that in reality will be merged into other moves. So my tool does only show what goes into RRF but not how the motors will actually be commanded.



  • @wilriker said in [Guide] How To Select Extruder Microstep Setting:

    Ok, my first print with 256x microstepping has massive under-extrusion. This means stall warnings were actual stalls and not just the setting being too sensitive.

    According to the calculator for my extruder the shortest print move would be slightly over 0.3mm (X-Y distance). According to the result of my analysis tool as listed above there are about 35% of moves in my GCODE files that are shorter, yet I never suffered from under-extrusion this much.

    I know that RRF combines several G1 commands into one continues print move.
    So, I wonder now if I should port this functionality to my tool because currently it does not represent actual print moves by the printer but only what the slicer did. Or should I abandon my analyzer tool altogether?

    Any thoughts, anyone?

    Are sure about the firmware combining G1 commands into one continuous move? That seems highly unlikely to me.

    I'm not seeing any stall warnings but maybe I'm not looking in the right place. Where are you getting them from and are they during print moves or the more rapid retract moves?

    Anyway, that aside, try 128 x instead of 256 x.



  • @deckingman I am not a 100% certain about this TBH. Maybe that's the point where @dc42 could step in. 😉

    To get stall warnings you have to enable them in the first place with M915 P3 S1 R1 where the R1 is the part that enables the logging. Then they will just be send to GCODE console as well as pop-up messages in DWC.



  • @wilriker said in [Guide] How To Select Extruder Microstep Setting:

    Also I still use my ungeared MK8 extruder with only about 97 steps/mm which might also be another factor here.
    ................

    Yes, that'll definitely screw things up. Geared extruders such as E3D Titans or Bondtech BMGs typically have around 400 steps per mm. So the best thing you could do would be to ditch that ungeared one. You'll need less micro-stepping and you'll also have 3 to 4 times more torque available because of the gearing.



  • @deckingman There is actually a Titan laying on my desk already for a while. I just did not find the time yet to install it (and after some issues with failed "upgrades" to my Y axis a for me unusual never-change-a-running-system attitude had formed - need to get rid of this again 😂 ).



  • @wilriker said in [Guide] How To Select Extruder Microstep Setting:

    @phaedrux Actually I run then at 77.7% of rated current, i.e. 700mA of 900mA. Since the Duet will only use increments of full 100mA anyway, I won't get any closer.

    If you cool you motor you can even get over-current, my motors are rated at 1.7A and they are running at 1.9A, but ever single have 40mm fan behind it. Nothing will happen if you motor runs at 88% if it doesn't get to hot (60-70C is still ok for a Nema17 motor).



  • @dragonn said in [Guide] How To Select Extruder Microstep Setting:

    If you cool you motor you can even get over-current, my motors are rated at 1.7A and they are running at 1.9A, but ever single have 40mm fan behind it................

    ...........and if the cooling fan fails................?



  • @deckingman well then probably my motor will demagnetize :D, I have a plan replace then with 2.5A motors. I am not saying this is a good idea :P, just wonted to point out that running motor 3% over recommend 85% is really nothing bad.



  • @dragonn said in [Guide] How To Select Extruder Microstep Setting:

    @deckingman ............... just wonted to point out that running motor 3% over recommend 85% is really nothing bad.

    Possibly not, but you are running 1.7A rated motors at 1.9 amp which is nearly 12% over their maximum, rather than 15% under . So that's about 27% higher than the Duet recommendation. Personally I wouldn't consider that to be safe for so many reasons but hey - it's your printer and your house.



  • @dragonn As I usually have no issues with torque on my extruder except for the change to 256x microstepping I don't think I need to go over its rating - also I already have a replacement with gearing ready to install.

    Of course I could go to 800mA and even 900mA and it is currently mounted on a metal extruder carriage so no risk that heat would damage anything but the motor itself but again I don't see a need yet.

    But thanks nevertheless for pointing out that I actually could get closer to 85% by going to 800mA. Never really thought about that. 😂


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.