protoloft / klipper_z_calibration

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

Not an issue, but an idea about autocalibrating switch_offset value #42

Closed falcon14141 closed 2 years ago

falcon14141 commented 2 years ago

Hi,

I successfully use your code on my Voron2 equipped with a klicky probe. Manual calibration of the switch_offset works fine, but is still a hassle.

I recently had to change my klicky probe to a spare one, and unfortunately, the switch_offset wasn't the same on the 2nd microswitch.

This gave me an idea on a possible way to try, and maybe achieve autocalibration of the swith offset:

On a voron we have to "endstops" being the z_endstop end the probe. If we probe the magprobe two times, we could maybe get the relative distance travelled by the microswitch.

I'll try to explain my idea further with the description of a calibration sequence:

We should now have the means to compute both relative distances between all required values.

Unofrtunately, I lack the base knowledge on klipper to implement this idea, and would appreciate your insights

gongloo commented 2 years ago

I was just thinking the same thing, but a step further: if we probe the two end stops right on top of each other as you describe, then we don't need to probe the body of the mag probe at all. Thoughts?

TitusLabs commented 2 years ago

I'm sorry, this will not work! Please read the switch section. I had this discussion already many times! How would this solve your intention to measure or eliminate the switch offset? Can you tell what exactly would happen if you do so? I cannot.. it depends on so many things and even if it does what you think it would be very fragile. It would just work out in a perfect world where both switches always trigger at the exact same time..

jangrewe commented 2 years ago

I had the same idea, but just because the Z Endstop's switch triggers, doesn't mean that it doesn't travel further down after being triggered - potentially falsifying the actual travel distance. Same for the magprobe. Depends on who triggers easier.

This would (maybe) work if both switch trigger and have 0 travel of the switch actuator afterwards... or not, i need to read up on that again. ;-)

TitusLabs commented 2 years ago

Correct! And, even if there would be no overtravel, the probe has to trigger before the endstop - reliably! The latter one could be achieved by a sexbolt endstop with a spring...