# Z backlash compensation available?

**URL:** <https://klipper.discourse.group/t/z-backlash-compensation-available/13802>\
**Category:** Features\
**Created:** [February 4, 2024, 5:11am UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802 "2024-02-04T05:11:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![remarkable\_sir](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@remarkable\_sir](https://klipper.discourse.group/u/remarkable_sir)\
**Post date:** [February 4, 2024, 5:11am UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/1 "2024-02-04T05:11:03Z")

</div>

Hi all,

I have trouble with pretty bad backlash on my z axis. Between 1 and 2/10th mm is potentially causing a bad first layer doing the bed mesh.

Is backlash compensation somewhere available as a feature? Marlin has it I think.

These zero backlash nuts won’t work for me because of the heavy bed assembly.

Any other ideas are appreciated!

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [February 4, 2024, 7:34am UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/2 "2024-02-04T07:34:38Z")

</div>

Using the forum search:

> [@Backlash Compensation](https://klipper.discourse.group/t/backlash-compensation/7695):
>
> I would like to implement backlash compensation and looking for guidance on where to start. I have been looking at the Klippy code for moves, but think this would be best in the mcu code. Essentially anytime a direction of a stepper motor is changed, it would first move by the amount of backlash compensation. Can anyone offer me guidance of where in the code should I start?

---

<div class="post-metadata">

**Author:** ![remarkable\_sir](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@remarkable\_sir](https://klipper.discourse.group/u/remarkable_sir)\
**Post date:** [February 4, 2024, 8:43am UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/3 "2024-02-04T08:43:42Z")

</div>

Yes, I found the thread before.  
I’m not looking for software development but rather for some plug&go solution.

It might not exist and I will focus on mechanical enhancements.

Just checking before I proceed.

PS: Marlin firmware seems to use this feature. Anybody knows if it does wonders?

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [February 4, 2024, 9:40am UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/4 "2024-02-04T09:40:24Z")

</div>

I will never understand this reflex of 99% of the users to request software compensation for shortcomings in the hardware.  
This is always:

- a band-aid at best
- will only work under certain conditions
- needs to rely on previous (manual) measurements that are inherently error-prone and the errors will add up

---

<div class="post-metadata">

**Author:** ![remarkable\_sir](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@remarkable\_sir](https://klipper.discourse.group/u/remarkable_sir)\
**Post date:** [February 4, 2024, 9:57am UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/5 "2024-02-04T09:57:23Z")

</div>

I’m happy to order parts today but in the meantime it would be nice to have some mitigation for this.

Totally agree though on improving the mechanism but I have to find out and develop something. I think nobody have done it before on my printer model

---

<div class="post-metadata">

**Author:** ![morpheby](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/morpheby/32/10949_2.png) [@morpheby](https://klipper.discourse.group/u/morpheby)\
**Post date:** [March 24, 2024, 12:41pm UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/6 "2024-03-24T12:41:40Z")

</div>

Just FYI, it’s not always about compensating hardware shortcomings, but also about achieving best quality in non-typical conditions. My printer has belt-driven Z, with auto-measured ~0.25 mm backlash, and manually measured 0.15 mm X and Y backlash. Pro model from the same manufacturer has a XYZ brick for backlash measurement. 0.25 is almost unnoticeable during normal use, but if I want head-lifting, multi-material switching purge on specific Z, job start-pause, accurate bed-level and so on and so on all while keeping the result in best quality with 0.15 mm or less layers, I need the best precision possible. And Klipper seems to be focused on print quality, so lack of backlash compensation seems a little strange.

---

<div class="post-metadata">

**Author:** ![olhev](https://avatars.discourse-cdn.com/v4/letter/o/54ee81/32.png) [@olhev](https://klipper.discourse.group/u/olhev)\
**Post date:** [March 27, 2024, 1:36pm UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/7 "2024-03-27T13:36:32Z")

</div>

Non typical condition are rare by definition, and the limited developer time would be wasted on features few people would use.  
However contributions are welcome, assuming enough users are then willing to test them to let the reviewers know that the changes are safe.

---

<div class="post-metadata">

**Author:** ![mati\_123\_321](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@mati\_123\_321](https://klipper.discourse.group/u/mati_123_321)\
**Post date:** [April 16, 2024, 1:57pm UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/8 "2024-04-16T13:57:37Z")

</div>

Hi. A while back I created a post processing script to add backlash compensation to the gcode, it’s being run on the slicer-end instead of the printer-end, but it should work well in most cases.

> **[GitHub - Matszwe02/PrusaSlicer-backlash-compensation-script: script for...](https://github.com/Matszwe02/PrusaSlicer-backlash-compensation-script)**
>
> script for backlash compensation. Contribute to Matszwe02/PrusaSlicer-backlash-compensation-script development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![ray\_boy](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@ray\_boy](https://klipper.discourse.group/u/ray_boy)\
**Post date:** [April 21, 2024, 11:32pm UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/9 "2024-04-21T23:32:33Z")

</div>

I would argue that klipper is not a welcoming place for PRs and contributions. The github is littered with hood ideas and PR effort that is second guessed to death or ignored due to lack of resource.

---

<div class="post-metadata">

**Author:** ![remarkable\_sir](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@remarkable\_sir](https://klipper.discourse.group/u/remarkable_sir)\
**Post date:** [April 25, 2024, 3:02am UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/10 "2024-04-25T03:02:16Z")

</div>

Hi all, just to let you know I run a pretty standard core xy printer with mono z drive that actuates 2 z spindles via belt.

To get first layer consistency was a nightmare.  
The xy platform was also binding a bit that emphasized the backlash error.

I got rid of my problem with careful adjustment and also replacing the trapezoid spindle with 2 ballscrew spindles.

The measured backlash changed from 0,18mm to 0,007mm 🤘

Would still be nice to have Klipper built in software compensation for special cases.

 ![IMG_2862](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/3/3f76f471a1da4b0d352e3a06351f164dd7e7a67a.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [June 24, 2024, 3:02am UTC](https://klipper.discourse.group/t/z-backlash-compensation-available/13802/11 "2024-06-24T03:02:46Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
