Z-offset nightmare

Basic Information:

Printer Model: Tronxy xs5a-600 (modified to use a Voron stealthburner print head with a dragon UHF hotend)
MCU / Printerboard: octopus pro
Host / SBC: rpi
klippy.log

Describe your issue:

klippy.zip (1.1 MB)
Hi everyone, I’ve been having trouble understanding how the z-offset works and is set. I’m sure I’m missing a step or have missed something in my config, but have no idea what it is.

Whenever I start a print, the bed raises up to the 0 position where it craches into the hot end and gouges the bed.

My setup procedure has been as follows:

  • run manual_probe doing the paper test and save_config.
  • repeat the same with probe_calibrate
  • I run bed_mesh_clear followed by bed_mesh_calibrate prior to starting my print.
  • print starts and crashes into the bed.

Please can someone tell me the correct procedure? I upgraded to Klipper over a year ago and have always had this issue. The only workaround I’ve found that kind of works is to pass a g1 command at the start of the print to move the bed down, and sometimes even make live z adjustments while the first layer is going down.

I don’t see a start print macro in your Klippy.log, What is your gcode for the start print you’re using in your slicer?

According to your log you are homing with an endstop for Z, but you also have a BLTouch.

This works, but then you need to determine your z-offset with the endstop and, e.g., Manual leveling - Klipper documentation. Of course, your position_endstop must be in a way to stop the axis before it hits the bed. The fine tuning is done with the Z_ENDSTOP_CALIBRATE according to above link.
If you do this, then you must not mix it with the probe.

If you want to home with the probe and do bed meshing with the probe, then you need to replace your Z-stepper endstop setting with:

[stepper_z]
...
endstop_pin: probe:z_virtual_endstop
...
position_min = -100 # --> Correct this to -2 
...
position_endstop = 16.918 # --> Remove this if you use the probe only

and then follow Probe calibration - Klipper documentation

I recommend going for “probe only”.

Interesting suggestion to just use the probe for the endstop but I don’t think it will work in my case. The printer has a large 600x600 bed with dual z motors, so it uses the z endstops to sync the 2 motors if they become out of since. I know of a hack to put a belt around the 2 to keep them in sync, but I’d rather not do that.

If I use z_endstop_calibrate with my current setup, what would be the steps? Is it:

  • z_endstop_calibrate ;one off to set the end stop distance
  • probe_calibrate ;one off z offset between probe and print head

Then before print:
-bed_mesh_clear ;clear any saved mesh
-bed_mesh_calibrate ;generate a bed mesh

I feel this sequence will give me the same results I’m having now.

There’s not a lot in it:

G28

That’s it!

The more I think about this, I realise what I’d ideally like to do is run z_endstop_calibrate followed by some sort of calibration that gets the probe trigger point so that I can get the correct bed mesh and probe offset.

So is the right sequence:

  • z_endstop_calibrate ; to get the z endstop point
  • probe_calibrate ; to get the trigger point and z offset

Is that all I need?

It works with the probe. To level the two z-axes, you use:

https://www.klipper3d.org/Config_Reference.html#z_tilt

Just wanted to come back and say thanks! This has been far more reliable than anything else I have tried and finally makes it easier to start a print.

Thanks! I didn’t know about z_tilt. This is working great for me now. Interestingly it also highlighted that I had my z & z1 steppers swapped around. Was causing all sort of issues when I first tried to correct with z_tilt. All resolved now.

1 Like