Tap detection with ldc1612 inductive sensors

Please use documentation if it is merged.
This post is out of sync, and there is no reason to use it or update it.
Hidden to avoid any possible future confusion.

Old post

I think PR is ready for testing.
I know it works for me, and at least on one Eddy.

To build some intuition,
I think the good calibration routine is:

  1. Move the bed far away
  2. Try to probe PROBE METHOD=tap
  3. It will stop instantly.
  4. Then tune the tap_max_deceleration ex. -1 → -200, → -300, -500, -800, -1200 & etc
  5. Repeat. Until it starts moving.

It will stop in the middle air before a collision. That means your threshold is above the average noise level, but still below the noise level at a closer distance (the absolute value of noise increasing as distance decreases).
The same procedure as above applies here (tune max_decel util it taps).

When it taps, there can be a large distribution of “where” it taps.
It can be either:

  • dirty nozzle
  • The threshold is still too low.

It should work with the default probe speed of ~5 mm/s, you can go below or above, it may require some testing/threshold tuning. (max_decel is probe to bed distance/noise/speed dependent).
Decrease of the speed may decrease the required max_decel value above the noise level.

It is better to inspect the process visually and probably do that without the filament in the nozzle.

After that, it should just work and the same rules as with the load cell apply: Load Cells - Klipper documentation
So, a hot nozzle, a clean nozzle, would work.
You may need to implement some brush nozzle routines.

It is a good idea to validate the tap with a piece of paper - it should be able to measure the thickness.

If there is a will to use it over glass/FR4 or anything, there still has to be metal behind it.
It would require tuning from the start because the nozzle should stop earlier.

Sensors have different resolutions, and so different signals at different heights.
This may help:

Also, note that the nozzle would elongate; you can even measure that by tapping with a cold nozzle and then with a hot one, so “tap” at 50°C, 150°C, 250 °C would result in different heights.

Macros inside PR may help with that.

Thanks.

-Timofey.