Skip to content

Conversation

@mulcmu
Copy link

@mulcmu mulcmu commented Dec 9, 2025

this builds on @53Aries work on the ads131m01 adc to get a working configuration for testing.

One gotcha with this chip was that it expects an external clock input. The mellow board provided a 4 mhz clock from the STM32F072 mcu pin PA3. The samples per second will be dependent upon this clock frequency.

For testing this was hacked as a build option for the STM32f072 mcu.

garethky and others added 30 commits November 5, 2025 11:11
This change adds a new component registration mechanism that allows modules to register named components with one or more subsystems. The registration happens before printer object creation so no access to Printer is required, limiting possible side effects of registration. This creates a way to do truly dynamic registration without having registries in code, special directories, or files with lists of components. Modules can get registered components at `load_config`\`load_config_prefix` time with a call to `Printer.lookup_components`.

Most of the PR is re-working `Printer.load_object` so that it can use a cache of loaded modules. The cache is built prior to any printer objects being created. Having the cache allows for all modules to be scanned for a `register_components` function which is called before the config file is processed.


Signed-off-by: Gareth Farrington <[email protected]>
Implement a single `_retract` method so it is always performed consistently. This prepares for probe retry strategies that move the probe in x/y.


Signed-off-by: Gareth Farrington <[email protected]>
Pass the GCodeCommand object to the `probing_move` method. This allows probes access to any probe specific custom parameter that might be in the command when probing.


Signed-off-by: Gareth Farrington <[email protected]>
This has diplicated code and is unecessarily complex leading to further complexity in later changes.


Signed-off-by: Gareth Farrington <[email protected]>
Nozzle probes suffer from ooze. If a probe can detect that the nozzle was fouled it can report that infromation back to the probing system. This change adds an optional return parameter, `is_good`, to the `probing_move` interface. If a probe is not good, it can take action to execute additional probes to resolve the issue.

This is all under control of the user via the retry strategy. The strategies are: FAIL, IGNORE, RETRY and CIRCLE. RETRY and CIRCLE re-attempt probes with CIRCLE moving the probe to a clean location in a very small circle around the original probe location.

CIRCLE is the preferred strategy for bed meshing. FAIL or RETRY might be a good strategy for something like QGL where the absolute position of the probe is critical. IGNORE is a good strategy when probing things that are not as rigid as the bed, such as a nozzle scrubber.


Signed-off-by: Gareth Farrington <[email protected]>
If using the CIRCLE stratey and retrying multiple times at the same points (e.g. for QGL) any fouled points are rememberd and avoided by keeping a session between attempts (calls to `start_probe`). The number of retries are reset for all points on each pass but the fouled points are saved.


Signed-off-by: Gareth Farrington <[email protected]>
Allow the user to configure their own custom nozzle scrubbing routine that can integrate with custom nozzle scrubbing hardware, such as a brush or wiper. This is invoked when a probe fails. The SCRUBBING_FREQUENCY parameter allows this to be combined with retry strategies, particularly the CIRCLE and RETRY strategies. This can provide enhanced intermittent scrubbing if there is a problem with tapping to clear a fouled nozzle.


Signed-off-by: Gareth Farrington <[email protected]>
This is a bit of a tricky/archane macro to write so this saves you the trouble. PROBE HOME=z perfectly homes your Z axis if you have a nozzle probe.

HOME=z was used so later we can probe in x/y and submit alternate axis names.


Signed-off-by: Gareth Farrington <[email protected]>
empty commit for merging branches
Signed-off-by: Gareth Farrington <[email protected]>
This is an implementation of the SOS fliltering algorithm that runs on the MCU.

The filter opperates on data in fixed point format to avoid use of the FPU as klipper does not support FPU usage.

This host object handles duties of initalizing and resetting the filter so client dont have to declare their own commands for these opperations. Clients can select how many integer bits they want to use for both the filter coefficients and the filters output value. An arbitrary number of filter sections can be configured. Filters can be designed on the fly with the SciPy library or loaded from another source.

Signed-off-by: Gareth Farrington <[email protected]>
Implement MCU features that enable using an adc to stop an axis

Signed-off-by: Gareth Farrington <[email protected]>
Initial setup of Load Cell Probing. This implementation supports triggering from the Load Cell Probe on the MCU. It also supports, optiopnal, filtering of the force signal by sos filter to eliminate drift caused by bowden tubes or other mechanical causes.


Signed-off-by: Gareth Farrington <[email protected]>
Add a filter workbench Jupiter notebook to help printer developers tune filters based on probing data

Signed-off-by: Gareth Farrington <[email protected]>
Add documentation updates for Homing & Probing with load cell probe

Signed-off-by: Gareth Farrington <[email protected]>

docs: remove hard line breaks from Load_Cell.md

ai mucking around
Re-write documentation for tersness
Validate host provided index prior to accessing memory using that
index.

Also, consistently use a uint8_t for max_sections (to account for
integer overflow issues).

Signed-off-by: Kevin O'Connor <[email protected]>
Catch exceptions raised by the homing module and terminate the collector before re-raising the exception.


Signed-off-by: Gareth Farrington <[email protected]>
Remove unused code

Signed-off-by: Gareth Farrington <[email protected]>
Instead of polling on an interval, this uses ReactorCompletion to wait until the timeout or the data is delivered. This saves wasted time caused by polling delay.


Signed-off-by: Gareth Farrington <[email protected]>
Support setting the channel, SPS and gain. Enable high perfomrance mode. Check for resets and CRC errors while sampling.

Signed-off-by: Gareth Farrington <[email protected]>
@garethky garethky force-pushed the pr-sensor-ads131m02 branch 3 times, most recently from 3e59ee9 to 0af46a7 Compare December 16, 2025 07:09
@garethky garethky force-pushed the pr-sensor-ads131m02 branch 2 times, most recently from 0e70910 to e814a57 Compare December 27, 2025 19:40
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.

4 participants