Z-offset hell with capacitive probe

I’m new to klipper and trying to get my Z-offsets right, but I can’t get it to work. My setup is as follows:

My printer has dual Z-axis motors with 2 optical Z end stops. In addition to this I have a capacitive probe for bed levelling using bed_mesh_map.

Setting the Z offset for the optical sensors is working ok using Z_endstop_calibrate. But if I try to use probe_calibrate for the probe, I find it difficult to get an accurate measurement. When I use the Testz command, the probe, doesn’t respond to small inputs. So the probe stays triggered beyond my previous non-trigger point. What I think it needs to do, is to move the bed say 10mm down then raise it again towards the probe, so that it can get triggered again as it does when doing a bed_mesh_map.

Is there a way to just get the bed to rise until it triggers the probe and then save that as the Z-offset? It seems pointless to me to have to use Testz for this…

Thanks in advance for any help.

Hello @twist-knight !

Have you tried to increase the value of sample_retract_dist: in [probe]?

I didn’t even realise this existed. Thanks!

But, this isn’t working for me. I’ve set it to 25, but it’s only lowering the bed by around 1mm.

If you use endstops for homing, you shouldn’t calibrate the zoffset of your probe. You need to use relative reference index.

This looks like it might be what I need. I’ll have to try it out after work tonight. Thanks!