Induction-based probes need to have the sensor drive level calibrated and the result saved to config.g before using it as a scanning Z probe (SZP).
Duet3D have boards that use the LDC1612 chip, including the Duet 3 Scanning Z Probe and the Duet 3 Roto Toolboard.
The following Gcodes are used to configure the SZP:
M558 - Sets probe number (K parameter), type (P), input pin (C), feed rate (F) and travel speed (T)
M308 - Set SZP temperature sensor
G31 - Sets probe offsets, adjustments for temperature
M557 - Define mesh grid
Add the following to your config.g. Some values will be dependent on your specific setup. See the Calibration section below for determining the M558.2 values.
; Scanning Z probe
M558 K1 P11 C"120.i2c.ldc1612" F36000 T36000 ; configure SZP as probe 1, type 11, on CAN address 120
M308 A"SZP coil" S10 Y"thermistor" P"120.temp0" ; thermistor on SZP coil
G31 K1 Z2 Y-17 ; define probe 1 offsets and trigger height
M558.2 K1 S15 R101133 ; set drive current and reading offset
M557 X-140:140 Y-90:80 S10 ; Define mesh grid for probe 1 (overwrites probe 0 mesh grid)
120.temp0
for Duet 3 Scanning Z Probe, and 121.temp2
for Duet 3 Roto Toolboard.M558.1 - Calibrate height vs reading of scanning Z probe
M558.2 - Calibrate or set drive level and reading offset for scanning Z probe
To calibrate drive level and reading offset:
M558.2 K1 S-1
to calibrate the drive level. If it is successful then it should report the resulting drive level.
M558.2 K1
with no S parameter to report the current drive level (S parameter) and reading offset (R parameter).M558.2 K1 S15 R101133
. Add this later in config.g than the M558 K1 command that configures the probe.M558.2 K1 S-1
calibration at.The height vs. reading then needs to be calibrated, using M558.1. If you have another way of determining Z=0 (e.g. another Z probe, or touch the nozzle to the build plate and set G92 Z0) then it's best to do this immediately before scanning rather than try to save the calibration. An example of this is in the mesh.g file shown below.
To calibrate manually:
G31 K1 Z2
) means the nozzle is 2mm from the bed, and the coil is 4mm from the bed, when triggered. Setting an S parameter of less than 2, eg 1.7, will calibrate the probe in the range 3.7mm to 0.3mm, ie 2+1.7 to 2-1.7. Send M558.1 K1 S1.7
.M558.1 K1
to see the results. It should report something like:M558.1 K1
Scanning probe coefficients [1.840e-1, -2.865e-4, 2.598e-10, 2.937e-17]
This can be saved to config.g, but note that SZP coil readings change with temperature, so this calibration may not be suitable at all temperatures. That is why it's worth doing each time you do a bed scan.An example mesh.g file, which is run when a G29 command is sent (to do a bed mesh scan), might be:
T-1
M208 S0 Y100
G29 S2
G1 X0 Y0 F30000
G30
if exists(param.K) & param.K=1
G1 Z6 ; to avoid backlash
M558.1 K1 S1.7
G29 S0 K{exists(param.K) ? param.K : 0}
G1 X0 Y-150 F18000
M208 S0 Y49
Note that in the above example:
A simplified mesh.g file might be:
M557 X-135:145 Y-145:145 P10 ; Define grid for mesh bed compensation, origin in bed centre
G29 S2 ; Disable mesh bed compensation
G28 Z ; Home Z
G1 Z6 ; To avoid backlash move to point higher than start of calibration
M558.1 K1 S1.7 ; Calibrate probe
G1 Z6 ; Move up at end of calibration
A scanning Z probe is designed to do just that; scan the bed to create a bed mesh. With careful calibration it should be possible to use it as a probe to set the Z height. However, inductive probes are susceptible to temperature, and will give different readings at different temperatures at the same height.
Testing is currently ongoing to produce a good method to calibrate the SZP for different temperatures. These instructions will be updated when testing is complete, and recommendations can be made.
For now, we recommend using another method to set the Z height.
To come.