Skip to content

Add HX71708#5

Open
EllaFoxo wants to merge 29 commits into
garethky:load-cell-probe-community-testingfrom
EllaFoxo:ella/load-cell-community-hx71708
Open

Add HX71708#5
EllaFoxo wants to merge 29 commits into
garethky:load-cell-probe-community-testingfrom
EllaFoxo:ella/load-cell-community-hx71708

Conversation

@EllaFoxo

Copy link
Copy Markdown

For your reference :)

garethky and others added 29 commits February 18, 2026 15:27
These are used to check the temperature of the nozzle and make appropriate changes before probing.

TODO: verify that this will protect homing...

Signed-off-by: Gareth Farrington <gareth@waves.ky>
This calibration tool heats and cools a heater tthrough a range of temperatures and then calulates temp_coeff using linear regression. It lets you set the heater, them range to test, the step between each measurement and how long to heat soak between measurements.


Signed-off-by: Gareth Farrington <gareth@waves.ky>
This change adds the logic to move the probe upwards after the homing move ends at a slower speed. This effectivly provides a high resolution scan of the z space where the nozzle breaks contact with the bed. This data is captured for late analysis.


Signed-off-by: Gareth Farrington <gareth@waves.ky>
The Mellow ALPS board needs PA3 to emit an 8Mhz signal to drive the ADS131M02's clock input. Unfortunatly this conflicts with klipper's primary timer, TIM2. This change switches to an alternate timer to allow this pin to emit a clock signal without the conflict.
AI fix?
Each pin has alternate timers. If the primary timer is being used or is already configured with a different time base by another pin, the alternate timer can be used.
* Check force_safety_limit before any probe movement, limiting potential damage. This creates a new error before the probing & homing moves.
* Add force_drift_limit to be checked while the toolhead moves. This changes an existing error to be clear that the probe was moving and saw the maximum allowed force before it triggered.

Signed-off-by: Gareth Farrington <gareth@waves.ky>
This change brings in the full tap analysis algorithm that can pinpoint the exact z=0 from the data in the pullback move. It can also identify a number of scenarios where the tap data quality is too poor to use. An additional user configurable module, called a TapClassifier, can be configured to further refine the tap analysis. This allows continued development of tap classifiers driven by machine learning.


Signed-off-by: Gareth Farrington <gareth@waves.ky>
docs: update Load_Cell.md for tap validation capabilities
Replace numpy least squares with a more efficient implementation that takes advantage of the fact that the same squares are used multiple times in the two lines best fit algorithm. After the setup is done to pre-calculate the squares, the cost to caclulate a specific least squares solution is O(1). This has resulted in about an order of magnitude performance improvement (100-200ms to 10-20ms).

Now the largest delay is caused by buffering and polling for sensor data and is in the order of 50ms to 200ms.


Signed-off-by: Gareth Farrington <gareth@waves.ky>
This module uses some simple, configurable, checks to try and classify taps with minimal reliance on specific machine characteristics, like speed, sample rate, pullback distance etc. Its not perfect but it doesnt require a whole machine learning data collecton campaign to set up. In practice this catches the worse of the oozy taps without too high of a false positive rate.


Signed-off-by: Gareth Farrington <gareth@waves.ky>
Adds a `[tap_recorder]` TapClassifier implementation. This saves save tap data to a file. Recording can be turned on and off via gcode commands. It can also delegate tap classification to another classifier module, allowing you to record and validate the performance of that module. Data is stored in JSONL format for efficiency when collecting large datasets.

Signed-off-by: Gareth Farrington <gareth@waves.ky>
This change allows callers to create tools that leverage the bed mesh config (e.g. for complex things like faulty regions) and GCode parameters without having to actually probe those points. The generated points can then be used for other purposes. E.g. to visit each point for a calibration routine.

Unfortunatly this changes the internal state of the bed mesh. The current code is not conducive to reuse. However on the next bed mesh call the state will be reset to whatever bed mesh the user specifies.

Signed-off-by: Gareth Farrington <gareth@waves.ky>
Set up a framework for registering load cell calibration routines.

Signed-off-by: Gareth Farrington <gareth@waves.ky>
Collect data from toolhead motion to find the cutoff frequency required for drift free probing.
Probe a mesh and calculate the pullback distance required for safe probing.
Perform a bed mesh and measure the mean of the `decompression_angle`.

Signed-off-by: Gareth Farrington <gareth@waves.ky>
Refactor to DECOMPRESSION_ANGLE calibration
This adds a new metric called `average delta` that averages the delta between each pair or probes in the set. This metric is less susceptible to variance in the measurements consitions that happen over the set of probes, such a temperature changes and hysteresis of components.

Signed-off-by: Gareth Farrington <gareth@waves.ky>
ADC Sensors can sample more than a single channel if multiple physical load cells are connected. The LoadCell instance will sum those discrete readings to give a single weight value. This is similar to a "summing box" in a real world phyiscal load cell setup.

The data for the additional channels is re-broadcast so it can be charted in debugging tools.

TODO:
* Display individual channel data in commands like LOAD_CELL_READ and LOAD_CELL_DIAGNOSTIC
* Support for configuring one or more channels to be summed.
* Configure the sample rate and gain
* Enable high perfomrance mode by default
* Check for unexpected device resets and CRC data errors while sampling

Signed-off-by: Gareth Farrington <gareth@waves.ky>
This change records tare-counts per channel for multi-channel sensors. Commands like LOAD_CELL_READ will now show a list of individual force values for each sensor channel in multi-channel setups.
This is a marker branch for the klipper community to use when testing Load Cell Probing. This branch contains all the changes that will eventually be submitted as Pull Requests (PR's) to klipper mainline.

When klipper merges one of these changes this branch will be rebased on top of that change. This branch will also contain the live updates as the PR's are worked on and will be updated frequencly as the merging work progresses.
@garethky
garethky force-pushed the load-cell-probe-community-testing branch from 59514d2 to 2226c5e Compare March 28, 2026 00:06
@garethky
garethky force-pushed the load-cell-probe-community-testing branch 4 times, most recently from 2db4cdd to 4043bf9 Compare April 2, 2026 03:40
@garethky
garethky force-pushed the load-cell-probe-community-testing branch 2 times, most recently from 2572935 to a4c308e Compare April 24, 2026 21:37
@garethky
garethky force-pushed the load-cell-probe-community-testing branch from a4c308e to 0039825 Compare May 5, 2026 20:25
@garethky
garethky force-pushed the load-cell-probe-community-testing branch 5 times, most recently from b06807d to 50fae1f Compare June 22, 2026 17:52
@garethky
garethky force-pushed the load-cell-probe-community-testing branch 4 times, most recently from 208424a to 08ca99c Compare June 28, 2026 22:10
@garethky
garethky force-pushed the load-cell-probe-community-testing branch 5 times, most recently from 0dd187c to baaa54f Compare July 8, 2026 07:39
@garethky
garethky force-pushed the load-cell-probe-community-testing branch 4 times, most recently from eae6124 to a432273 Compare July 15, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants