protoloft / klipper_z_calibration

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

How should I go about converting this code base to probe the nozzle height like cnc routers do? #45

Closed joonasstenvall closed 2 years ago

joonasstenvall commented 2 years ago

Hi, I have bed slingers so I can't really use this plugin without much pain or losing print volume.

But I seldom change nozzles or print sheet so it would not be a huge hassle to calibrate z height the way they do with cnc.

I would need to home z with the probe in toolhead but I can't figure out how to read external z height probe.

Can I read the switch value in python or gcode? I was thinking the procedure would go something like this

  1. home axises
  2. go to predetermined location, lift nozzle like 50mm
  3. wait for user to move external probe to position
  4. move nozzle until height probe triggered. Nozzle would be exactly 20mm away from build plate once probe is triggered.
  5. Now that I know where nozzle is relational to build bed, I could set z offset accordingly from there.

Or could I use probe_calibrate to set the height?

  1. Start from 50.2mm nozzle offset
  2. When hit nozzle probe, set z offset (current height (30.xx mm) - probe height (20mm))
TitusLabs commented 2 years ago

So, when changing nozzles is not an issue for you, why don't you just use your probe the normal way? You determine/configure your probe-nozzle offset and use the probe to home on the bed - done!

The easiest way to accomplish this, would be to configure your probe as z endstop, use safe_z_home to set the z homing position and configure and change the endstop position to according to your probing block...