How to determine the gcode offsets in X and Y for the Z probe and/or toolheads with Klipper.
This is done with the help of a cheap, in 2024 14 Euro, USB Digital Microscope from Aliexpress, and Klipper with some simple macros.
In this case toolhead T0 is the reference because the Z probe is attached to it. The other toolhead offsets are calculated using T0 as a reference.
Due to the manual focus of the microscope all Z-offsets should be set to a fixed value, if possible at 0.
The toolhead move distance steps in X and Y are available in steps of 0.1, 0.01 and 0.001 .
The digital microscope:
- It has a stable pedestal,
- It is available as webcam within Klipper,
- It has the crosshair enabled in any color or size.
The gcode offsets of all toolheads are set to 0.0 in the configuration file "SET_GCODE_OFFSET X=0 Y=0".
The toolhead with attached Z probe is loaded and used as the reference for the other toolhead offsets.
All axes are homed.
Adjust the toolhead/build plate Z height so the microscope, with pedestal, fits under it with a small gap. Position the microscope on the build plate so that the nozzle is close to, or in, the crosshair.
Z Probe XY offset:
If needed change the microscope's crosshair size to fit the nozzle or Z probe.
Using the Toolhead move distance buttons, accurately move the nozzle into the center of the crosshair, then push "SET REFERENCE POINT".
Move the toolhead, with the distance buttons, to any position in X and Y and then push "GOTO REFERENCE POINT".
The nozzle should return exactly to the crosshair center. If it does not match exactly then probably the pedestal has moved.
Using the move distance buttons, accurately move the probe into the center of the crosshair then push "CALCULATE OFFSET".
Verify the calculated offset is correct by pushing "GOTO REFERENCE POINT" and then "GOTO OFFSET". If adjustments are needed repeat one of the previous 2 steps.
Add or verify the offsets to the Z probe's configuration file. This may require the axes to be homed again so remove the microscope !!
Toolhead XY offset:
If needed change the microscope's crosshair size to fit the nozzle opening
With the move distance buttons, accurately move the nozzle of the toolhead T0 into the center of the crosshair then push "SET REFERENCE POINT".
Move the toolhead T0, with move distance buttons, to any position in X and Y and then push "GOTO REFERENCE POINT". The nozzle should return exactly to the crosshair center. If it does not match exactly then probably the pedestal has moved.
Switch from toolhead T0 to T1.
With the move distance buttons, accurately move the nozzle of toolhead T1 into the center of the crosshair then push "CALCULATE OFFSET".
Verify the calculated offset for toolhead T1 by:
- switch to toolhead T0 and push "GOTO REFERENCE POINT".
- switch to toolhead T1 and push "GOTO OFFSET".
If the Z probe is attached to toolhead T0 make sure its loaded because after the next step the axes have to be homed.
Change the T1 gcode offsets in its configuration file, "SET_GCODE_OFFSET X=0 Y=0", to the calculated values.
Remove the microscope from the build plate and home all axes.
Verify configured Toolhead XY offset:
If needed change the microscope's crosshair size to fit the nozzle opening.
Remove the microscope from the build plate and home all axes.
Adjust the toolhead or build plate Z height and position the microscope on the build plate so that the nozzle is in the crosshair.
With the Toolhead move distance buttons accurately move the nozzle of the toolhead T0 into the center of the crosshair then push "SET REFERENCE POINT".
Switch from toolhead T0 to T1 and push "GOTO REFERENCE POINT".
Switch from toolhead T1 to T0 and push "GOTO REFERENCE POINT".
Switching between toolheads or moving the build plate up and down may result in a small move of the pedestal.
Preventing these small moves is required. Use tape, a glue stick, magnets, or "your solution" to fix it.
To prevent small movements of the pedestal on my glass plate I used a very thin layer of a textile adhesive on the pedestal soles.
The dry glue is just a bit sticky.
Microscope: model MGH1000, zoom 50x-1000x, with led lights.
The home-build 3d printer: 2 toolheads and a 3D Touch Z-Probe. Nozzles 0.4 mm brass (T0) and 0.5 mm dark color (T1).