Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensorless home sanity check #23250

Conversation

arades79
Copy link

@arades79 arades79 commented Dec 2, 2021

Description

Adds a timing mechanism and debugging output to the homing procedure (G28) to check if the procedure takes significantly longer or shorter than expected from the current reported axis positions. This is only intended to work when axis are already in a trusted state from a valid home. This can be used to tune TMC sensorless homing parameters by giving feedback for false positive/negative scenarios while homing.

Requirements

This feature assumes usage of sensorless homing and may not work properly with traditional homing. This is also only tested on STM32 targets.

Benefits

Allows automated/assisted tuning of TMC sensorless homing parameters

Configurations

The following config block should be added (or uncommented) inside of the #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) block of configuration_adv.h file:

    // On axis home for trusted axis, check that a stallguard false positive or negative didn't occur by timing the move
    #define SENSORLESS_HOME_SANITY_CHECKING
    #if ENABLED(SENSORLESS_HOME_SANITY_CHECKING)
      #define HOME_SANITY_CHECKING_STARTUP_COMPENSATION 200
      #define HOME_SANITY_CHECKING_ERROR_MARGIN 50
    #endif

Related Issues

N/A

@thinkyhead
Copy link
Member

This PR seems to be marked as not editable by maintainers. Do you see a checkbox on the page to allow edits by maintainers? If so, please enable that option.

@arades79 arades79 marked this pull request as draft December 9, 2021 15:01
@arades79 arades79 marked this pull request as ready for review December 9, 2021 15:04
@arades79
Copy link
Author

arades79 commented Dec 9, 2021

I don't have that option... It's possible it's an organization rule. I'll add write access for you for now and see what I can do about getting that checkbox back. Apologies!

@thinkyhead thinkyhead changed the base branch from bugfix-2.0.x to bugfix-2.1.x June 4, 2022 06:44
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 4 times, most recently from 627f8ef to 20dea22 Compare June 11, 2022 04:59
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 2 times, most recently from 97117d0 to 5979aab Compare July 7, 2022 02:15
@arades79
Copy link
Author

Just bumping to say this isn't abandoned, I have an implementation for sensorless homing autotuning, but I need to do some cleanup before I can cherry pick it here

@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 2 times, most recently from 9c65146 to 4f65466 Compare January 26, 2024 00:13
@thinkyhead
Copy link
Member

Moved to #27556

@thinkyhead thinkyhead closed this Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants