I have some spare microswitches lying around and thought about using them for adjusting the Z-Offset automagically using the switch and the inductive sensor in combination:
install the microswitch right next to the printbed and make it adjustable so it can be dialed in to be triggered by the nozzle exactly at the actual height of the printbed (which will be Z=0). This would have to be re-adjusted for different printbeds, but maybe multiple switches can be used for different print surfaces and linked to different toolsets?
mount the inductive sensor on each printhead in such a position, that it is above the printbed when the microswitch is probed, so the sensor also gets triggered by the bed when the nozzle triggers the microswitch.
The probing process could look like this:
after homing x+y, (and maybe after adjusting the bed level using multiple stepper motors), move the nozzle over the microswitch corresponding to the current build surface height and move the nozzle downwards/the bed upwards until the microswitch is triggered, then store the trigger height of the probe and continue with mesh compensation (using the probe).
This procedure would automagically compensate for different printheads/tools as well as different nozzle lengths or variations when the printhead has been taken apart (relative height difference of sensor and nozzle changed).
But can both, a probe and an endswitch be defined for Z-axis? E.g. would
M574 Z1 S1 P"io2.in+zprobe.in" work?
Or should M574 be called from the script to re-define the endstop type after the microswitch has been triggered and Z=0 has been set?
My crude first approach would be:
- set endstop for Z-axis to microswitch (M574 Z1 S1 P"zstop")
- home Z-axis via microswitch (G1 H1 Z-500)
- set endstop for Z-axis to Z-probe (M574 + M558)
- set Z-probe trigger value (G30 S-3)
I've read about variables somewhere, those would be very handy to e.g. store
the trigger height and inserting into a 'G31' command to set the Z trigger height...
I also haven't checked/tried if the firmware loses home position for an axis if its endstop is re-defined.
I'm sure this idea isn't new, so I'd really like to hear about other approaches or if I was just too blind to find this in the documentation or the proper (simpler) gcode for doing this...