diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index cb2b180e47..adfb03ccfa 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -882,18 +882,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -916,45 +904,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 8f4c295421..07e4224e23 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -1091,6 +1091,24 @@ static_assert(1 >= 0 , "Please select no more than one LCD controller option." ); +#if ENABLED(HAVE_TMC2130) && !( \ + ENABLED( X_IS_TMC2130 ) \ + || ENABLED( X2_IS_TMC2130 ) \ + || ENABLED( Y_IS_TMC2130 ) \ + || ENABLED( Y2_IS_TMC2130 ) \ + || ENABLED( Z_IS_TMC2130 ) \ + || ENABLED( Z2_IS_TMC2130 ) \ + || ENABLED( E0_IS_TMC2130 ) \ + || ENABLED( E1_IS_TMC2130 ) \ + || ENABLED( E2_IS_TMC2130 ) \ + || ENABLED( E3_IS_TMC2130 ) ) + #error "Choose at least one TMC2130 stepper." +#endif + +#if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP) + #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD." +#endif + /** * Require 4 or more elements in per-axis initializers */ diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 20ff965c93..1e7a13c1ce 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -879,18 +879,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -913,45 +901,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 1095c95376..fef4bf0a5e 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -879,18 +879,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -913,45 +901,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 104c1dc803..43ea5654e3 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -879,18 +879,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -913,45 +901,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index 90007037e8..7001e573c0 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -863,18 +863,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -897,45 +885,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E3_CURRENT 1000 + //#define E3_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 0c2cdd2a77..a3ee7f353f 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -892,18 +892,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -926,45 +914,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h index ea4c7122dc..f76fa256e9 100644 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/K8400/Configuration_adv.h @@ -879,18 +879,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -913,45 +901,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 5b79424ad7..7a5be5249a 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -879,18 +879,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -913,45 +901,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 18c2240415..90e13e3654 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -879,18 +879,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -913,45 +901,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index 4c8e8a87e9..9064526438 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -887,18 +887,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -921,45 +909,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index 7983ef280d..3fa4f0b055 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -882,18 +882,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -916,45 +904,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 104c1dc803..43ea5654e3 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -879,18 +879,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -913,45 +901,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index a8ffa080f6..e2c7e024c9 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -327,7 +327,11 @@ // Default x offset in duplication mode (typically set to half print bed width) #define DEFAULT_DUPLICATION_X_OFFSET 100 -#endif //DUAL_X_CARRIAGE +#endif // DUAL_X_CARRIAGE + +// Activate a solenoid on the active extruder with M380. Disable all with M381. +// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid. +//#define EXT_SOLENOID // @section homing @@ -899,18 +903,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -933,45 +925,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index 6ee202ae09..7d4a2c0c21 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -902,18 +902,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -936,45 +924,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 5ea04ce0ae..ee2df57ebb 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -900,18 +900,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -934,45 +922,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 5ea04ce0ae..ee2df57ebb 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -900,18 +900,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -934,45 +922,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 1613baeb8d..a57c2bf35e 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -906,18 +906,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -940,45 +928,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 727768807b..08ba347da8 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -900,18 +900,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -934,45 +922,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 11b8cf0978..fc5a716fa9 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -879,18 +879,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -913,45 +901,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index f5fd6eac40..78db8e1d53 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -879,18 +879,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -913,45 +901,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions. diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index d8c93a21b3..ea7644e711 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -882,18 +882,6 @@ //#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) - #define STEALTHCHOP - - /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX - */ - //#define AUTOMATIC_CURRENT_CONTROL - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -916,45 +904,104 @@ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_MAX_CURRENT 1000 // rms current in mA - #define X_MICROSTEPS 16 // FULLSTEP..256 - #define X_CHIP_SELECT 40 // Pin + #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_MICROSTEPS 16 // 0..256 - #define Y_MAX_CURRENT 1000 + #define Y_CURRENT 1000 #define Y_MICROSTEPS 16 - #define Y_CHIP_SELECT 42 - #define Z_MAX_CURRENT 1000 + #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 - #define Z_CHIP_SELECT 65 - //#define X2_MAX_CURRENT 1000 + //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 - //#define X2_CHIP_SELECT -1 - //#define Y2_MAX_CURRENT 1000 + //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 - //#define Y2_CHIP_SELECT -1 - //#define Z2_MAX_CURRENT 1000 + //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 - //#define Z2_CHIP_SELECT -1 - //#define E0_MAX_CURRENT 1000 + //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 - //#define E0_CHIP_SELECT -1 - //#define E1_MAX_CURRENT 1000 + //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 - //#define E1_CHIP_SELECT -1 - //#define E2_MAX_CURRENT 1000 + //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 - //#define E2_CHIP_SELECT -1 - //#define E3_MAX_CURRENT 1000 + //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 - //#define E3_CHIP_SELECT -1 + + //#define E4_CURRENT 1000 + //#define E4_MICROSTEPS 16 + + /** + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP + + /** + * Let Marlin automatically control stepper current. + * This is still an experimental feature. + * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, + * then decrease current by CURRENT_STEP until temperature prewarn is cleared. + * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M906 S1 - Start adjusting current + * M906 S0 - Stop adjusting current + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + */ + //#define AUTOMATIC_CURRENT_CONTROL + + #if ENABLED(AUTOMATIC_CURRENT_CONTROL) + #define CURRENT_STEP 50 // [mA] + #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #define REPORT_CURRENT_CHANGE + #endif + + /** + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP needs to be enabled. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 4 + #define Z2_HYBRID_THRESHOLD 4 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + + /** + * Use stallGuard2 to sense an obstacle and trigger an endstop. + * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. + * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * + * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y_HOME_BUMP_MM to 0. + * M914 X/Y to live tune the setting + */ + //#define SENSORLESS_HOMING + + #if ENABLED(SENSORLESS_HOMING) + #define X_HOMING_SENSITIVITY 19 + #define Y_HOMING_SENSITIVITY 19 + #endif /** * You can set your own advanced settings by filling in predefined functions.