Marlin has an option to fade out the amount of backlash correction, given as BACKLASH_CORRECTION. It is also available in GCode as M425 [F<value>], where 0.0 = none and 1.0 = 100%.

Assuming backlash correction is otherwise well tuned at 100%, when is useful to reduce its effect? Why not always keep it at 100%?

  • 1
    $\begingroup$ Because tuning 100% correct is unlikely and undercompensating is likely preferable to overcompensating, I guess $\endgroup$
    – FarO
    Nov 12 '20 at 12:45
  • $\begingroup$ That would mean backlash correction is not otherwise well tuned at 100%. In this case, why not reduce the root cause of overcompensation, BACKLASH_DISTANCE_MM? $\endgroup$
    – neurozero
    Nov 12 '20 at 22:07
  • $\begingroup$ Wouldn't the same apply to flow rate? The setting is done in the steps/mm, different for each material, but you still have flown rate compensation. $\endgroup$
    – FarO
    Nov 15 '20 at 15:56
  • $\begingroup$ I can think of a use case for a percentage based flow adjustment: it allows hardware independent filament profiles. Different filaments extrude at different rates due to differences in how deep the feeder teeth bite and other factors, but the percentage change per filament may be similar across various machines. Is there a comparable scenario for backlash correction? $\endgroup$
    – neurozero
    Nov 17 '20 at 2:21
  • $\begingroup$ Good point. Open a ticket in GitHub marlin repo so that they can let us know, then post here an answer! $\endgroup$
    – FarO
    Nov 19 '20 at 8:12

The developers explained the use of the M425 code themselves.

We devised a routine for measuring Z backlash automatically during G29 and found that software backlash compensation does wonders for the first layer. However, this comes at the expense of artifacts on the rest of the print. In particular, any rapid motions of the motor to try to take up any backlash will inevitably create a small pause and vibration, leading to a seam in the print. We devised a smoothing algorithm that allowed backlash correction to be gradually applied over a distance, this eliminated any harsh transitions, which again lead to a huge improvement. Alas, we learned that the feature was very sensitive to the variances in the printer build, working amazingly well in some cases, but leading to a degraded quality other printers. This perhaps is a feature that could be used by someone who wished to hand tune the algorithm, but not something we could use in a mass produced printer.


"M425 F" sets a value from 0 to 1 which is multiplied by the backlash distance. This command is meant for use by the slicer, and allows it to "fade" away the backlash compensation gradually over several layers, or to turn it off completely after the first layer (with a "M425 F0").

  • $\begingroup$ Interesting. This answers my question, but makes me wonder how correction moves are treated by the planner. Since they're not intended to actually move the mass of the carriage, it seems to me they could be performed nearly instantaneously and ignored by the planner so the surrounding path gets treated as the smooth curve it is rather than a zig zag. $\endgroup$
    – neurozero
    Nov 21 '20 at 6:28
  • $\begingroup$ It looks like it actually only adjusts existing segments, which is certainly better than a zig zag going through the planner, but even if BACKLASH_SMOOTHING_MM is undefined, it still takes the length of the first segment. $\endgroup$
    – neurozero
    Nov 21 '20 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.