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)
M558.1 - Calibrate height vs reading of scanning Z probe (see below)
M558.2 - Calibrate or set drive level and reading offset for scanning Z probe (see below)
M558.3 - Set scanning probe touch mode parameters (RRF 3.6.0-beta.3+2 and later only)
M308 - Setup SZP temperature sensor
G31 - Set probe offsets and temperature compensation
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
G29 S0 K1 ; Scan bed and create mesh
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.
Firmware 3.6.0-beta.4 and later support scanning probe touch mode experimentally. In touch mode the tool head bearing the sensor is lowered (or the bed raised) and the reading from the sensor is monitored, until the rate of change of the reading reduces sharply, which happens when the nozzle contacts the bed.
Use of touch mode requires that the sensor continues to give good readings all the way from the height at which probing starts right down to when the nozzle contacts the bed. The selected drive level (see M558.2) and a suitable height of the sensor coil above the nozzle are critical to achieving this. See later for a workaround if you can't achieve this.
The mechanics of the tool head mounting must be such that when the nozzle contacts the bed, continued operation of the Z motor(s) doesn't bring the sense coil any nearer to the bed. If the tool head tends to pivot about the X rail under these conditions, such pivoting must not bring the coil closer to the bed.
It is highly desirable that there is come compliance in either the tool head mounting or the bed supports such that the Z motor(s) can overshoot Z=0 by a small amount without generating excessive forces.
Touch mode is enabled using the M558.3 command. You can use this command to turn touch mode on and off, and also to set the following parameters that are used in touch mode. The default values are likely to be changed in future firmware versions.
You may wish to use the M913 command to reduce current to the Z motors when touch probing, to reduce the chance of damage if the touch is not detected.
Touch probing must always be initiated with the nozzle above the bed. If the nozzle is already in contact with the bed when touch probing is initiated, the touch will probably not be detected.
When homing Z you may wish to use a 2-stage homing process:
To come.