protoloft / klipper_z_calibration

Klipper plugin for self-calibrating z-offset
GNU General Public License v3.0
1.06k stars 152 forks source link

Calculated offset off by 0.9mm, possibly due to negative z endstop? #65

Closed staticanime closed 2 years ago

staticanime commented 2 years ago

Hi there,

I have an issue where my Z Endstop pin on my Voron 2.4 is ~ 0.9mm below the PEI sheet on the bed, and the plugin does not seem to be correctly factoring in that negative offset, leaving the nozzle too low for a print, and scratching the bed.

I home the printer using G28, then run QUAD_GANTRY_LEVEL (which uses the klicky probe), and after that another G28. I then run Z_ENDSTOP_CALIBRATE, and moved the toolhead down until it rested with a little friction on a 0.2mm feeler gauge, and got the below

#*#
#*# [stepper_z]
#*# position_endstop = -0.900

Saving and restarting, I once again run G28, QGL, G28, and if I move the nozzle right down to the bed, it just touches the bed at z0

Running the CALIBRATE_Z macro, it calculates the following

Z-CALIBRATION: ENDSTOP=-0.900 NOZZLE=-0.898 SWITCH=8.956 PROBE=9.626 --> OFFSET=-0.702500

With this value set, I once again moved Z down until it rested with a little friction on a 0.2mm feeler gauge. I would expect that Z should equal 0.2mm, but it equalled 0.9mm (and says 0.197 in the brackets above the Z value in Mainsail), so it seems like it is not factoring in the z position_endstop value

Moving the z offset up by 0.9mm to 0.197 gets me to a position where the nozzle is just grabbing the 0.2mm feeler gauge, and the Z position is listed as 0.2

Am I doing something stupid here, or misunderstanding the plugin in some way? Is there a way to tell the plugin to raise the z offset by the value of the endstop, so that it's actually meeting the bed when z=0?

staticanime commented 2 years ago

EDIT: I'm an idiot, and messed up where I was measuring the klicky probe body off the pin, and thats where my discrepancy came from

Nelus82 commented 1 year ago

What value did you changed? I'm having the same problem

staticanime commented 1 year ago

Make sure that when the macro is probing the z endstop pin with the klickly microswitch, that it is using the BODY of the microswitch to hit the pin, do NOT hit the pin with the actual clicky bit of the microswitch, or it will throw things way off