So I thought I’d get everyone’s take on this…
First some background:
This is based on my Voron 2.4 350mm with a Voron Tap sensor.
For those that don’t know, The Voron Tap works by using an optical interrupter to trigger as a probe. When the nozzle touches the bed, the hotend actually moves UP on a very small linear rail and a small piece of plastic/metal interrupts the optical beam. Otherwise gravity holds the hot end setup in place with strong magnets.
I know from experience that there is some hysteresis in the triggering of the Tap.
In other words, the position the Tap triggers at and “un” triggers at isn’t the same. Once it triggers there is a certain amount of movement needed to make it “un” trigger.
With that in mind, I added some code to the probing section of the homing.py file.
def probing_move(self, mcu_probe, pos, speed):
gcode = self.printer.lookup_object('gcode')
endstops = [(mcu_probe, "probe")]
hmove = HomingMove(self.printer, endstops)
try:
epos = hmove.homing_move(pos, speed, probe_pos=True)
next_probe_move = epos[:]
next_probe_move[2] += 5
new_epos = hmove.homing_move(next_probe_move, 1, probe_pos=True,triggered=False)
results = f"Probe triggered at: {epos[2]:.6f} \n"
results += f"Probe un-triggered at: {new_epos[2]:.6f} \n"
results += f"Difference: {new_epos[2] - epos[2]:.6f} \n"
gcode.respond_info(results)
Basically
- Move down at the probing speed until the Tap triggers
- Move back up slowly until it untriggers
- Report both the trigger and untrigger points and the difference
- Return the untrigger point as the “probe” point
Some results:
Probe triggered at: -0.677000
Probe un-triggered at: -0.627000
Difference: 0.050000
Probe triggered at: -0.674500
Probe un-triggered at: -0.627000
Difference: 0.047500
Probe triggered at: -0.674500
Probe un-triggered at: -0.624500
Difference: 0.050000
Probe triggered at: -0.672000
Probe un-triggered at: -0.624500
Difference: 0.047500
Probe triggered at: -0.677000
Probe un-triggered at: -0.627000
Difference: 0.050000
Pretty consistent .05 deviation from trigger to untriggered.
Now for the logic check…
- Which one should be the basis for the probe position?
and - Does it matter?
I’m thinking it will all depend on my setting of the Z_Offset, which in the case of my probe is literally the distance travelled until triggering or if I want to set it as such, when its untriggered after triggering.
But I haven’t thought through it for other probe types and what that would mean/would change.
If anyone is interested in trying my code I can upload it to github with a small install/uninstall script.
Any input/thoughts on one vs the other and why would be great.
Edit: Forgot to add, I understand optical interrupters have hysteresis built in to prevent rapid toggling around the trigger point. I was just interested in how repeatable it was and it’s very repeatable.
I’m more curious about other probe types and if there is any inherent benefit to the probe point being on the trigger or the “un” trigger. My gut feeling is it’s the same either way, depending on how you want to set your Z offset.