Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/sample-cartographer-v3.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ frequency: 24000000
i2c_address: 42
i2c_mcu: carto
i2c_bus: i2c1_PB6_PB7
descend_z: 0.5
13 changes: 13 additions & 0 deletions docs/Config_Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ All dates in this document are approximate.

## Changes

20260318: The `[probe_eddy_current]` config options `speed`,
`lift_speed`, `samples`, `sample_retract_dist`, `samples_result`,
`samples_tolerance`, and `samples_tolerance_retries` no longer apply
to probe commands using `METHOD=scan`, `METHOD=rapid_scan`, nor
`METHOD=tap`. To use different settings, supply the equivalent
`PROBE_SPEED`, `LIFT_SPEED`, `SAMPLES`, `SAMPLE_RETRACT_DIST`,
`SAMPLES_RESULT`, `SAMPLES_TOLERANCE`, or `SAMPLES_TOLERANCE_RETRIES`
parameter with the probe command.

20260318: The `[probe_eddy_current]` config option `z_offset` has been
renamed to `descend_z`. Using the old name is deprecated and it will
be removed in the near future.

20260214: The `MANUAL_STEPPER` G-Code command `STOP_ON_ENDSTOP`
parameter has changed. See the
[MANUAL_STEPPER](G-Codes.md#manual_stepper) documentation for
Expand Down
45 changes: 34 additions & 11 deletions docs/Config_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2137,32 +2137,44 @@ z_offset:
# The distance (in mm) between the bed and the nozzle when the probe
# triggers. This parameter must be provided.
#speed: 5.0
# Speed (in mm/s) of the Z axis when probing. The default is 5mm/s.
# Speed (in mm/s) of the Z axis when probing. It may be possible to
# change this value at runtime via a "PROBE_SPEED" command
# parameter. The default is 5mm/s.
#samples: 1
# The number of times to probe each point. The probed z-values will
# be averaged. The default is to probe 1 time.
# be averaged. It may be possible to change this value at runtime
# via a "SAMPLES" command parameter. The default is to probe 1 time.
#sample_retract_dist: 2.0
# The distance (in mm) to lift the toolhead between each sample (if
# sampling more than once). The default is 2mm.
# sampling more than once). It may be possible to change this value
# at runtime via a "SAMPLE_RETRACT_DIST" command parameter. The
# default is 2mm.
#lift_speed:
# Speed (in mm/s) of the Z axis when lifting the probe between
# samples. The default is to use the same value as the 'speed'
# parameter.
# samples. It may be possible to change this value at runtime via a
# "LIFT_SPEED" command parameter. The default is to use the same
# value as the 'speed' parameter.
#samples_result: average
# The calculation method when sampling more than once - either
# "median" or "average". The default is average.
# "median" or "average". It may be possible to change this value at
# runtime via a "SAMPLES_RESULT" command parameter. The default is
# average.
#samples_tolerance: 0.100
# The maximum Z distance (in mm) that a sample may differ from other
# samples. If this tolerance is exceeded then either an error is
# reported or the attempt is restarted (see
# samples_tolerance_retries). The default is 0.100mm.
# samples_tolerance_retries). It may be possible to change this
# value at runtime via a "SAMPLES_TOLERANCE" command parameter. The
# default is 0.100mm.
#samples_tolerance_retries: 0
# The number of times to retry if a sample is found that exceeds
# samples_tolerance. On a retry, all current samples are discarded
# and the probe attempt is restarted. If a valid set of samples are
# not obtained in the given number of retries then an error is
# reported. The default is zero which causes an error to be reported
# on the first sample that exceeds samples_tolerance.
# reported. It may be possible to change this value at runtime via a
# "SAMPLES_TOLERANCE_RETRIES" command parameter. The default is zero
# which causes an error to be reported on the first sample that
# exceeds samples_tolerance.
#activate_gcode:
# A list of G-Code commands to execute prior to each probe attempt.
# See docs/Command_Templates.md for G-Code format. This may be
Expand Down Expand Up @@ -2305,7 +2317,7 @@ sensor_type: ldc1612
#intb_pin:
# MCU gpio pin connected to the ldc1612 sensor's INTB pin (if
# available). The default is to not use the INTB pin.
#z_offset:
#descend_z:
# The nominal distance (in mm) between the nozzle and bed that a
# probing attempt should stop at. This parameter must be provided.
#i2c_address:
Expand All @@ -2318,14 +2330,19 @@ sensor_type: ldc1612
# settings" section for a description of the above parameters.
#x_offset:
#y_offset:
# The distance (in mm) between the probe and the nozzle along the
# x and y axes. The default is 0.
#speed:
#lift_speed:
#samples:
#sample_retract_dist:
#samples_result:
#samples_tolerance:
#samples_tolerance_retries:
# See the "probe" section for information on these parameters.
# See the "probe" section for information on these parameters. Note
# that the settings here apply only to regular probe commands. These
# settings do not have an effect if using a probe "METHOD" of
# "scan", "rapid_scan", or "tap".
#tap_threshold:
# Noise cutoff/stop trigger threshold (in Hz). Specify this value to
# enable support for "METHOD=tap" probe commands. See Eddy_Probe.md
Expand All @@ -2336,6 +2353,12 @@ sensor_type: ldc1612
# the bed. If this value is specified then one may override its
# value at run-time using the "TAP_THRESHOLD" parameter on probe
# commands. The default is to not enable support for "tap" probing.
#tap_z_offset: 0.0
# The Z height (in mm) of the nozzle relative to the bed at the
# contact point detected during "tap" probing. Nominally this would
# be 0.0 to indicate the contact point has zero distance, but one
# may set this to account for backlash, thermal expansion, a
# systemic probing bias, or similar. The default is zero.
```

### [axis_twist_compensation]
Expand Down
23 changes: 7 additions & 16 deletions docs/Eddy_Probe.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ for further details.

Start by declaring a
[probe_eddy_current config section](Config_Reference.md#probe_eddy_current)
in the printer.cfg file. It is recommended to set the `z_offset` to
in the printer.cfg file. It is recommended to set `descend_z` to
0.5mm. It is typical for the sensor to require an `x_offset` and
`y_offset`. If these values are not known, one should estimate the
values during initial calibration.
Expand Down Expand Up @@ -42,11 +42,11 @@ tool completes it will output the sensor performance data:
```
probe_eddy_current: noise 0.000642mm, MAD_Hz=11.314 in 2525 queries
Total frequency range: 45000.012 Hz
z_offset: 0.250 # noise 0.000200mm, MAD_Hz=11.000
z_offset: 0.530 # noise 0.000300mm, MAD_Hz=12.000
z_offset: 1.010 # noise 0.000400mm, MAD_Hz=14.000
z_offset: 2.010 # noise 0.000600mm, MAD_Hz=12.000
z_offset: 3.010 # noise 0.000700mm, MAD_Hz=9.000
z: 0.250 # noise 0.000200mm, MAD_Hz=11.000
z: 0.530 # noise 0.000300mm, MAD_Hz=12.000
z: 1.010 # noise 0.000400mm, MAD_Hz=14.000
z: 2.010 # noise 0.000600mm, MAD_Hz=12.000
z: 3.010 # noise 0.000700mm, MAD_Hz=9.000
```
issue a `SAVE_CONFIG` command to save the results to
the printer.cfg and restart.
Expand Down Expand Up @@ -116,15 +116,6 @@ Practically, it ensures that the Eddy's output data absolute value
change per second (velocity) is high enough - higher than the noise level,
and that upon collision it always decreases by at least this value.

```
[probe_eddy_current my_probe]
# eddy probe configuration...
# Recommended starting values for the tap
#samples: 3
#samples_tolerance: 0.025
#samples_tolerance_retries: 3
```

Before setting it to any other value, it is necessary to install `scipy`:

```bash
Expand Down Expand Up @@ -167,7 +158,7 @@ calibration routine output:
```
probe_eddy_current: noise 0.000642mm, MAD_Hz=11.314
...
z_offset: 1.010 # noise 0.000400mm, MAD_Hz=14.000
z: 1.010 # noise 0.000400mm, MAD_Hz=14.000
```
The estimation will be:
```
Expand Down
8 changes: 8 additions & 0 deletions docs/G-Codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,14 @@ additional parameters if a `[probe_eddy_current]` section is defined:
specified in the `[probe_eddy_current]` config section when probing
using `METHOD=tap`.

The `Z_OFFSET_APPLY_PROBE` command is also extended to support a
`METHOD=tap` parameter. When no METHOD parameter is provided, the
`Z_OFFSET_APPLY_PROBE` command alters the probe calibration to apply
the current Z G-Code offset to future `scan`, `rapid_scan`, and
default probes. If `METHOD=tap` is specified then the command instead
applies the change to `tap_z_offset` so that future `tap` probes are
updated to use the current Z G-Code offset.

#### PROBE_EDDY_CURRENT_CALIBRATE
`PROBE_EDDY_CURRENT_CALIBRATE CHIP=<config_name>`: This starts a tool
that calibrates the sensor resonance frequencies to corresponding Z
Expand Down
5 changes: 3 additions & 2 deletions klippy/extras/load_cell_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# This file may be distributed under the terms of the GNU GPLv3 license.
import logging, math
import mcu
from . import probe, trigger_analog, load_cell, hx71x, ads1220
from . import probe, manual_probe, trigger_analog, load_cell, hx71x, ads1220

np = None # delay NumPy import until configuration time

Expand Down Expand Up @@ -426,7 +426,8 @@ def end_probe_session(self):
# probe until a single good sample is returned or retries are exhausted
def run_probe(self, gcmd):
epos, is_good = self._tapping_move.run_tap(gcmd)
res = self._probe_offsets.create_probe_result(epos)
offsets = self._probe_offsets.get_offsets()
res = manual_probe.create_probe_result(epos, offsets)
self._results.append(res)

def pull_probed_results(self):
Expand Down
11 changes: 9 additions & 2 deletions klippy/extras/manual_probe.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Helper script for manual z height probing
#
# Copyright (C) 2019-2025 Kevin O'Connor <kevin@koconnor.net>
# Copyright (C) 2019-2026 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import logging, bisect, collections
Expand All @@ -14,6 +14,13 @@
ProbeResult = collections.namedtuple('probe_result', [
'bed_x', 'bed_y', 'bed_z', 'test_x', 'test_y', 'test_z'])

# Helper to create a ProbeResult from a test position and probe offsets
def create_probe_result(test_pos, offsets=(0., 0., 0.)):
x_offset, y_offset, z_offset = offsets
return ProbeResult(
test_pos[0]+x_offset, test_pos[1]+y_offset, test_pos[2]-z_offset,
test_pos[0], test_pos[1], test_pos[2])

# Helper to lookup the Z stepper config section
def lookup_z_endstop_config(config):
if config.has_section('stepper_z'):
Expand Down Expand Up @@ -283,7 +290,7 @@ def finalize(self, success):
mpresult = None
if success:
kin_pos = self.get_kinematics_pos()
mpresult = ProbeResult(*(kin_pos[:3] + kin_pos[:3]))
mpresult = create_probe_result(kin_pos)
self.finalize_callback(mpresult)

def load_config(config):
Expand Down
7 changes: 2 additions & 5 deletions klippy/extras/probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ def run_probe(self, gcmd):
speed = self.param_helper.get_probe_params(gcmd)['probe_speed']
phoming = self.printer.lookup_object('homing')
ppos = phoming.probing_move(self.mcu_probe, pos, speed)
res = self.probe_offsets.create_probe_result(ppos)
offsets = self.probe_offsets.get_offsets()
res = manual_probe.create_probe_result(ppos, offsets)
self.results.append(res)
def pull_probed_results(self):
res = self.results
Expand Down Expand Up @@ -430,10 +431,6 @@ def __init__(self, config):
self.z_offset = config.getfloat('z_offset')
def get_offsets(self, gcmd=None):
return self.x_offset, self.y_offset, self.z_offset
def create_probe_result(self, test_pos):
return manual_probe.ProbeResult(
test_pos[0]+self.x_offset, test_pos[1]+self.y_offset,
test_pos[2]-self.z_offset, test_pos[0], test_pos[1], test_pos[2])


######################################################################
Expand Down
Loading
Loading