Feature Request : Z leadscrew mapping

Hello all.

I’ve been fighting a Z-Banding problem in one of my 3d printers for some time. I’ve swapped lead screws and nuts, added many types of Z isolation, motors, alignment, but I always end up in the same place, banding.

It occured to me that there are likely 2 causes that are leadscrew related.

  1. Leadscrew Warp.
  2. Inaccuracies in the threads on the leadscrews or nuts.

To test the positional accuracy (#2) of the leadscrews I fashioned a crude caliper that measures the height of the X gantry at any point in the Z travel. Like others my banding seems to happen with a full rotation of the leadscrew. And using my crude measuring device I can see real positional errors at multiples of 8mm (4 start 8mm screws). I’m seeing up to .06mm-.09mm errors in the position that the gantry is, vs where its commanded to goto. I’m in the process of setting up a DRO with glass scales to mount rigidly to the gantry to provide a more confident test. This DRO has a usb connection so the values displayed in the DRO screen can also be read programatically.

— Feature Request —
I propose a new feature that acts similar to ABL that maps the actual position of a leadscrew(s) vs the commanded position. So, if the Z axis was sent to 20mm, and the measured position was 19.82mm Klipper would command the axis to 20.18. The DRO could be used programatically to determine the actual position of the gantry to build the map. This could be a command (z_leadscrew_map) to create a 1 time map and you remove the DRO and glass scales after the map has been made. If banding occurs in the future the DRO could be reinstalled to build a current map.

Thank you for your consideration,
Scott…

1 Like

Update:

I have a DRO mounted and am trying to test my theory, but I believe that my current mounting process is causing the observed results to change from actuals had the device not been installed. i.e. there is friction in the DRO scale, and possible flex in my printed adapter that connects the DRO scale to the X axis gantry. The friction is causing the gantry to flex. The friction also possibly causes the adapter to flex although it should spring back. I think if I can get the adapter closer to the leadscrew then there will be less flex in the gantry. Didnt expect this one. I’ll report back when I have something that works better. Seems like a classic case of Observer Effect :slight_smile:

I had grand plans to manually create a map that maps the physical (actual) position of the Z axis vs the commanded distance to move. Then collect this data for every .2mm from 0-20mm in the Z axis. I was going to create g-code for a 20mm cube, and modify the Z movements to the positions from the map that get the actual height to the desired height, to see the impact on Z banding.