Browse Source

Cleanup, extend TMC2130 configuration

Scott Lahteine 7 years ago
parent
commit
d60c02c5b1
22 changed files with 1703 additions and 694 deletions
  1. 80
    33
      Marlin/Configuration_adv.h
  2. 18
    0
      Marlin/SanityCheck.h
  3. 80
    33
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  4. 80
    33
      Marlin/example_configurations/Felix/Configuration_adv.h
  5. 80
    33
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  6. 80
    33
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  7. 80
    33
      Marlin/example_configurations/K8200/Configuration_adv.h
  8. 80
    33
      Marlin/example_configurations/K8400/Configuration_adv.h
  9. 80
    33
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  10. 80
    33
      Marlin/example_configurations/SCARA/Configuration_adv.h
  11. 80
    33
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  12. 80
    33
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  13. 80
    33
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  14. 85
    34
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h
  15. 80
    33
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h
  16. 80
    33
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  17. 80
    33
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  18. 80
    33
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  19. 80
    33
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  20. 80
    33
      Marlin/example_configurations/makibox/Configuration_adv.h
  21. 80
    33
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  22. 80
    33
      Marlin/example_configurations/wt150/Configuration_adv.h

+ 80
- 33
Marlin/Configuration_adv.h View File

@@ -882,18 +882,6 @@
882 882
 //#define HAVE_TMC2130
883 883
 
884 884
 #if ENABLED(HAVE_TMC2130)
885
-  #define STEALTHCHOP
886
-
887
-  /**
888
-   * Let Marlin automatically control stepper current.
889
-   * This is still an experimental feature.
890
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
891
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
892
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
893
-   */
894
-  //#define AUTOMATIC_CURRENT_CONTROL
895
-  #define CURRENT_STEP          50  // [mA]
896
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
897 885
 
898 886
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
899 887
   //#define X_IS_TMC2130
@@ -916,45 +904,104 @@
916 904
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
917 905
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
918 906
 
919
-  #define X_MAX_CURRENT     1000  // rms current in mA
920
-  #define X_MICROSTEPS        16  // FULLSTEP..256
921
-  #define X_CHIP_SELECT       40  // Pin
907
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
908
+  #define X_MICROSTEPS        16  // 0..256
922 909
 
923
-  #define Y_MAX_CURRENT     1000
910
+  #define Y_CURRENT         1000
924 911
   #define Y_MICROSTEPS        16
925
-  #define Y_CHIP_SELECT       42
926 912
 
927
-  #define Z_MAX_CURRENT     1000
913
+  #define Z_CURRENT         1000
928 914
   #define Z_MICROSTEPS        16
929
-  #define Z_CHIP_SELECT       65
930 915
 
931
-  //#define X2_MAX_CURRENT  1000
916
+  //#define X2_CURRENT      1000
932 917
   //#define X2_MICROSTEPS     16
933
-  //#define X2_CHIP_SELECT    -1
934 918
 
935
-  //#define Y2_MAX_CURRENT  1000
919
+  //#define Y2_CURRENT      1000
936 920
   //#define Y2_MICROSTEPS     16
937
-  //#define Y2_CHIP_SELECT    -1
938 921
 
939
-  //#define Z2_MAX_CURRENT  1000
922
+  //#define Z2_CURRENT      1000
940 923
   //#define Z2_MICROSTEPS     16
941
-  //#define Z2_CHIP_SELECT    -1
942 924
 
943
-  //#define E0_MAX_CURRENT  1000
925
+  //#define E0_CURRENT      1000
944 926
   //#define E0_MICROSTEPS     16
945
-  //#define E0_CHIP_SELECT    -1
946 927
 
947
-  //#define E1_MAX_CURRENT  1000
928
+  //#define E1_CURRENT      1000
948 929
   //#define E1_MICROSTEPS     16
949
-  //#define E1_CHIP_SELECT    -1
950 930
 
951
-  //#define E2_MAX_CURRENT  1000
931
+  //#define E2_CURRENT      1000
952 932
   //#define E2_MICROSTEPS     16
953
-  //#define E2_CHIP_SELECT    -1
954 933
 
955
-  //#define E3_MAX_CURRENT  1000
934
+  //#define E3_CURRENT      1000
956 935
   //#define E3_MICROSTEPS     16
957
-  //#define E3_CHIP_SELECT    -1
936
+
937
+  //#define E4_CURRENT      1000
938
+  //#define E4_MICROSTEPS     16
939
+
940
+  /**
941
+   * Use Trinamic's ultra quiet stepping mode.
942
+   * When disabled, Marlin will use spreadCycle stepping mode.
943
+   */
944
+  #define STEALTHCHOP
945
+
946
+  /**
947
+   * Let Marlin automatically control stepper current.
948
+   * This is still an experimental feature.
949
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
950
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
951
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
952
+   * Relevant g-codes:
953
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
954
+   * M906 S1 - Start adjusting current
955
+   * M906 S0 - Stop adjusting current
956
+   * M911 - Report stepper driver overtemperature pre-warn condition.
957
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
958
+   */
959
+  //#define AUTOMATIC_CURRENT_CONTROL
960
+
961
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
962
+    #define CURRENT_STEP          50  // [mA]
963
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
964
+    #define REPORT_CURRENT_CHANGE
965
+  #endif
966
+
967
+  /**
968
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
969
+   * This mode allows for faster movements at the expense of higher noise levels.
970
+   * STEALTHCHOP needs to be enabled.
971
+   * M913 X/Y/Z/E to live tune the setting
972
+   */
973
+  //#define HYBRID_THRESHOLD
974
+
975
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
976
+  #define X2_HYBRID_THRESHOLD    100
977
+  #define Y_HYBRID_THRESHOLD     100
978
+  #define Y2_HYBRID_THRESHOLD    100
979
+  #define Z_HYBRID_THRESHOLD       4
980
+  #define Z2_HYBRID_THRESHOLD      4
981
+  #define E0_HYBRID_THRESHOLD     30
982
+  #define E1_HYBRID_THRESHOLD     30
983
+  #define E2_HYBRID_THRESHOLD     30
984
+  #define E3_HYBRID_THRESHOLD     30
985
+  #define E4_HYBRID_THRESHOLD     30
986
+
987
+  /**
988
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
989
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
990
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
991
+   *
992
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
993
+   * Higher values make the system LESS sensitive.
994
+   * Lower value make the system MORE sensitive.
995
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
996
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
997
+   * M914 X/Y to live tune the setting
998
+   */
999
+  //#define SENSORLESS_HOMING
1000
+
1001
+  #if ENABLED(SENSORLESS_HOMING)
1002
+    #define X_HOMING_SENSITIVITY  19
1003
+    #define Y_HOMING_SENSITIVITY  19
1004
+  #endif
958 1005
 
959 1006
   /**
960 1007
    * You can set your own advanced settings by filling in predefined functions.

+ 18
- 0
Marlin/SanityCheck.h View File

@@ -1091,6 +1091,24 @@ static_assert(1 >= 0
1091 1091
   , "Please select no more than one LCD controller option."
1092 1092
 );
1093 1093
 
1094
+#if ENABLED(HAVE_TMC2130) && !( \
1095
+       ENABLED(  X_IS_TMC2130 ) \
1096
+    || ENABLED( X2_IS_TMC2130 ) \
1097
+    || ENABLED(  Y_IS_TMC2130 ) \
1098
+    || ENABLED( Y2_IS_TMC2130 ) \
1099
+    || ENABLED(  Z_IS_TMC2130 ) \
1100
+    || ENABLED( Z2_IS_TMC2130 ) \
1101
+    || ENABLED( E0_IS_TMC2130 ) \
1102
+    || ENABLED( E1_IS_TMC2130 ) \
1103
+    || ENABLED( E2_IS_TMC2130 ) \
1104
+    || ENABLED( E3_IS_TMC2130 ) )
1105
+  #error "Choose at least one TMC2130 stepper."
1106
+#endif
1107
+
1108
+#if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
1109
+  #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD."
1110
+#endif
1111
+
1094 1112
 /**
1095 1113
  * Require 4 or more elements in per-axis initializers
1096 1114
  */

+ 80
- 33
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

@@ -879,18 +879,6 @@
879 879
 //#define HAVE_TMC2130
880 880
 
881 881
 #if ENABLED(HAVE_TMC2130)
882
-  #define STEALTHCHOP
883
-
884
-  /**
885
-   * Let Marlin automatically control stepper current.
886
-   * This is still an experimental feature.
887
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
888
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
889
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
890
-   */
891
-  //#define AUTOMATIC_CURRENT_CONTROL
892
-  #define CURRENT_STEP          50  // [mA]
893
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
894 882
 
895 883
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
896 884
   //#define X_IS_TMC2130
@@ -913,45 +901,104 @@
913 901
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
914 902
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
915 903
 
916
-  #define X_MAX_CURRENT     1000  // rms current in mA
917
-  #define X_MICROSTEPS        16  // FULLSTEP..256
918
-  #define X_CHIP_SELECT       40  // Pin
904
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
905
+  #define X_MICROSTEPS        16  // 0..256
919 906
 
920
-  #define Y_MAX_CURRENT     1000
907
+  #define Y_CURRENT         1000
921 908
   #define Y_MICROSTEPS        16
922
-  #define Y_CHIP_SELECT       42
923 909
 
924
-  #define Z_MAX_CURRENT     1000
910
+  #define Z_CURRENT         1000
925 911
   #define Z_MICROSTEPS        16
926
-  #define Z_CHIP_SELECT       65
927 912
 
928
-  //#define X2_MAX_CURRENT  1000
913
+  //#define X2_CURRENT      1000
929 914
   //#define X2_MICROSTEPS     16
930
-  //#define X2_CHIP_SELECT    -1
931 915
 
932
-  //#define Y2_MAX_CURRENT  1000
916
+  //#define Y2_CURRENT      1000
933 917
   //#define Y2_MICROSTEPS     16
934
-  //#define Y2_CHIP_SELECT    -1
935 918
 
936
-  //#define Z2_MAX_CURRENT  1000
919
+  //#define Z2_CURRENT      1000
937 920
   //#define Z2_MICROSTEPS     16
938
-  //#define Z2_CHIP_SELECT    -1
939 921
 
940
-  //#define E0_MAX_CURRENT  1000
922
+  //#define E0_CURRENT      1000
941 923
   //#define E0_MICROSTEPS     16
942
-  //#define E0_CHIP_SELECT    -1
943 924
 
944
-  //#define E1_MAX_CURRENT  1000
925
+  //#define E1_CURRENT      1000
945 926
   //#define E1_MICROSTEPS     16
946
-  //#define E1_CHIP_SELECT    -1
947 927
 
948
-  //#define E2_MAX_CURRENT  1000
928
+  //#define E2_CURRENT      1000
949 929
   //#define E2_MICROSTEPS     16
950
-  //#define E2_CHIP_SELECT    -1
951 930
 
952
-  //#define E3_MAX_CURRENT  1000
931
+  //#define E3_CURRENT      1000
953 932
   //#define E3_MICROSTEPS     16
954
-  //#define E3_CHIP_SELECT    -1
933
+
934
+  //#define E4_CURRENT      1000
935
+  //#define E4_MICROSTEPS     16
936
+
937
+  /**
938
+   * Use Trinamic's ultra quiet stepping mode.
939
+   * When disabled, Marlin will use spreadCycle stepping mode.
940
+   */
941
+  #define STEALTHCHOP
942
+
943
+  /**
944
+   * Let Marlin automatically control stepper current.
945
+   * This is still an experimental feature.
946
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
947
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
948
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
949
+   * Relevant g-codes:
950
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
951
+   * M906 S1 - Start adjusting current
952
+   * M906 S0 - Stop adjusting current
953
+   * M911 - Report stepper driver overtemperature pre-warn condition.
954
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
955
+   */
956
+  //#define AUTOMATIC_CURRENT_CONTROL
957
+
958
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
959
+    #define CURRENT_STEP          50  // [mA]
960
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
961
+    #define REPORT_CURRENT_CHANGE
962
+  #endif
963
+
964
+  /**
965
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
966
+   * This mode allows for faster movements at the expense of higher noise levels.
967
+   * STEALTHCHOP needs to be enabled.
968
+   * M913 X/Y/Z/E to live tune the setting
969
+   */
970
+  //#define HYBRID_THRESHOLD
971
+
972
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
973
+  #define X2_HYBRID_THRESHOLD    100
974
+  #define Y_HYBRID_THRESHOLD     100
975
+  #define Y2_HYBRID_THRESHOLD    100
976
+  #define Z_HYBRID_THRESHOLD       4
977
+  #define Z2_HYBRID_THRESHOLD      4
978
+  #define E0_HYBRID_THRESHOLD     30
979
+  #define E1_HYBRID_THRESHOLD     30
980
+  #define E2_HYBRID_THRESHOLD     30
981
+  #define E3_HYBRID_THRESHOLD     30
982
+  #define E4_HYBRID_THRESHOLD     30
983
+
984
+  /**
985
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
986
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
987
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
988
+   *
989
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
990
+   * Higher values make the system LESS sensitive.
991
+   * Lower value make the system MORE sensitive.
992
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
993
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
994
+   * M914 X/Y to live tune the setting
995
+   */
996
+  //#define SENSORLESS_HOMING
997
+
998
+  #if ENABLED(SENSORLESS_HOMING)
999
+    #define X_HOMING_SENSITIVITY  19
1000
+    #define Y_HOMING_SENSITIVITY  19
1001
+  #endif
955 1002
 
956 1003
   /**
957 1004
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -879,18 +879,6 @@
879 879
 //#define HAVE_TMC2130
880 880
 
881 881
 #if ENABLED(HAVE_TMC2130)
882
-  #define STEALTHCHOP
883
-
884
-  /**
885
-   * Let Marlin automatically control stepper current.
886
-   * This is still an experimental feature.
887
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
888
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
889
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
890
-   */
891
-  //#define AUTOMATIC_CURRENT_CONTROL
892
-  #define CURRENT_STEP          50  // [mA]
893
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
894 882
 
895 883
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
896 884
   //#define X_IS_TMC2130
@@ -913,45 +901,104 @@
913 901
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
914 902
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
915 903
 
916
-  #define X_MAX_CURRENT     1000  // rms current in mA
917
-  #define X_MICROSTEPS        16  // FULLSTEP..256
918
-  #define X_CHIP_SELECT       40  // Pin
904
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
905
+  #define X_MICROSTEPS        16  // 0..256
919 906
 
920
-  #define Y_MAX_CURRENT     1000
907
+  #define Y_CURRENT         1000
921 908
   #define Y_MICROSTEPS        16
922
-  #define Y_CHIP_SELECT       42
923 909
 
924
-  #define Z_MAX_CURRENT     1000
910
+  #define Z_CURRENT         1000
925 911
   #define Z_MICROSTEPS        16
926
-  #define Z_CHIP_SELECT       65
927 912
 
928
-  //#define X2_MAX_CURRENT  1000
913
+  //#define X2_CURRENT      1000
929 914
   //#define X2_MICROSTEPS     16
930
-  //#define X2_CHIP_SELECT    -1
931 915
 
932
-  //#define Y2_MAX_CURRENT  1000
916
+  //#define Y2_CURRENT      1000
933 917
   //#define Y2_MICROSTEPS     16
934
-  //#define Y2_CHIP_SELECT    -1
935 918
 
936
-  //#define Z2_MAX_CURRENT  1000
919
+  //#define Z2_CURRENT      1000
937 920
   //#define Z2_MICROSTEPS     16
938
-  //#define Z2_CHIP_SELECT    -1
939 921
 
940
-  //#define E0_MAX_CURRENT  1000
922
+  //#define E0_CURRENT      1000
941 923
   //#define E0_MICROSTEPS     16
942
-  //#define E0_CHIP_SELECT    -1
943 924
 
944
-  //#define E1_MAX_CURRENT  1000
925
+  //#define E1_CURRENT      1000
945 926
   //#define E1_MICROSTEPS     16
946
-  //#define E1_CHIP_SELECT    -1
947 927
 
948
-  //#define E2_MAX_CURRENT  1000
928
+  //#define E2_CURRENT      1000
949 929
   //#define E2_MICROSTEPS     16
950
-  //#define E2_CHIP_SELECT    -1
951 930
 
952
-  //#define E3_MAX_CURRENT  1000
931
+  //#define E3_CURRENT      1000
953 932
   //#define E3_MICROSTEPS     16
954
-  //#define E3_CHIP_SELECT    -1
933
+
934
+  //#define E4_CURRENT      1000
935
+  //#define E4_MICROSTEPS     16
936
+
937
+  /**
938
+   * Use Trinamic's ultra quiet stepping mode.
939
+   * When disabled, Marlin will use spreadCycle stepping mode.
940
+   */
941
+  #define STEALTHCHOP
942
+
943
+  /**
944
+   * Let Marlin automatically control stepper current.
945
+   * This is still an experimental feature.
946
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
947
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
948
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
949
+   * Relevant g-codes:
950
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
951
+   * M906 S1 - Start adjusting current
952
+   * M906 S0 - Stop adjusting current
953
+   * M911 - Report stepper driver overtemperature pre-warn condition.
954
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
955
+   */
956
+  //#define AUTOMATIC_CURRENT_CONTROL
957
+
958
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
959
+    #define CURRENT_STEP          50  // [mA]
960
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
961
+    #define REPORT_CURRENT_CHANGE
962
+  #endif
963
+
964
+  /**
965
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
966
+   * This mode allows for faster movements at the expense of higher noise levels.
967
+   * STEALTHCHOP needs to be enabled.
968
+   * M913 X/Y/Z/E to live tune the setting
969
+   */
970
+  //#define HYBRID_THRESHOLD
971
+
972
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
973
+  #define X2_HYBRID_THRESHOLD    100
974
+  #define Y_HYBRID_THRESHOLD     100
975
+  #define Y2_HYBRID_THRESHOLD    100
976
+  #define Z_HYBRID_THRESHOLD       4
977
+  #define Z2_HYBRID_THRESHOLD      4
978
+  #define E0_HYBRID_THRESHOLD     30
979
+  #define E1_HYBRID_THRESHOLD     30
980
+  #define E2_HYBRID_THRESHOLD     30
981
+  #define E3_HYBRID_THRESHOLD     30
982
+  #define E4_HYBRID_THRESHOLD     30
983
+
984
+  /**
985
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
986
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
987
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
988
+   *
989
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
990
+   * Higher values make the system LESS sensitive.
991
+   * Lower value make the system MORE sensitive.
992
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
993
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
994
+   * M914 X/Y to live tune the setting
995
+   */
996
+  //#define SENSORLESS_HOMING
997
+
998
+  #if ENABLED(SENSORLESS_HOMING)
999
+    #define X_HOMING_SENSITIVITY  19
1000
+    #define Y_HOMING_SENSITIVITY  19
1001
+  #endif
955 1002
 
956 1003
   /**
957 1004
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -879,18 +879,6 @@
879 879
 //#define HAVE_TMC2130
880 880
 
881 881
 #if ENABLED(HAVE_TMC2130)
882
-  #define STEALTHCHOP
883
-
884
-  /**
885
-   * Let Marlin automatically control stepper current.
886
-   * This is still an experimental feature.
887
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
888
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
889
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
890
-   */
891
-  //#define AUTOMATIC_CURRENT_CONTROL
892
-  #define CURRENT_STEP          50  // [mA]
893
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
894 882
 
895 883
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
896 884
   //#define X_IS_TMC2130
@@ -913,45 +901,104 @@
913 901
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
914 902
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
915 903
 
916
-  #define X_MAX_CURRENT     1000  // rms current in mA
917
-  #define X_MICROSTEPS        16  // FULLSTEP..256
918
-  #define X_CHIP_SELECT       40  // Pin
904
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
905
+  #define X_MICROSTEPS        16  // 0..256
919 906
 
920
-  #define Y_MAX_CURRENT     1000
907
+  #define Y_CURRENT         1000
921 908
   #define Y_MICROSTEPS        16
922
-  #define Y_CHIP_SELECT       42
923 909
 
924
-  #define Z_MAX_CURRENT     1000
910
+  #define Z_CURRENT         1000
925 911
   #define Z_MICROSTEPS        16
926
-  #define Z_CHIP_SELECT       65
927 912
 
928
-  //#define X2_MAX_CURRENT  1000
913
+  //#define X2_CURRENT      1000
929 914
   //#define X2_MICROSTEPS     16
930
-  //#define X2_CHIP_SELECT    -1
931 915
 
932
-  //#define Y2_MAX_CURRENT  1000
916
+  //#define Y2_CURRENT      1000
933 917
   //#define Y2_MICROSTEPS     16
934
-  //#define Y2_CHIP_SELECT    -1
935 918
 
936
-  //#define Z2_MAX_CURRENT  1000
919
+  //#define Z2_CURRENT      1000
937 920
   //#define Z2_MICROSTEPS     16
938
-  //#define Z2_CHIP_SELECT    -1
939 921
 
940
-  //#define E0_MAX_CURRENT  1000
922
+  //#define E0_CURRENT      1000
941 923
   //#define E0_MICROSTEPS     16
942
-  //#define E0_CHIP_SELECT    -1
943 924
 
944
-  //#define E1_MAX_CURRENT  1000
925
+  //#define E1_CURRENT      1000
945 926
   //#define E1_MICROSTEPS     16
946
-  //#define E1_CHIP_SELECT    -1
947 927
 
948
-  //#define E2_MAX_CURRENT  1000
928
+  //#define E2_CURRENT      1000
949 929
   //#define E2_MICROSTEPS     16
950
-  //#define E2_CHIP_SELECT    -1
951 930
 
952
-  //#define E3_MAX_CURRENT  1000
931
+  //#define E3_CURRENT      1000
953 932
   //#define E3_MICROSTEPS     16
954
-  //#define E3_CHIP_SELECT    -1
933
+
934
+  //#define E4_CURRENT      1000
935
+  //#define E4_MICROSTEPS     16
936
+
937
+  /**
938
+   * Use Trinamic's ultra quiet stepping mode.
939
+   * When disabled, Marlin will use spreadCycle stepping mode.
940
+   */
941
+  #define STEALTHCHOP
942
+
943
+  /**
944
+   * Let Marlin automatically control stepper current.
945
+   * This is still an experimental feature.
946
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
947
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
948
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
949
+   * Relevant g-codes:
950
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
951
+   * M906 S1 - Start adjusting current
952
+   * M906 S0 - Stop adjusting current
953
+   * M911 - Report stepper driver overtemperature pre-warn condition.
954
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
955
+   */
956
+  //#define AUTOMATIC_CURRENT_CONTROL
957
+
958
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
959
+    #define CURRENT_STEP          50  // [mA]
960
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
961
+    #define REPORT_CURRENT_CHANGE
962
+  #endif
963
+
964
+  /**
965
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
966
+   * This mode allows for faster movements at the expense of higher noise levels.
967
+   * STEALTHCHOP needs to be enabled.
968
+   * M913 X/Y/Z/E to live tune the setting
969
+   */
970
+  //#define HYBRID_THRESHOLD
971
+
972
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
973
+  #define X2_HYBRID_THRESHOLD    100
974
+  #define Y_HYBRID_THRESHOLD     100
975
+  #define Y2_HYBRID_THRESHOLD    100
976
+  #define Z_HYBRID_THRESHOLD       4
977
+  #define Z2_HYBRID_THRESHOLD      4
978
+  #define E0_HYBRID_THRESHOLD     30
979
+  #define E1_HYBRID_THRESHOLD     30
980
+  #define E2_HYBRID_THRESHOLD     30
981
+  #define E3_HYBRID_THRESHOLD     30
982
+  #define E4_HYBRID_THRESHOLD     30
983
+
984
+  /**
985
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
986
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
987
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
988
+   *
989
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
990
+   * Higher values make the system LESS sensitive.
991
+   * Lower value make the system MORE sensitive.
992
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
993
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
994
+   * M914 X/Y to live tune the setting
995
+   */
996
+  //#define SENSORLESS_HOMING
997
+
998
+  #if ENABLED(SENSORLESS_HOMING)
999
+    #define X_HOMING_SENSITIVITY  19
1000
+    #define Y_HOMING_SENSITIVITY  19
1001
+  #endif
955 1002
 
956 1003
   /**
957 1004
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -863,18 +863,6 @@
863 863
 //#define HAVE_TMC2130
864 864
 
865 865
 #if ENABLED(HAVE_TMC2130)
866
-  #define STEALTHCHOP
867
-
868
-  /**
869
-   * Let Marlin automatically control stepper current.
870
-   * This is still an experimental feature.
871
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
872
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
873
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
874
-   */
875
-  //#define AUTOMATIC_CURRENT_CONTROL
876
-  #define CURRENT_STEP          50  // [mA]
877
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
878 866
 
879 867
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
880 868
   //#define X_IS_TMC2130
@@ -897,45 +885,104 @@
897 885
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
898 886
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
899 887
 
900
-  #define X_MAX_CURRENT     1000  // rms current in mA
901
-  #define X_MICROSTEPS        16  // FULLSTEP..256
902
-  #define X_CHIP_SELECT       40  // Pin
888
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
889
+  #define X_MICROSTEPS        16  // 0..256
903 890
 
904
-  #define Y_MAX_CURRENT     1000
891
+  #define Y_CURRENT         1000
905 892
   #define Y_MICROSTEPS        16
906
-  #define Y_CHIP_SELECT       42
907 893
 
908
-  #define Z_MAX_CURRENT     1000
894
+  #define Z_CURRENT         1000
909 895
   #define Z_MICROSTEPS        16
910
-  #define Z_CHIP_SELECT       65
911 896
 
912
-  //#define X2_MAX_CURRENT  1000
897
+  //#define X2_CURRENT      1000
913 898
   //#define X2_MICROSTEPS     16
914
-  //#define X2_CHIP_SELECT    -1
915 899
 
916
-  //#define Y2_MAX_CURRENT  1000
900
+  //#define Y2_CURRENT      1000
917 901
   //#define Y2_MICROSTEPS     16
918
-  //#define Y2_CHIP_SELECT    -1
919 902
 
920
-  //#define Z2_MAX_CURRENT  1000
903
+  //#define Z2_CURRENT      1000
921 904
   //#define Z2_MICROSTEPS     16
922
-  //#define Z2_CHIP_SELECT    -1
923 905
 
924
-  //#define E0_MAX_CURRENT  1000
906
+  //#define E0_CURRENT      1000
925 907
   //#define E0_MICROSTEPS     16
926
-  //#define E0_CHIP_SELECT    -1
927 908
 
928
-  //#define E1_MAX_CURRENT  1000
909
+  //#define E1_CURRENT      1000
929 910
   //#define E1_MICROSTEPS     16
930
-  //#define E1_CHIP_SELECT    -1
931 911
 
932
-  //#define E2_MAX_CURRENT  1000
912
+  //#define E2_CURRENT      1000
933 913
   //#define E2_MICROSTEPS     16
934
-  //#define E2_CHIP_SELECT    -1
935 914
 
936
-  //#define E3_MAX_CURRENT  1000
915
+  //#define E3_CURRENT      1000
937 916
   //#define E3_MICROSTEPS     16
938
-  //#define E3_CHIP_SELECT    -1
917
+
918
+  //#define E3_CURRENT      1000
919
+  //#define E3_MICROSTEPS     16
920
+
921
+  /**
922
+   * Use Trinamic's ultra quiet stepping mode.
923
+   * When disabled, Marlin will use spreadCycle stepping mode.
924
+   */
925
+  #define STEALTHCHOP
926
+
927
+  /**
928
+   * Let Marlin automatically control stepper current.
929
+   * This is still an experimental feature.
930
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
931
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
932
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
933
+   * Relevant g-codes:
934
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
935
+   * M906 S1 - Start adjusting current
936
+   * M906 S0 - Stop adjusting current
937
+   * M911 - Report stepper driver overtemperature pre-warn condition.
938
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
939
+   */
940
+  //#define AUTOMATIC_CURRENT_CONTROL
941
+
942
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
943
+    #define CURRENT_STEP          50  // [mA]
944
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
945
+    #define REPORT_CURRENT_CHANGE
946
+  #endif
947
+
948
+  /**
949
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
950
+   * This mode allows for faster movements at the expense of higher noise levels.
951
+   * STEALTHCHOP needs to be enabled.
952
+   * M913 X/Y/Z/E to live tune the setting
953
+   */
954
+  //#define HYBRID_THRESHOLD
955
+
956
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
957
+  #define X2_HYBRID_THRESHOLD    100
958
+  #define Y_HYBRID_THRESHOLD     100
959
+  #define Y2_HYBRID_THRESHOLD    100
960
+  #define Z_HYBRID_THRESHOLD       4
961
+  #define Z2_HYBRID_THRESHOLD      4
962
+  #define E0_HYBRID_THRESHOLD     30
963
+  #define E1_HYBRID_THRESHOLD     30
964
+  #define E2_HYBRID_THRESHOLD     30
965
+  #define E3_HYBRID_THRESHOLD     30
966
+  #define E4_HYBRID_THRESHOLD     30
967
+
968
+  /**
969
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
970
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
971
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
972
+   *
973
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
974
+   * Higher values make the system LESS sensitive.
975
+   * Lower value make the system MORE sensitive.
976
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
977
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
978
+   * M914 X/Y to live tune the setting
979
+   */
980
+  //#define SENSORLESS_HOMING
981
+
982
+  #if ENABLED(SENSORLESS_HOMING)
983
+    #define X_HOMING_SENSITIVITY  19
984
+    #define Y_HOMING_SENSITIVITY  19
985
+  #endif
939 986
 
940 987
   /**
941 988
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -892,18 +892,6 @@
892 892
 //#define HAVE_TMC2130
893 893
 
894 894
 #if ENABLED(HAVE_TMC2130)
895
-  #define STEALTHCHOP
896
-
897
-  /**
898
-   * Let Marlin automatically control stepper current.
899
-   * This is still an experimental feature.
900
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
901
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
902
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
903
-   */
904
-  //#define AUTOMATIC_CURRENT_CONTROL
905
-  #define CURRENT_STEP          50  // [mA]
906
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
907 895
 
908 896
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
909 897
   //#define X_IS_TMC2130
@@ -926,45 +914,104 @@
926 914
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
927 915
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
928 916
 
929
-  #define X_MAX_CURRENT     1000  // rms current in mA
930
-  #define X_MICROSTEPS        16  // FULLSTEP..256
931
-  #define X_CHIP_SELECT       40  // Pin
917
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
918
+  #define X_MICROSTEPS        16  // 0..256
932 919
 
933
-  #define Y_MAX_CURRENT     1000
920
+  #define Y_CURRENT         1000
934 921
   #define Y_MICROSTEPS        16
935
-  #define Y_CHIP_SELECT       42
936 922
 
937
-  #define Z_MAX_CURRENT     1000
923
+  #define Z_CURRENT         1000
938 924
   #define Z_MICROSTEPS        16
939
-  #define Z_CHIP_SELECT       65
940 925
 
941
-  //#define X2_MAX_CURRENT  1000
926
+  //#define X2_CURRENT      1000
942 927
   //#define X2_MICROSTEPS     16
943
-  //#define X2_CHIP_SELECT    -1
944 928
 
945
-  //#define Y2_MAX_CURRENT  1000
929
+  //#define Y2_CURRENT      1000
946 930
   //#define Y2_MICROSTEPS     16
947
-  //#define Y2_CHIP_SELECT    -1
948 931
 
949
-  //#define Z2_MAX_CURRENT  1000
932
+  //#define Z2_CURRENT      1000
950 933
   //#define Z2_MICROSTEPS     16
951
-  //#define Z2_CHIP_SELECT    -1
952 934
 
953
-  //#define E0_MAX_CURRENT  1000
935
+  //#define E0_CURRENT      1000
954 936
   //#define E0_MICROSTEPS     16
955
-  //#define E0_CHIP_SELECT    -1
956 937
 
957
-  //#define E1_MAX_CURRENT  1000
938
+  //#define E1_CURRENT      1000
958 939
   //#define E1_MICROSTEPS     16
959
-  //#define E1_CHIP_SELECT    -1
960 940
 
961
-  //#define E2_MAX_CURRENT  1000
941
+  //#define E2_CURRENT      1000
962 942
   //#define E2_MICROSTEPS     16
963
-  //#define E2_CHIP_SELECT    -1
964 943
 
965
-  //#define E3_MAX_CURRENT  1000
944
+  //#define E3_CURRENT      1000
966 945
   //#define E3_MICROSTEPS     16
967
-  //#define E3_CHIP_SELECT    -1
946
+
947
+  //#define E4_CURRENT      1000
948
+  //#define E4_MICROSTEPS     16
949
+
950
+  /**
951
+   * Use Trinamic's ultra quiet stepping mode.
952
+   * When disabled, Marlin will use spreadCycle stepping mode.
953
+   */
954
+  #define STEALTHCHOP
955
+
956
+  /**
957
+   * Let Marlin automatically control stepper current.
958
+   * This is still an experimental feature.
959
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
960
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
961
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
962
+   * Relevant g-codes:
963
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
964
+   * M906 S1 - Start adjusting current
965
+   * M906 S0 - Stop adjusting current
966
+   * M911 - Report stepper driver overtemperature pre-warn condition.
967
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
968
+   */
969
+  //#define AUTOMATIC_CURRENT_CONTROL
970
+
971
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
972
+    #define CURRENT_STEP          50  // [mA]
973
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
974
+    #define REPORT_CURRENT_CHANGE
975
+  #endif
976
+
977
+  /**
978
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
979
+   * This mode allows for faster movements at the expense of higher noise levels.
980
+   * STEALTHCHOP needs to be enabled.
981
+   * M913 X/Y/Z/E to live tune the setting
982
+   */
983
+  //#define HYBRID_THRESHOLD
984
+
985
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
986
+  #define X2_HYBRID_THRESHOLD    100
987
+  #define Y_HYBRID_THRESHOLD     100
988
+  #define Y2_HYBRID_THRESHOLD    100
989
+  #define Z_HYBRID_THRESHOLD       4
990
+  #define Z2_HYBRID_THRESHOLD      4
991
+  #define E0_HYBRID_THRESHOLD     30
992
+  #define E1_HYBRID_THRESHOLD     30
993
+  #define E2_HYBRID_THRESHOLD     30
994
+  #define E3_HYBRID_THRESHOLD     30
995
+  #define E4_HYBRID_THRESHOLD     30
996
+
997
+  /**
998
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
999
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1000
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1001
+   *
1002
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1003
+   * Higher values make the system LESS sensitive.
1004
+   * Lower value make the system MORE sensitive.
1005
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
1006
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
1007
+   * M914 X/Y to live tune the setting
1008
+   */
1009
+  //#define SENSORLESS_HOMING
1010
+
1011
+  #if ENABLED(SENSORLESS_HOMING)
1012
+    #define X_HOMING_SENSITIVITY  19
1013
+    #define Y_HOMING_SENSITIVITY  19
1014
+  #endif
968 1015
 
969 1016
   /**
970 1017
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/K8400/Configuration_adv.h View File

@@ -879,18 +879,6 @@
879 879
 //#define HAVE_TMC2130
880 880
 
881 881
 #if ENABLED(HAVE_TMC2130)
882
-  #define STEALTHCHOP
883
-
884
-  /**
885
-   * Let Marlin automatically control stepper current.
886
-   * This is still an experimental feature.
887
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
888
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
889
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
890
-   */
891
-  //#define AUTOMATIC_CURRENT_CONTROL
892
-  #define CURRENT_STEP          50  // [mA]
893
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
894 882
 
895 883
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
896 884
   //#define X_IS_TMC2130
@@ -913,45 +901,104 @@
913 901
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
914 902
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
915 903
 
916
-  #define X_MAX_CURRENT     1000  // rms current in mA
917
-  #define X_MICROSTEPS        16  // FULLSTEP..256
918
-  #define X_CHIP_SELECT       40  // Pin
904
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
905
+  #define X_MICROSTEPS        16  // 0..256
919 906
 
920
-  #define Y_MAX_CURRENT     1000
907
+  #define Y_CURRENT         1000
921 908
   #define Y_MICROSTEPS        16
922
-  #define Y_CHIP_SELECT       42
923 909
 
924
-  #define Z_MAX_CURRENT     1000
910
+  #define Z_CURRENT         1000
925 911
   #define Z_MICROSTEPS        16
926
-  #define Z_CHIP_SELECT       65
927 912
 
928
-  //#define X2_MAX_CURRENT  1000
913
+  //#define X2_CURRENT      1000
929 914
   //#define X2_MICROSTEPS     16
930
-  //#define X2_CHIP_SELECT    -1
931 915
 
932
-  //#define Y2_MAX_CURRENT  1000
916
+  //#define Y2_CURRENT      1000
933 917
   //#define Y2_MICROSTEPS     16
934
-  //#define Y2_CHIP_SELECT    -1
935 918
 
936
-  //#define Z2_MAX_CURRENT  1000
919
+  //#define Z2_CURRENT      1000
937 920
   //#define Z2_MICROSTEPS     16
938
-  //#define Z2_CHIP_SELECT    -1
939 921
 
940
-  //#define E0_MAX_CURRENT  1000
922
+  //#define E0_CURRENT      1000
941 923
   //#define E0_MICROSTEPS     16
942
-  //#define E0_CHIP_SELECT    -1
943 924
 
944
-  //#define E1_MAX_CURRENT  1000
925
+  //#define E1_CURRENT      1000
945 926
   //#define E1_MICROSTEPS     16
946
-  //#define E1_CHIP_SELECT    -1
947 927
 
948
-  //#define E2_MAX_CURRENT  1000
928
+  //#define E2_CURRENT      1000
949 929
   //#define E2_MICROSTEPS     16
950
-  //#define E2_CHIP_SELECT    -1
951 930
 
952
-  //#define E3_MAX_CURRENT  1000
931
+  //#define E3_CURRENT      1000
953 932
   //#define E3_MICROSTEPS     16
954
-  //#define E3_CHIP_SELECT    -1
933
+
934
+  //#define E4_CURRENT      1000
935
+  //#define E4_MICROSTEPS     16
936
+
937
+  /**
938
+   * Use Trinamic's ultra quiet stepping mode.
939
+   * When disabled, Marlin will use spreadCycle stepping mode.
940
+   */
941
+  #define STEALTHCHOP
942
+
943
+  /**
944
+   * Let Marlin automatically control stepper current.
945
+   * This is still an experimental feature.
946
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
947
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
948
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
949
+   * Relevant g-codes:
950
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
951
+   * M906 S1 - Start adjusting current
952
+   * M906 S0 - Stop adjusting current
953
+   * M911 - Report stepper driver overtemperature pre-warn condition.
954
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
955
+   */
956
+  //#define AUTOMATIC_CURRENT_CONTROL
957
+
958
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
959
+    #define CURRENT_STEP          50  // [mA]
960
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
961
+    #define REPORT_CURRENT_CHANGE
962
+  #endif
963
+
964
+  /**
965
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
966
+   * This mode allows for faster movements at the expense of higher noise levels.
967
+   * STEALTHCHOP needs to be enabled.
968
+   * M913 X/Y/Z/E to live tune the setting
969
+   */
970
+  //#define HYBRID_THRESHOLD
971
+
972
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
973
+  #define X2_HYBRID_THRESHOLD    100
974
+  #define Y_HYBRID_THRESHOLD     100
975
+  #define Y2_HYBRID_THRESHOLD    100
976
+  #define Z_HYBRID_THRESHOLD       4
977
+  #define Z2_HYBRID_THRESHOLD      4
978
+  #define E0_HYBRID_THRESHOLD     30
979
+  #define E1_HYBRID_THRESHOLD     30
980
+  #define E2_HYBRID_THRESHOLD     30
981
+  #define E3_HYBRID_THRESHOLD     30
982
+  #define E4_HYBRID_THRESHOLD     30
983
+
984
+  /**
985
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
986
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
987
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
988
+   *
989
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
990
+   * Higher values make the system LESS sensitive.
991
+   * Lower value make the system MORE sensitive.
992
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
993
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
994
+   * M914 X/Y to live tune the setting
995
+   */
996
+  //#define SENSORLESS_HOMING
997
+
998
+  #if ENABLED(SENSORLESS_HOMING)
999
+    #define X_HOMING_SENSITIVITY  19
1000
+    #define Y_HOMING_SENSITIVITY  19
1001
+  #endif
955 1002
 
956 1003
   /**
957 1004
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -879,18 +879,6 @@
879 879
 //#define HAVE_TMC2130
880 880
 
881 881
 #if ENABLED(HAVE_TMC2130)
882
-  #define STEALTHCHOP
883
-
884
-  /**
885
-   * Let Marlin automatically control stepper current.
886
-   * This is still an experimental feature.
887
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
888
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
889
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
890
-   */
891
-  //#define AUTOMATIC_CURRENT_CONTROL
892
-  #define CURRENT_STEP          50  // [mA]
893
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
894 882
 
895 883
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
896 884
   //#define X_IS_TMC2130
@@ -913,45 +901,104 @@
913 901
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
914 902
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
915 903
 
916
-  #define X_MAX_CURRENT     1000  // rms current in mA
917
-  #define X_MICROSTEPS        16  // FULLSTEP..256
918
-  #define X_CHIP_SELECT       40  // Pin
904
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
905
+  #define X_MICROSTEPS        16  // 0..256
919 906
 
920
-  #define Y_MAX_CURRENT     1000
907
+  #define Y_CURRENT         1000
921 908
   #define Y_MICROSTEPS        16
922
-  #define Y_CHIP_SELECT       42
923 909
 
924
-  #define Z_MAX_CURRENT     1000
910
+  #define Z_CURRENT         1000
925 911
   #define Z_MICROSTEPS        16
926
-  #define Z_CHIP_SELECT       65
927 912
 
928
-  //#define X2_MAX_CURRENT  1000
913
+  //#define X2_CURRENT      1000
929 914
   //#define X2_MICROSTEPS     16
930
-  //#define X2_CHIP_SELECT    -1
931 915
 
932
-  //#define Y2_MAX_CURRENT  1000
916
+  //#define Y2_CURRENT      1000
933 917
   //#define Y2_MICROSTEPS     16
934
-  //#define Y2_CHIP_SELECT    -1
935 918
 
936
-  //#define Z2_MAX_CURRENT  1000
919
+  //#define Z2_CURRENT      1000
937 920
   //#define Z2_MICROSTEPS     16
938
-  //#define Z2_CHIP_SELECT    -1
939 921
 
940
-  //#define E0_MAX_CURRENT  1000
922
+  //#define E0_CURRENT      1000
941 923
   //#define E0_MICROSTEPS     16
942
-  //#define E0_CHIP_SELECT    -1
943 924
 
944
-  //#define E1_MAX_CURRENT  1000
925
+  //#define E1_CURRENT      1000
945 926
   //#define E1_MICROSTEPS     16
946
-  //#define E1_CHIP_SELECT    -1
947 927
 
948
-  //#define E2_MAX_CURRENT  1000
928
+  //#define E2_CURRENT      1000
949 929
   //#define E2_MICROSTEPS     16
950
-  //#define E2_CHIP_SELECT    -1
951 930
 
952
-  //#define E3_MAX_CURRENT  1000
931
+  //#define E3_CURRENT      1000
953 932
   //#define E3_MICROSTEPS     16
954
-  //#define E3_CHIP_SELECT    -1
933
+
934
+  //#define E4_CURRENT      1000
935
+  //#define E4_MICROSTEPS     16
936
+
937
+  /**
938
+   * Use Trinamic's ultra quiet stepping mode.
939
+   * When disabled, Marlin will use spreadCycle stepping mode.
940
+   */
941
+  #define STEALTHCHOP
942
+
943
+  /**
944
+   * Let Marlin automatically control stepper current.
945
+   * This is still an experimental feature.
946
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
947
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
948
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
949
+   * Relevant g-codes:
950
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
951
+   * M906 S1 - Start adjusting current
952
+   * M906 S0 - Stop adjusting current
953
+   * M911 - Report stepper driver overtemperature pre-warn condition.
954
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
955
+   */
956
+  //#define AUTOMATIC_CURRENT_CONTROL
957
+
958
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
959
+    #define CURRENT_STEP          50  // [mA]
960
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
961
+    #define REPORT_CURRENT_CHANGE
962
+  #endif
963
+
964
+  /**
965
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
966
+   * This mode allows for faster movements at the expense of higher noise levels.
967
+   * STEALTHCHOP needs to be enabled.
968
+   * M913 X/Y/Z/E to live tune the setting
969
+   */
970
+  //#define HYBRID_THRESHOLD
971
+
972
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
973
+  #define X2_HYBRID_THRESHOLD    100
974
+  #define Y_HYBRID_THRESHOLD     100
975
+  #define Y2_HYBRID_THRESHOLD    100
976
+  #define Z_HYBRID_THRESHOLD       4
977
+  #define Z2_HYBRID_THRESHOLD      4
978
+  #define E0_HYBRID_THRESHOLD     30
979
+  #define E1_HYBRID_THRESHOLD     30
980
+  #define E2_HYBRID_THRESHOLD     30
981
+  #define E3_HYBRID_THRESHOLD     30
982
+  #define E4_HYBRID_THRESHOLD     30
983
+
984
+  /**
985
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
986
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
987
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
988
+   *
989
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
990
+   * Higher values make the system LESS sensitive.
991
+   * Lower value make the system MORE sensitive.
992
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
993
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
994
+   * M914 X/Y to live tune the setting
995
+   */
996
+  //#define SENSORLESS_HOMING
997
+
998
+  #if ENABLED(SENSORLESS_HOMING)
999
+    #define X_HOMING_SENSITIVITY  19
1000
+    #define Y_HOMING_SENSITIVITY  19
1001
+  #endif
955 1002
 
956 1003
   /**
957 1004
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -879,18 +879,6 @@
879 879
 //#define HAVE_TMC2130
880 880
 
881 881
 #if ENABLED(HAVE_TMC2130)
882
-  #define STEALTHCHOP
883
-
884
-  /**
885
-   * Let Marlin automatically control stepper current.
886
-   * This is still an experimental feature.
887
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
888
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
889
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
890
-   */
891
-  //#define AUTOMATIC_CURRENT_CONTROL
892
-  #define CURRENT_STEP          50  // [mA]
893
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
894 882
 
895 883
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
896 884
   //#define X_IS_TMC2130
@@ -913,45 +901,104 @@
913 901
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
914 902
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
915 903
 
916
-  #define X_MAX_CURRENT     1000  // rms current in mA
917
-  #define X_MICROSTEPS        16  // FULLSTEP..256
918
-  #define X_CHIP_SELECT       40  // Pin
904
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
905
+  #define X_MICROSTEPS        16  // 0..256
919 906
 
920
-  #define Y_MAX_CURRENT     1000
907
+  #define Y_CURRENT         1000
921 908
   #define Y_MICROSTEPS        16
922
-  #define Y_CHIP_SELECT       42
923 909
 
924
-  #define Z_MAX_CURRENT     1000
910
+  #define Z_CURRENT         1000
925 911
   #define Z_MICROSTEPS        16
926
-  #define Z_CHIP_SELECT       65
927 912
 
928
-  //#define X2_MAX_CURRENT  1000
913
+  //#define X2_CURRENT      1000
929 914
   //#define X2_MICROSTEPS     16
930
-  //#define X2_CHIP_SELECT    -1
931 915
 
932
-  //#define Y2_MAX_CURRENT  1000
916
+  //#define Y2_CURRENT      1000
933 917
   //#define Y2_MICROSTEPS     16
934
-  //#define Y2_CHIP_SELECT    -1
935 918
 
936
-  //#define Z2_MAX_CURRENT  1000
919
+  //#define Z2_CURRENT      1000
937 920
   //#define Z2_MICROSTEPS     16
938
-  //#define Z2_CHIP_SELECT    -1
939 921
 
940
-  //#define E0_MAX_CURRENT  1000
922
+  //#define E0_CURRENT      1000
941 923
   //#define E0_MICROSTEPS     16
942
-  //#define E0_CHIP_SELECT    -1
943 924
 
944
-  //#define E1_MAX_CURRENT  1000
925
+  //#define E1_CURRENT      1000
945 926
   //#define E1_MICROSTEPS     16
946
-  //#define E1_CHIP_SELECT    -1
947 927
 
948
-  //#define E2_MAX_CURRENT  1000
928
+  //#define E2_CURRENT      1000
949 929
   //#define E2_MICROSTEPS     16
950
-  //#define E2_CHIP_SELECT    -1
951 930
 
952
-  //#define E3_MAX_CURRENT  1000
931
+  //#define E3_CURRENT      1000
953 932
   //#define E3_MICROSTEPS     16
954
-  //#define E3_CHIP_SELECT    -1
933
+
934
+  //#define E4_CURRENT      1000
935
+  //#define E4_MICROSTEPS     16
936
+
937
+  /**
938
+   * Use Trinamic's ultra quiet stepping mode.
939
+   * When disabled, Marlin will use spreadCycle stepping mode.
940
+   */
941
+  #define STEALTHCHOP
942
+
943
+  /**
944
+   * Let Marlin automatically control stepper current.
945
+   * This is still an experimental feature.
946
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
947
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
948
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
949
+   * Relevant g-codes:
950
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
951
+   * M906 S1 - Start adjusting current
952
+   * M906 S0 - Stop adjusting current
953
+   * M911 - Report stepper driver overtemperature pre-warn condition.
954
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
955
+   */
956
+  //#define AUTOMATIC_CURRENT_CONTROL
957
+
958
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
959
+    #define CURRENT_STEP          50  // [mA]
960
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
961
+    #define REPORT_CURRENT_CHANGE
962
+  #endif
963
+
964
+  /**
965
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
966
+   * This mode allows for faster movements at the expense of higher noise levels.
967
+   * STEALTHCHOP needs to be enabled.
968
+   * M913 X/Y/Z/E to live tune the setting
969
+   */
970
+  //#define HYBRID_THRESHOLD
971
+
972
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
973
+  #define X2_HYBRID_THRESHOLD    100
974
+  #define Y_HYBRID_THRESHOLD     100
975
+  #define Y2_HYBRID_THRESHOLD    100
976
+  #define Z_HYBRID_THRESHOLD       4
977
+  #define Z2_HYBRID_THRESHOLD      4
978
+  #define E0_HYBRID_THRESHOLD     30
979
+  #define E1_HYBRID_THRESHOLD     30
980
+  #define E2_HYBRID_THRESHOLD     30
981
+  #define E3_HYBRID_THRESHOLD     30
982
+  #define E4_HYBRID_THRESHOLD     30
983
+
984
+  /**
985
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
986
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
987
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
988
+   *
989
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
990
+   * Higher values make the system LESS sensitive.
991
+   * Lower value make the system MORE sensitive.
992
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
993
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
994
+   * M914 X/Y to live tune the setting
995
+   */
996
+  //#define SENSORLESS_HOMING
997
+
998
+  #if ENABLED(SENSORLESS_HOMING)
999
+    #define X_HOMING_SENSITIVITY  19
1000
+    #define Y_HOMING_SENSITIVITY  19
1001
+  #endif
955 1002
 
956 1003
   /**
957 1004
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -887,18 +887,6 @@
887 887
 //#define HAVE_TMC2130
888 888
 
889 889
 #if ENABLED(HAVE_TMC2130)
890
-  #define STEALTHCHOP
891
-
892
-  /**
893
-   * Let Marlin automatically control stepper current.
894
-   * This is still an experimental feature.
895
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
896
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
897
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
898
-   */
899
-  //#define AUTOMATIC_CURRENT_CONTROL
900
-  #define CURRENT_STEP          50  // [mA]
901
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
902 890
 
903 891
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
904 892
   //#define X_IS_TMC2130
@@ -921,45 +909,104 @@
921 909
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
922 910
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
923 911
 
924
-  #define X_MAX_CURRENT     1000  // rms current in mA
925
-  #define X_MICROSTEPS        16  // FULLSTEP..256
926
-  #define X_CHIP_SELECT       40  // Pin
912
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
913
+  #define X_MICROSTEPS        16  // 0..256
927 914
 
928
-  #define Y_MAX_CURRENT     1000
915
+  #define Y_CURRENT         1000
929 916
   #define Y_MICROSTEPS        16
930
-  #define Y_CHIP_SELECT       42
931 917
 
932
-  #define Z_MAX_CURRENT     1000
918
+  #define Z_CURRENT         1000
933 919
   #define Z_MICROSTEPS        16
934
-  #define Z_CHIP_SELECT       65
935 920
 
936
-  //#define X2_MAX_CURRENT  1000
921
+  //#define X2_CURRENT      1000
937 922
   //#define X2_MICROSTEPS     16
938
-  //#define X2_CHIP_SELECT    -1
939 923
 
940
-  //#define Y2_MAX_CURRENT  1000
924
+  //#define Y2_CURRENT      1000
941 925
   //#define Y2_MICROSTEPS     16
942
-  //#define Y2_CHIP_SELECT    -1
943 926
 
944
-  //#define Z2_MAX_CURRENT  1000
927
+  //#define Z2_CURRENT      1000
945 928
   //#define Z2_MICROSTEPS     16
946
-  //#define Z2_CHIP_SELECT    -1
947 929
 
948
-  //#define E0_MAX_CURRENT  1000
930
+  //#define E0_CURRENT      1000
949 931
   //#define E0_MICROSTEPS     16
950
-  //#define E0_CHIP_SELECT    -1
951 932
 
952
-  //#define E1_MAX_CURRENT  1000
933
+  //#define E1_CURRENT      1000
953 934
   //#define E1_MICROSTEPS     16
954
-  //#define E1_CHIP_SELECT    -1
955 935
 
956
-  //#define E2_MAX_CURRENT  1000
936
+  //#define E2_CURRENT      1000
957 937
   //#define E2_MICROSTEPS     16
958
-  //#define E2_CHIP_SELECT    -1
959 938
 
960
-  //#define E3_MAX_CURRENT  1000
939
+  //#define E3_CURRENT      1000
961 940
   //#define E3_MICROSTEPS     16
962
-  //#define E3_CHIP_SELECT    -1
941
+
942
+  //#define E4_CURRENT      1000
943
+  //#define E4_MICROSTEPS     16
944
+
945
+  /**
946
+   * Use Trinamic's ultra quiet stepping mode.
947
+   * When disabled, Marlin will use spreadCycle stepping mode.
948
+   */
949
+  #define STEALTHCHOP
950
+
951
+  /**
952
+   * Let Marlin automatically control stepper current.
953
+   * This is still an experimental feature.
954
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
955
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
956
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
957
+   * Relevant g-codes:
958
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
959
+   * M906 S1 - Start adjusting current
960
+   * M906 S0 - Stop adjusting current
961
+   * M911 - Report stepper driver overtemperature pre-warn condition.
962
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
963
+   */
964
+  //#define AUTOMATIC_CURRENT_CONTROL
965
+
966
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
967
+    #define CURRENT_STEP          50  // [mA]
968
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
969
+    #define REPORT_CURRENT_CHANGE
970
+  #endif
971
+
972
+  /**
973
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
974
+   * This mode allows for faster movements at the expense of higher noise levels.
975
+   * STEALTHCHOP needs to be enabled.
976
+   * M913 X/Y/Z/E to live tune the setting
977
+   */
978
+  //#define HYBRID_THRESHOLD
979
+
980
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
981
+  #define X2_HYBRID_THRESHOLD    100
982
+  #define Y_HYBRID_THRESHOLD     100
983
+  #define Y2_HYBRID_THRESHOLD    100
984
+  #define Z_HYBRID_THRESHOLD       4
985
+  #define Z2_HYBRID_THRESHOLD      4
986
+  #define E0_HYBRID_THRESHOLD     30
987
+  #define E1_HYBRID_THRESHOLD     30
988
+  #define E2_HYBRID_THRESHOLD     30
989
+  #define E3_HYBRID_THRESHOLD     30
990
+  #define E4_HYBRID_THRESHOLD     30
991
+
992
+  /**
993
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
994
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
995
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
996
+   *
997
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
998
+   * Higher values make the system LESS sensitive.
999
+   * Lower value make the system MORE sensitive.
1000
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
1001
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
1002
+   * M914 X/Y to live tune the setting
1003
+   */
1004
+  //#define SENSORLESS_HOMING
1005
+
1006
+  #if ENABLED(SENSORLESS_HOMING)
1007
+    #define X_HOMING_SENSITIVITY  19
1008
+    #define Y_HOMING_SENSITIVITY  19
1009
+  #endif
963 1010
 
964 1011
   /**
965 1012
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/TinyBoy2/Configuration_adv.h View File

@@ -882,18 +882,6 @@
882 882
 //#define HAVE_TMC2130
883 883
 
884 884
 #if ENABLED(HAVE_TMC2130)
885
-  #define STEALTHCHOP
886
-
887
-  /**
888
-   * Let Marlin automatically control stepper current.
889
-   * This is still an experimental feature.
890
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
891
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
892
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
893
-   */
894
-  //#define AUTOMATIC_CURRENT_CONTROL
895
-  #define CURRENT_STEP          50  // [mA]
896
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
897 885
 
898 886
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
899 887
   //#define X_IS_TMC2130
@@ -916,45 +904,104 @@
916 904
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
917 905
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
918 906
 
919
-  #define X_MAX_CURRENT     1000  // rms current in mA
920
-  #define X_MICROSTEPS        16  // FULLSTEP..256
921
-  #define X_CHIP_SELECT       40  // Pin
907
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
908
+  #define X_MICROSTEPS        16  // 0..256
922 909
 
923
-  #define Y_MAX_CURRENT     1000
910
+  #define Y_CURRENT         1000
924 911
   #define Y_MICROSTEPS        16
925
-  #define Y_CHIP_SELECT       42
926 912
 
927
-  #define Z_MAX_CURRENT     1000
913
+  #define Z_CURRENT         1000
928 914
   #define Z_MICROSTEPS        16
929
-  #define Z_CHIP_SELECT       65
930 915
 
931
-  //#define X2_MAX_CURRENT  1000
916
+  //#define X2_CURRENT      1000
932 917
   //#define X2_MICROSTEPS     16
933
-  //#define X2_CHIP_SELECT    -1
934 918
 
935
-  //#define Y2_MAX_CURRENT  1000
919
+  //#define Y2_CURRENT      1000
936 920
   //#define Y2_MICROSTEPS     16
937
-  //#define Y2_CHIP_SELECT    -1
938 921
 
939
-  //#define Z2_MAX_CURRENT  1000
922
+  //#define Z2_CURRENT      1000
940 923
   //#define Z2_MICROSTEPS     16
941
-  //#define Z2_CHIP_SELECT    -1
942 924
 
943
-  //#define E0_MAX_CURRENT  1000
925
+  //#define E0_CURRENT      1000
944 926
   //#define E0_MICROSTEPS     16
945
-  //#define E0_CHIP_SELECT    -1
946 927
 
947
-  //#define E1_MAX_CURRENT  1000
928
+  //#define E1_CURRENT      1000
948 929
   //#define E1_MICROSTEPS     16
949
-  //#define E1_CHIP_SELECT    -1
950 930
 
951
-  //#define E2_MAX_CURRENT  1000
931
+  //#define E2_CURRENT      1000
952 932
   //#define E2_MICROSTEPS     16
953
-  //#define E2_CHIP_SELECT    -1
954 933
 
955
-  //#define E3_MAX_CURRENT  1000
934
+  //#define E3_CURRENT      1000
956 935
   //#define E3_MICROSTEPS     16
957
-  //#define E3_CHIP_SELECT    -1
936
+
937
+  //#define E4_CURRENT      1000
938
+  //#define E4_MICROSTEPS     16
939
+
940
+  /**
941
+   * Use Trinamic's ultra quiet stepping mode.
942
+   * When disabled, Marlin will use spreadCycle stepping mode.
943
+   */
944
+  #define STEALTHCHOP
945
+
946
+  /**
947
+   * Let Marlin automatically control stepper current.
948
+   * This is still an experimental feature.
949
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
950
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
951
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
952
+   * Relevant g-codes:
953
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
954
+   * M906 S1 - Start adjusting current
955
+   * M906 S0 - Stop adjusting current
956
+   * M911 - Report stepper driver overtemperature pre-warn condition.
957
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
958
+   */
959
+  //#define AUTOMATIC_CURRENT_CONTROL
960
+
961
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
962
+    #define CURRENT_STEP          50  // [mA]
963
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
964
+    #define REPORT_CURRENT_CHANGE
965
+  #endif
966
+
967
+  /**
968
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
969
+   * This mode allows for faster movements at the expense of higher noise levels.
970
+   * STEALTHCHOP needs to be enabled.
971
+   * M913 X/Y/Z/E to live tune the setting
972
+   */
973
+  //#define HYBRID_THRESHOLD
974
+
975
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
976
+  #define X2_HYBRID_THRESHOLD    100
977
+  #define Y_HYBRID_THRESHOLD     100
978
+  #define Y2_HYBRID_THRESHOLD    100
979
+  #define Z_HYBRID_THRESHOLD       4
980
+  #define Z2_HYBRID_THRESHOLD      4
981
+  #define E0_HYBRID_THRESHOLD     30
982
+  #define E1_HYBRID_THRESHOLD     30
983
+  #define E2_HYBRID_THRESHOLD     30
984
+  #define E3_HYBRID_THRESHOLD     30
985
+  #define E4_HYBRID_THRESHOLD     30
986
+
987
+  /**
988
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
989
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
990
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
991
+   *
992
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
993
+   * Higher values make the system LESS sensitive.
994
+   * Lower value make the system MORE sensitive.
995
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
996
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
997
+   * M914 X/Y to live tune the setting
998
+   */
999
+  //#define SENSORLESS_HOMING
1000
+
1001
+  #if ENABLED(SENSORLESS_HOMING)
1002
+    #define X_HOMING_SENSITIVITY  19
1003
+    #define Y_HOMING_SENSITIVITY  19
1004
+  #endif
958 1005
 
959 1006
   /**
960 1007
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -879,18 +879,6 @@
879 879
 //#define HAVE_TMC2130
880 880
 
881 881
 #if ENABLED(HAVE_TMC2130)
882
-  #define STEALTHCHOP
883
-
884
-  /**
885
-   * Let Marlin automatically control stepper current.
886
-   * This is still an experimental feature.
887
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
888
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
889
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
890
-   */
891
-  //#define AUTOMATIC_CURRENT_CONTROL
892
-  #define CURRENT_STEP          50  // [mA]
893
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
894 882
 
895 883
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
896 884
   //#define X_IS_TMC2130
@@ -913,45 +901,104 @@
913 901
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
914 902
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
915 903
 
916
-  #define X_MAX_CURRENT     1000  // rms current in mA
917
-  #define X_MICROSTEPS        16  // FULLSTEP..256
918
-  #define X_CHIP_SELECT       40  // Pin
904
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
905
+  #define X_MICROSTEPS        16  // 0..256
919 906
 
920
-  #define Y_MAX_CURRENT     1000
907
+  #define Y_CURRENT         1000
921 908
   #define Y_MICROSTEPS        16
922
-  #define Y_CHIP_SELECT       42
923 909
 
924
-  #define Z_MAX_CURRENT     1000
910
+  #define Z_CURRENT         1000
925 911
   #define Z_MICROSTEPS        16
926
-  #define Z_CHIP_SELECT       65
927 912
 
928
-  //#define X2_MAX_CURRENT  1000
913
+  //#define X2_CURRENT      1000
929 914
   //#define X2_MICROSTEPS     16
930
-  //#define X2_CHIP_SELECT    -1
931 915
 
932
-  //#define Y2_MAX_CURRENT  1000
916
+  //#define Y2_CURRENT      1000
933 917
   //#define Y2_MICROSTEPS     16
934
-  //#define Y2_CHIP_SELECT    -1
935 918
 
936
-  //#define Z2_MAX_CURRENT  1000
919
+  //#define Z2_CURRENT      1000
937 920
   //#define Z2_MICROSTEPS     16
938
-  //#define Z2_CHIP_SELECT    -1
939 921
 
940
-  //#define E0_MAX_CURRENT  1000
922
+  //#define E0_CURRENT      1000
941 923
   //#define E0_MICROSTEPS     16
942
-  //#define E0_CHIP_SELECT    -1
943 924
 
944
-  //#define E1_MAX_CURRENT  1000
925
+  //#define E1_CURRENT      1000
945 926
   //#define E1_MICROSTEPS     16
946
-  //#define E1_CHIP_SELECT    -1
947 927
 
948
-  //#define E2_MAX_CURRENT  1000
928
+  //#define E2_CURRENT      1000
949 929
   //#define E2_MICROSTEPS     16
950
-  //#define E2_CHIP_SELECT    -1
951 930
 
952
-  //#define E3_MAX_CURRENT  1000
931
+  //#define E3_CURRENT      1000
953 932
   //#define E3_MICROSTEPS     16
954
-  //#define E3_CHIP_SELECT    -1
933
+
934
+  //#define E4_CURRENT      1000
935
+  //#define E4_MICROSTEPS     16
936
+
937
+  /**
938
+   * Use Trinamic's ultra quiet stepping mode.
939
+   * When disabled, Marlin will use spreadCycle stepping mode.
940
+   */
941
+  #define STEALTHCHOP
942
+
943
+  /**
944
+   * Let Marlin automatically control stepper current.
945
+   * This is still an experimental feature.
946
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
947
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
948
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
949
+   * Relevant g-codes:
950
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
951
+   * M906 S1 - Start adjusting current
952
+   * M906 S0 - Stop adjusting current
953
+   * M911 - Report stepper driver overtemperature pre-warn condition.
954
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
955
+   */
956
+  //#define AUTOMATIC_CURRENT_CONTROL
957
+
958
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
959
+    #define CURRENT_STEP          50  // [mA]
960
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
961
+    #define REPORT_CURRENT_CHANGE
962
+  #endif
963
+
964
+  /**
965
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
966
+   * This mode allows for faster movements at the expense of higher noise levels.
967
+   * STEALTHCHOP needs to be enabled.
968
+   * M913 X/Y/Z/E to live tune the setting
969
+   */
970
+  //#define HYBRID_THRESHOLD
971
+
972
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
973
+  #define X2_HYBRID_THRESHOLD    100
974
+  #define Y_HYBRID_THRESHOLD     100
975
+  #define Y2_HYBRID_THRESHOLD    100
976
+  #define Z_HYBRID_THRESHOLD       4
977
+  #define Z2_HYBRID_THRESHOLD      4
978
+  #define E0_HYBRID_THRESHOLD     30
979
+  #define E1_HYBRID_THRESHOLD     30
980
+  #define E2_HYBRID_THRESHOLD     30
981
+  #define E3_HYBRID_THRESHOLD     30
982
+  #define E4_HYBRID_THRESHOLD     30
983
+
984
+  /**
985
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
986
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
987
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
988
+   *
989
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
990
+   * Higher values make the system LESS sensitive.
991
+   * Lower value make the system MORE sensitive.
992
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
993
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
994
+   * M914 X/Y to live tune the setting
995
+   */
996
+  //#define SENSORLESS_HOMING
997
+
998
+  #if ENABLED(SENSORLESS_HOMING)
999
+    #define X_HOMING_SENSITIVITY  19
1000
+    #define Y_HOMING_SENSITIVITY  19
1001
+  #endif
955 1002
 
956 1003
   /**
957 1004
    * You can set your own advanced settings by filling in predefined functions.

+ 85
- 34
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 
@@ -899,18 +903,6 @@
899 903
 //#define HAVE_TMC2130
900 904
 
901 905
 #if ENABLED(HAVE_TMC2130)
902
-  #define STEALTHCHOP
903
-
904
-  /**
905
-   * Let Marlin automatically control stepper current.
906
-   * This is still an experimental feature.
907
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
908
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
909
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
910
-   */
911
-  //#define AUTOMATIC_CURRENT_CONTROL
912
-  #define CURRENT_STEP          50  // [mA]
913
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
914 906
 
915 907
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
916 908
   //#define X_IS_TMC2130
@@ -933,45 +925,104 @@
933 925
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
934 926
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
935 927
 
936
-  #define X_MAX_CURRENT     1000  // rms current in mA
937
-  #define X_MICROSTEPS        16  // FULLSTEP..256
938
-  #define X_CHIP_SELECT       40  // Pin
928
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
929
+  #define X_MICROSTEPS        16  // 0..256
939 930
 
940
-  #define Y_MAX_CURRENT     1000
931
+  #define Y_CURRENT         1000
941 932
   #define Y_MICROSTEPS        16
942
-  #define Y_CHIP_SELECT       42
943 933
 
944
-  #define Z_MAX_CURRENT     1000
934
+  #define Z_CURRENT         1000
945 935
   #define Z_MICROSTEPS        16
946
-  #define Z_CHIP_SELECT       65
947 936
 
948
-  //#define X2_MAX_CURRENT  1000
937
+  //#define X2_CURRENT      1000
949 938
   //#define X2_MICROSTEPS     16
950
-  //#define X2_CHIP_SELECT    -1
951 939
 
952
-  //#define Y2_MAX_CURRENT  1000
940
+  //#define Y2_CURRENT      1000
953 941
   //#define Y2_MICROSTEPS     16
954
-  //#define Y2_CHIP_SELECT    -1
955 942
 
956
-  //#define Z2_MAX_CURRENT  1000
943
+  //#define Z2_CURRENT      1000
957 944
   //#define Z2_MICROSTEPS     16
958
-  //#define Z2_CHIP_SELECT    -1
959 945
 
960
-  //#define E0_MAX_CURRENT  1000
946
+  //#define E0_CURRENT      1000
961 947
   //#define E0_MICROSTEPS     16
962
-  //#define E0_CHIP_SELECT    -1
963 948
 
964
-  //#define E1_MAX_CURRENT  1000
949
+  //#define E1_CURRENT      1000
965 950
   //#define E1_MICROSTEPS     16
966
-  //#define E1_CHIP_SELECT    -1
967 951
 
968
-  //#define E2_MAX_CURRENT  1000
952
+  //#define E2_CURRENT      1000
969 953
   //#define E2_MICROSTEPS     16
970
-  //#define E2_CHIP_SELECT    -1
971 954
 
972
-  //#define E3_MAX_CURRENT  1000
955
+  //#define E3_CURRENT      1000
973 956
   //#define E3_MICROSTEPS     16
974
-  //#define E3_CHIP_SELECT    -1
957
+
958
+  //#define E4_CURRENT      1000
959
+  //#define E4_MICROSTEPS     16
960
+
961
+  /**
962
+   * Use Trinamic's ultra quiet stepping mode.
963
+   * When disabled, Marlin will use spreadCycle stepping mode.
964
+   */
965
+  #define STEALTHCHOP
966
+
967
+  /**
968
+   * Let Marlin automatically control stepper current.
969
+   * This is still an experimental feature.
970
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
971
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
972
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
973
+   * Relevant g-codes:
974
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
975
+   * M906 S1 - Start adjusting current
976
+   * M906 S0 - Stop adjusting current
977
+   * M911 - Report stepper driver overtemperature pre-warn condition.
978
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
979
+   */
980
+  //#define AUTOMATIC_CURRENT_CONTROL
981
+
982
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
983
+    #define CURRENT_STEP          50  // [mA]
984
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
985
+    #define REPORT_CURRENT_CHANGE
986
+  #endif
987
+
988
+  /**
989
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
990
+   * This mode allows for faster movements at the expense of higher noise levels.
991
+   * STEALTHCHOP needs to be enabled.
992
+   * M913 X/Y/Z/E to live tune the setting
993
+   */
994
+  //#define HYBRID_THRESHOLD
995
+
996
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
997
+  #define X2_HYBRID_THRESHOLD    100
998
+  #define Y_HYBRID_THRESHOLD     100
999
+  #define Y2_HYBRID_THRESHOLD    100
1000
+  #define Z_HYBRID_THRESHOLD       4
1001
+  #define Z2_HYBRID_THRESHOLD      4
1002
+  #define E0_HYBRID_THRESHOLD     30
1003
+  #define E1_HYBRID_THRESHOLD     30
1004
+  #define E2_HYBRID_THRESHOLD     30
1005
+  #define E3_HYBRID_THRESHOLD     30
1006
+  #define E4_HYBRID_THRESHOLD     30
1007
+
1008
+  /**
1009
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
1010
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1011
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1012
+   *
1013
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1014
+   * Higher values make the system LESS sensitive.
1015
+   * Lower value make the system MORE sensitive.
1016
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
1017
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
1018
+   * M914 X/Y to live tune the setting
1019
+   */
1020
+  //#define SENSORLESS_HOMING
1021
+
1022
+  #if ENABLED(SENSORLESS_HOMING)
1023
+    #define X_HOMING_SENSITIVITY  19
1024
+    #define Y_HOMING_SENSITIVITY  19
1025
+  #endif
975 1026
 
976 1027
   /**
977 1028
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h View File

@@ -902,18 +902,6 @@
902 902
 //#define HAVE_TMC2130
903 903
 
904 904
 #if ENABLED(HAVE_TMC2130)
905
-  #define STEALTHCHOP
906
-
907
-  /**
908
-   * Let Marlin automatically control stepper current.
909
-   * This is still an experimental feature.
910
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
911
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
912
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
913
-   */
914
-  //#define AUTOMATIC_CURRENT_CONTROL
915
-  #define CURRENT_STEP          50  // [mA]
916
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
917 905
 
918 906
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
919 907
   //#define X_IS_TMC2130
@@ -936,45 +924,104 @@
936 924
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
937 925
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
938 926
 
939
-  #define X_MAX_CURRENT     1000  // rms current in mA
940
-  #define X_MICROSTEPS        16  // FULLSTEP..256
941
-  #define X_CHIP_SELECT       40  // Pin
927
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
928
+  #define X_MICROSTEPS        16  // 0..256
942 929
 
943
-  #define Y_MAX_CURRENT     1000
930
+  #define Y_CURRENT         1000
944 931
   #define Y_MICROSTEPS        16
945
-  #define Y_CHIP_SELECT       42
946 932
 
947
-  #define Z_MAX_CURRENT     1000
933
+  #define Z_CURRENT         1000
948 934
   #define Z_MICROSTEPS        16
949
-  #define Z_CHIP_SELECT       65
950 935
 
951
-  //#define X2_MAX_CURRENT  1000
936
+  //#define X2_CURRENT      1000
952 937
   //#define X2_MICROSTEPS     16
953
-  //#define X2_CHIP_SELECT    -1
954 938
 
955
-  //#define Y2_MAX_CURRENT  1000
939
+  //#define Y2_CURRENT      1000
956 940
   //#define Y2_MICROSTEPS     16
957
-  //#define Y2_CHIP_SELECT    -1
958 941
 
959
-  //#define Z2_MAX_CURRENT  1000
942
+  //#define Z2_CURRENT      1000
960 943
   //#define Z2_MICROSTEPS     16
961
-  //#define Z2_CHIP_SELECT    -1
962 944
 
963
-  //#define E0_MAX_CURRENT  1000
945
+  //#define E0_CURRENT      1000
964 946
   //#define E0_MICROSTEPS     16
965
-  //#define E0_CHIP_SELECT    -1
966 947
 
967
-  //#define E1_MAX_CURRENT  1000
948
+  //#define E1_CURRENT      1000
968 949
   //#define E1_MICROSTEPS     16
969
-  //#define E1_CHIP_SELECT    -1
970 950
 
971
-  //#define E2_MAX_CURRENT  1000
951
+  //#define E2_CURRENT      1000
972 952
   //#define E2_MICROSTEPS     16
973
-  //#define E2_CHIP_SELECT    -1
974 953
 
975
-  //#define E3_MAX_CURRENT  1000
954
+  //#define E3_CURRENT      1000
976 955
   //#define E3_MICROSTEPS     16
977
-  //#define E3_CHIP_SELECT    -1
956
+
957
+  //#define E4_CURRENT      1000
958
+  //#define E4_MICROSTEPS     16
959
+
960
+  /**
961
+   * Use Trinamic's ultra quiet stepping mode.
962
+   * When disabled, Marlin will use spreadCycle stepping mode.
963
+   */
964
+  #define STEALTHCHOP
965
+
966
+  /**
967
+   * Let Marlin automatically control stepper current.
968
+   * This is still an experimental feature.
969
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
970
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
971
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
972
+   * Relevant g-codes:
973
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
974
+   * M906 S1 - Start adjusting current
975
+   * M906 S0 - Stop adjusting current
976
+   * M911 - Report stepper driver overtemperature pre-warn condition.
977
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
978
+   */
979
+  //#define AUTOMATIC_CURRENT_CONTROL
980
+
981
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
982
+    #define CURRENT_STEP          50  // [mA]
983
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
984
+    #define REPORT_CURRENT_CHANGE
985
+  #endif
986
+
987
+  /**
988
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
989
+   * This mode allows for faster movements at the expense of higher noise levels.
990
+   * STEALTHCHOP needs to be enabled.
991
+   * M913 X/Y/Z/E to live tune the setting
992
+   */
993
+  //#define HYBRID_THRESHOLD
994
+
995
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
996
+  #define X2_HYBRID_THRESHOLD    100
997
+  #define Y_HYBRID_THRESHOLD     100
998
+  #define Y2_HYBRID_THRESHOLD    100
999
+  #define Z_HYBRID_THRESHOLD       4
1000
+  #define Z2_HYBRID_THRESHOLD      4
1001
+  #define E0_HYBRID_THRESHOLD     30
1002
+  #define E1_HYBRID_THRESHOLD     30
1003
+  #define E2_HYBRID_THRESHOLD     30
1004
+  #define E3_HYBRID_THRESHOLD     30
1005
+  #define E4_HYBRID_THRESHOLD     30
1006
+
1007
+  /**
1008
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
1009
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1010
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1011
+   *
1012
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1013
+   * Higher values make the system LESS sensitive.
1014
+   * Lower value make the system MORE sensitive.
1015
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
1016
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
1017
+   * M914 X/Y to live tune the setting
1018
+   */
1019
+  //#define SENSORLESS_HOMING
1020
+
1021
+  #if ENABLED(SENSORLESS_HOMING)
1022
+    #define X_HOMING_SENSITIVITY  19
1023
+    #define Y_HOMING_SENSITIVITY  19
1024
+  #endif
978 1025
 
979 1026
   /**
980 1027
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -900,18 +900,6 @@
900 900
 //#define HAVE_TMC2130
901 901
 
902 902
 #if ENABLED(HAVE_TMC2130)
903
-  #define STEALTHCHOP
904
-
905
-  /**
906
-   * Let Marlin automatically control stepper current.
907
-   * This is still an experimental feature.
908
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
909
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
910
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
911
-   */
912
-  //#define AUTOMATIC_CURRENT_CONTROL
913
-  #define CURRENT_STEP          50  // [mA]
914
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
915 903
 
916 904
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
917 905
   //#define X_IS_TMC2130
@@ -934,45 +922,104 @@
934 922
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
935 923
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
936 924
 
937
-  #define X_MAX_CURRENT     1000  // rms current in mA
938
-  #define X_MICROSTEPS        16  // FULLSTEP..256
939
-  #define X_CHIP_SELECT       40  // Pin
925
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
926
+  #define X_MICROSTEPS        16  // 0..256
940 927
 
941
-  #define Y_MAX_CURRENT     1000
928
+  #define Y_CURRENT         1000
942 929
   #define Y_MICROSTEPS        16
943
-  #define Y_CHIP_SELECT       42
944 930
 
945
-  #define Z_MAX_CURRENT     1000
931
+  #define Z_CURRENT         1000
946 932
   #define Z_MICROSTEPS        16
947
-  #define Z_CHIP_SELECT       65
948 933
 
949
-  //#define X2_MAX_CURRENT  1000
934
+  //#define X2_CURRENT      1000
950 935
   //#define X2_MICROSTEPS     16
951
-  //#define X2_CHIP_SELECT    -1
952 936
 
953
-  //#define Y2_MAX_CURRENT  1000
937
+  //#define Y2_CURRENT      1000
954 938
   //#define Y2_MICROSTEPS     16
955
-  //#define Y2_CHIP_SELECT    -1
956 939
 
957
-  //#define Z2_MAX_CURRENT  1000
940
+  //#define Z2_CURRENT      1000
958 941
   //#define Z2_MICROSTEPS     16
959
-  //#define Z2_CHIP_SELECT    -1
960 942
 
961
-  //#define E0_MAX_CURRENT  1000
943
+  //#define E0_CURRENT      1000
962 944
   //#define E0_MICROSTEPS     16
963
-  //#define E0_CHIP_SELECT    -1
964 945
 
965
-  //#define E1_MAX_CURRENT  1000
946
+  //#define E1_CURRENT      1000
966 947
   //#define E1_MICROSTEPS     16
967
-  //#define E1_CHIP_SELECT    -1
968 948
 
969
-  //#define E2_MAX_CURRENT  1000
949
+  //#define E2_CURRENT      1000
970 950
   //#define E2_MICROSTEPS     16
971
-  //#define E2_CHIP_SELECT    -1
972 951
 
973
-  //#define E3_MAX_CURRENT  1000
952
+  //#define E3_CURRENT      1000
974 953
   //#define E3_MICROSTEPS     16
975
-  //#define E3_CHIP_SELECT    -1
954
+
955
+  //#define E4_CURRENT      1000
956
+  //#define E4_MICROSTEPS     16
957
+
958
+  /**
959
+   * Use Trinamic's ultra quiet stepping mode.
960
+   * When disabled, Marlin will use spreadCycle stepping mode.
961
+   */
962
+  #define STEALTHCHOP
963
+
964
+  /**
965
+   * Let Marlin automatically control stepper current.
966
+   * This is still an experimental feature.
967
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
968
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
969
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
970
+   * Relevant g-codes:
971
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
972
+   * M906 S1 - Start adjusting current
973
+   * M906 S0 - Stop adjusting current
974
+   * M911 - Report stepper driver overtemperature pre-warn condition.
975
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
976
+   */
977
+  //#define AUTOMATIC_CURRENT_CONTROL
978
+
979
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
980
+    #define CURRENT_STEP          50  // [mA]
981
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
982
+    #define REPORT_CURRENT_CHANGE
983
+  #endif
984
+
985
+  /**
986
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
987
+   * This mode allows for faster movements at the expense of higher noise levels.
988
+   * STEALTHCHOP needs to be enabled.
989
+   * M913 X/Y/Z/E to live tune the setting
990
+   */
991
+  //#define HYBRID_THRESHOLD
992
+
993
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
994
+  #define X2_HYBRID_THRESHOLD    100
995
+  #define Y_HYBRID_THRESHOLD     100
996
+  #define Y2_HYBRID_THRESHOLD    100
997
+  #define Z_HYBRID_THRESHOLD       4
998
+  #define Z2_HYBRID_THRESHOLD      4
999
+  #define E0_HYBRID_THRESHOLD     30
1000
+  #define E1_HYBRID_THRESHOLD     30
1001
+  #define E2_HYBRID_THRESHOLD     30
1002
+  #define E3_HYBRID_THRESHOLD     30
1003
+  #define E4_HYBRID_THRESHOLD     30
1004
+
1005
+  /**
1006
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
1007
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1008
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1009
+   *
1010
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1011
+   * Higher values make the system LESS sensitive.
1012
+   * Lower value make the system MORE sensitive.
1013
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
1014
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
1015
+   * M914 X/Y to live tune the setting
1016
+   */
1017
+  //#define SENSORLESS_HOMING
1018
+
1019
+  #if ENABLED(SENSORLESS_HOMING)
1020
+    #define X_HOMING_SENSITIVITY  19
1021
+    #define Y_HOMING_SENSITIVITY  19
1022
+  #endif
976 1023
 
977 1024
   /**
978 1025
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -900,18 +900,6 @@
900 900
 //#define HAVE_TMC2130
901 901
 
902 902
 #if ENABLED(HAVE_TMC2130)
903
-  #define STEALTHCHOP
904
-
905
-  /**
906
-   * Let Marlin automatically control stepper current.
907
-   * This is still an experimental feature.
908
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
909
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
910
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
911
-   */
912
-  //#define AUTOMATIC_CURRENT_CONTROL
913
-  #define CURRENT_STEP          50  // [mA]
914
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
915 903
 
916 904
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
917 905
   //#define X_IS_TMC2130
@@ -934,45 +922,104 @@
934 922
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
935 923
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
936 924
 
937
-  #define X_MAX_CURRENT     1000  // rms current in mA
938
-  #define X_MICROSTEPS        16  // FULLSTEP..256
939
-  #define X_CHIP_SELECT       40  // Pin
925
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
926
+  #define X_MICROSTEPS        16  // 0..256
940 927
 
941
-  #define Y_MAX_CURRENT     1000
928
+  #define Y_CURRENT         1000
942 929
   #define Y_MICROSTEPS        16
943
-  #define Y_CHIP_SELECT       42
944 930
 
945
-  #define Z_MAX_CURRENT     1000
931
+  #define Z_CURRENT         1000
946 932
   #define Z_MICROSTEPS        16
947
-  #define Z_CHIP_SELECT       65
948 933
 
949
-  //#define X2_MAX_CURRENT  1000
934
+  //#define X2_CURRENT      1000
950 935
   //#define X2_MICROSTEPS     16
951
-  //#define X2_CHIP_SELECT    -1
952 936
 
953
-  //#define Y2_MAX_CURRENT  1000
937
+  //#define Y2_CURRENT      1000
954 938
   //#define Y2_MICROSTEPS     16
955
-  //#define Y2_CHIP_SELECT    -1
956 939
 
957
-  //#define Z2_MAX_CURRENT  1000
940
+  //#define Z2_CURRENT      1000
958 941
   //#define Z2_MICROSTEPS     16
959
-  //#define Z2_CHIP_SELECT    -1
960 942
 
961
-  //#define E0_MAX_CURRENT  1000
943
+  //#define E0_CURRENT      1000
962 944
   //#define E0_MICROSTEPS     16
963
-  //#define E0_CHIP_SELECT    -1
964 945
 
965
-  //#define E1_MAX_CURRENT  1000
946
+  //#define E1_CURRENT      1000
966 947
   //#define E1_MICROSTEPS     16
967
-  //#define E1_CHIP_SELECT    -1
968 948
 
969
-  //#define E2_MAX_CURRENT  1000
949
+  //#define E2_CURRENT      1000
970 950
   //#define E2_MICROSTEPS     16
971
-  //#define E2_CHIP_SELECT    -1
972 951
 
973
-  //#define E3_MAX_CURRENT  1000
952
+  //#define E3_CURRENT      1000
974 953
   //#define E3_MICROSTEPS     16
975
-  //#define E3_CHIP_SELECT    -1
954
+
955
+  //#define E4_CURRENT      1000
956
+  //#define E4_MICROSTEPS     16
957
+
958
+  /**
959
+   * Use Trinamic's ultra quiet stepping mode.
960
+   * When disabled, Marlin will use spreadCycle stepping mode.
961
+   */
962
+  #define STEALTHCHOP
963
+
964
+  /**
965
+   * Let Marlin automatically control stepper current.
966
+   * This is still an experimental feature.
967
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
968
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
969
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
970
+   * Relevant g-codes:
971
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
972
+   * M906 S1 - Start adjusting current
973
+   * M906 S0 - Stop adjusting current
974
+   * M911 - Report stepper driver overtemperature pre-warn condition.
975
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
976
+   */
977
+  //#define AUTOMATIC_CURRENT_CONTROL
978
+
979
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
980
+    #define CURRENT_STEP          50  // [mA]
981
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
982
+    #define REPORT_CURRENT_CHANGE
983
+  #endif
984
+
985
+  /**
986
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
987
+   * This mode allows for faster movements at the expense of higher noise levels.
988
+   * STEALTHCHOP needs to be enabled.
989
+   * M913 X/Y/Z/E to live tune the setting
990
+   */
991
+  //#define HYBRID_THRESHOLD
992
+
993
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
994
+  #define X2_HYBRID_THRESHOLD    100
995
+  #define Y_HYBRID_THRESHOLD     100
996
+  #define Y2_HYBRID_THRESHOLD    100
997
+  #define Z_HYBRID_THRESHOLD       4
998
+  #define Z2_HYBRID_THRESHOLD      4
999
+  #define E0_HYBRID_THRESHOLD     30
1000
+  #define E1_HYBRID_THRESHOLD     30
1001
+  #define E2_HYBRID_THRESHOLD     30
1002
+  #define E3_HYBRID_THRESHOLD     30
1003
+  #define E4_HYBRID_THRESHOLD     30
1004
+
1005
+  /**
1006
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
1007
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1008
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1009
+   *
1010
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1011
+   * Higher values make the system LESS sensitive.
1012
+   * Lower value make the system MORE sensitive.
1013
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
1014
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
1015
+   * M914 X/Y to live tune the setting
1016
+   */
1017
+  //#define SENSORLESS_HOMING
1018
+
1019
+  #if ENABLED(SENSORLESS_HOMING)
1020
+    #define X_HOMING_SENSITIVITY  19
1021
+    #define Y_HOMING_SENSITIVITY  19
1022
+  #endif
976 1023
 
977 1024
   /**
978 1025
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

@@ -906,18 +906,6 @@
906 906
 //#define HAVE_TMC2130
907 907
 
908 908
 #if ENABLED(HAVE_TMC2130)
909
-  #define STEALTHCHOP
910
-
911
-  /**
912
-   * Let Marlin automatically control stepper current.
913
-   * This is still an experimental feature.
914
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
915
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
916
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
917
-   */
918
-  //#define AUTOMATIC_CURRENT_CONTROL
919
-  #define CURRENT_STEP          50  // [mA]
920
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
921 909
 
922 910
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
923 911
   //#define X_IS_TMC2130
@@ -940,45 +928,104 @@
940 928
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
941 929
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
942 930
 
943
-  #define X_MAX_CURRENT     1000  // rms current in mA
944
-  #define X_MICROSTEPS        16  // FULLSTEP..256
945
-  #define X_CHIP_SELECT       40  // Pin
931
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
932
+  #define X_MICROSTEPS        16  // 0..256
946 933
 
947
-  #define Y_MAX_CURRENT     1000
934
+  #define Y_CURRENT         1000
948 935
   #define Y_MICROSTEPS        16
949
-  #define Y_CHIP_SELECT       42
950 936
 
951
-  #define Z_MAX_CURRENT     1000
937
+  #define Z_CURRENT         1000
952 938
   #define Z_MICROSTEPS        16
953
-  #define Z_CHIP_SELECT       65
954 939
 
955
-  //#define X2_MAX_CURRENT  1000
940
+  //#define X2_CURRENT      1000
956 941
   //#define X2_MICROSTEPS     16
957
-  //#define X2_CHIP_SELECT    -1
958 942
 
959
-  //#define Y2_MAX_CURRENT  1000
943
+  //#define Y2_CURRENT      1000
960 944
   //#define Y2_MICROSTEPS     16
961
-  //#define Y2_CHIP_SELECT    -1
962 945
 
963
-  //#define Z2_MAX_CURRENT  1000
946
+  //#define Z2_CURRENT      1000
964 947
   //#define Z2_MICROSTEPS     16
965
-  //#define Z2_CHIP_SELECT    -1
966 948
 
967
-  //#define E0_MAX_CURRENT  1000
949
+  //#define E0_CURRENT      1000
968 950
   //#define E0_MICROSTEPS     16
969
-  //#define E0_CHIP_SELECT    -1
970 951
 
971
-  //#define E1_MAX_CURRENT  1000
952
+  //#define E1_CURRENT      1000
972 953
   //#define E1_MICROSTEPS     16
973
-  //#define E1_CHIP_SELECT    -1
974 954
 
975
-  //#define E2_MAX_CURRENT  1000
955
+  //#define E2_CURRENT      1000
976 956
   //#define E2_MICROSTEPS     16
977
-  //#define E2_CHIP_SELECT    -1
978 957
 
979
-  //#define E3_MAX_CURRENT  1000
958
+  //#define E3_CURRENT      1000
980 959
   //#define E3_MICROSTEPS     16
981
-  //#define E3_CHIP_SELECT    -1
960
+
961
+  //#define E4_CURRENT      1000
962
+  //#define E4_MICROSTEPS     16
963
+
964
+  /**
965
+   * Use Trinamic's ultra quiet stepping mode.
966
+   * When disabled, Marlin will use spreadCycle stepping mode.
967
+   */
968
+  #define STEALTHCHOP
969
+
970
+  /**
971
+   * Let Marlin automatically control stepper current.
972
+   * This is still an experimental feature.
973
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
974
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
975
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
976
+   * Relevant g-codes:
977
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
978
+   * M906 S1 - Start adjusting current
979
+   * M906 S0 - Stop adjusting current
980
+   * M911 - Report stepper driver overtemperature pre-warn condition.
981
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
982
+   */
983
+  //#define AUTOMATIC_CURRENT_CONTROL
984
+
985
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
986
+    #define CURRENT_STEP          50  // [mA]
987
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
988
+    #define REPORT_CURRENT_CHANGE
989
+  #endif
990
+
991
+  /**
992
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
993
+   * This mode allows for faster movements at the expense of higher noise levels.
994
+   * STEALTHCHOP needs to be enabled.
995
+   * M913 X/Y/Z/E to live tune the setting
996
+   */
997
+  //#define HYBRID_THRESHOLD
998
+
999
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
1000
+  #define X2_HYBRID_THRESHOLD    100
1001
+  #define Y_HYBRID_THRESHOLD     100
1002
+  #define Y2_HYBRID_THRESHOLD    100
1003
+  #define Z_HYBRID_THRESHOLD       4
1004
+  #define Z2_HYBRID_THRESHOLD      4
1005
+  #define E0_HYBRID_THRESHOLD     30
1006
+  #define E1_HYBRID_THRESHOLD     30
1007
+  #define E2_HYBRID_THRESHOLD     30
1008
+  #define E3_HYBRID_THRESHOLD     30
1009
+  #define E4_HYBRID_THRESHOLD     30
1010
+
1011
+  /**
1012
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
1013
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1014
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1015
+   *
1016
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1017
+   * Higher values make the system LESS sensitive.
1018
+   * Lower value make the system MORE sensitive.
1019
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
1020
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
1021
+   * M914 X/Y to live tune the setting
1022
+   */
1023
+  //#define SENSORLESS_HOMING
1024
+
1025
+  #if ENABLED(SENSORLESS_HOMING)
1026
+    #define X_HOMING_SENSITIVITY  19
1027
+    #define Y_HOMING_SENSITIVITY  19
1028
+  #endif
982 1029
 
983 1030
   /**
984 1031
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

@@ -900,18 +900,6 @@
900 900
 //#define HAVE_TMC2130
901 901
 
902 902
 #if ENABLED(HAVE_TMC2130)
903
-  #define STEALTHCHOP
904
-
905
-  /**
906
-   * Let Marlin automatically control stepper current.
907
-   * This is still an experimental feature.
908
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
909
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
910
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
911
-   */
912
-  //#define AUTOMATIC_CURRENT_CONTROL
913
-  #define CURRENT_STEP          50  // [mA]
914
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
915 903
 
916 904
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
917 905
   //#define X_IS_TMC2130
@@ -934,45 +922,104 @@
934 922
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
935 923
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
936 924
 
937
-  #define X_MAX_CURRENT     1000  // rms current in mA
938
-  #define X_MICROSTEPS        16  // FULLSTEP..256
939
-  #define X_CHIP_SELECT       40  // Pin
925
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
926
+  #define X_MICROSTEPS        16  // 0..256
940 927
 
941
-  #define Y_MAX_CURRENT     1000
928
+  #define Y_CURRENT         1000
942 929
   #define Y_MICROSTEPS        16
943
-  #define Y_CHIP_SELECT       42
944 930
 
945
-  #define Z_MAX_CURRENT     1000
931
+  #define Z_CURRENT         1000
946 932
   #define Z_MICROSTEPS        16
947
-  #define Z_CHIP_SELECT       65
948 933
 
949
-  //#define X2_MAX_CURRENT  1000
934
+  //#define X2_CURRENT      1000
950 935
   //#define X2_MICROSTEPS     16
951
-  //#define X2_CHIP_SELECT    -1
952 936
 
953
-  //#define Y2_MAX_CURRENT  1000
937
+  //#define Y2_CURRENT      1000
954 938
   //#define Y2_MICROSTEPS     16
955
-  //#define Y2_CHIP_SELECT    -1
956 939
 
957
-  //#define Z2_MAX_CURRENT  1000
940
+  //#define Z2_CURRENT      1000
958 941
   //#define Z2_MICROSTEPS     16
959
-  //#define Z2_CHIP_SELECT    -1
960 942
 
961
-  //#define E0_MAX_CURRENT  1000
943
+  //#define E0_CURRENT      1000
962 944
   //#define E0_MICROSTEPS     16
963
-  //#define E0_CHIP_SELECT    -1
964 945
 
965
-  //#define E1_MAX_CURRENT  1000
946
+  //#define E1_CURRENT      1000
966 947
   //#define E1_MICROSTEPS     16
967
-  //#define E1_CHIP_SELECT    -1
968 948
 
969
-  //#define E2_MAX_CURRENT  1000
949
+  //#define E2_CURRENT      1000
970 950
   //#define E2_MICROSTEPS     16
971
-  //#define E2_CHIP_SELECT    -1
972 951
 
973
-  //#define E3_MAX_CURRENT  1000
952
+  //#define E3_CURRENT      1000
974 953
   //#define E3_MICROSTEPS     16
975
-  //#define E3_CHIP_SELECT    -1
954
+
955
+  //#define E4_CURRENT      1000
956
+  //#define E4_MICROSTEPS     16
957
+
958
+  /**
959
+   * Use Trinamic's ultra quiet stepping mode.
960
+   * When disabled, Marlin will use spreadCycle stepping mode.
961
+   */
962
+  #define STEALTHCHOP
963
+
964
+  /**
965
+   * Let Marlin automatically control stepper current.
966
+   * This is still an experimental feature.
967
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
968
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
969
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
970
+   * Relevant g-codes:
971
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
972
+   * M906 S1 - Start adjusting current
973
+   * M906 S0 - Stop adjusting current
974
+   * M911 - Report stepper driver overtemperature pre-warn condition.
975
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
976
+   */
977
+  //#define AUTOMATIC_CURRENT_CONTROL
978
+
979
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
980
+    #define CURRENT_STEP          50  // [mA]
981
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
982
+    #define REPORT_CURRENT_CHANGE
983
+  #endif
984
+
985
+  /**
986
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
987
+   * This mode allows for faster movements at the expense of higher noise levels.
988
+   * STEALTHCHOP needs to be enabled.
989
+   * M913 X/Y/Z/E to live tune the setting
990
+   */
991
+  //#define HYBRID_THRESHOLD
992
+
993
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
994
+  #define X2_HYBRID_THRESHOLD    100
995
+  #define Y_HYBRID_THRESHOLD     100
996
+  #define Y2_HYBRID_THRESHOLD    100
997
+  #define Z_HYBRID_THRESHOLD       4
998
+  #define Z2_HYBRID_THRESHOLD      4
999
+  #define E0_HYBRID_THRESHOLD     30
1000
+  #define E1_HYBRID_THRESHOLD     30
1001
+  #define E2_HYBRID_THRESHOLD     30
1002
+  #define E3_HYBRID_THRESHOLD     30
1003
+  #define E4_HYBRID_THRESHOLD     30
1004
+
1005
+  /**
1006
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
1007
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
1008
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
1009
+   *
1010
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
1011
+   * Higher values make the system LESS sensitive.
1012
+   * Lower value make the system MORE sensitive.
1013
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
1014
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
1015
+   * M914 X/Y to live tune the setting
1016
+   */
1017
+  //#define SENSORLESS_HOMING
1018
+
1019
+  #if ENABLED(SENSORLESS_HOMING)
1020
+    #define X_HOMING_SENSITIVITY  19
1021
+    #define Y_HOMING_SENSITIVITY  19
1022
+  #endif
976 1023
 
977 1024
   /**
978 1025
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -879,18 +879,6 @@
879 879
 //#define HAVE_TMC2130
880 880
 
881 881
 #if ENABLED(HAVE_TMC2130)
882
-  #define STEALTHCHOP
883
-
884
-  /**
885
-   * Let Marlin automatically control stepper current.
886
-   * This is still an experimental feature.
887
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
888
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
889
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
890
-   */
891
-  //#define AUTOMATIC_CURRENT_CONTROL
892
-  #define CURRENT_STEP          50  // [mA]
893
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
894 882
 
895 883
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
896 884
   //#define X_IS_TMC2130
@@ -913,45 +901,104 @@
913 901
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
914 902
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
915 903
 
916
-  #define X_MAX_CURRENT     1000  // rms current in mA
917
-  #define X_MICROSTEPS        16  // FULLSTEP..256
918
-  #define X_CHIP_SELECT       40  // Pin
904
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
905
+  #define X_MICROSTEPS        16  // 0..256
919 906
 
920
-  #define Y_MAX_CURRENT     1000
907
+  #define Y_CURRENT         1000
921 908
   #define Y_MICROSTEPS        16
922
-  #define Y_CHIP_SELECT       42
923 909
 
924
-  #define Z_MAX_CURRENT     1000
910
+  #define Z_CURRENT         1000
925 911
   #define Z_MICROSTEPS        16
926
-  #define Z_CHIP_SELECT       65
927 912
 
928
-  //#define X2_MAX_CURRENT  1000
913
+  //#define X2_CURRENT      1000
929 914
   //#define X2_MICROSTEPS     16
930
-  //#define X2_CHIP_SELECT    -1
931 915
 
932
-  //#define Y2_MAX_CURRENT  1000
916
+  //#define Y2_CURRENT      1000
933 917
   //#define Y2_MICROSTEPS     16
934
-  //#define Y2_CHIP_SELECT    -1
935 918
 
936
-  //#define Z2_MAX_CURRENT  1000
919
+  //#define Z2_CURRENT      1000
937 920
   //#define Z2_MICROSTEPS     16
938
-  //#define Z2_CHIP_SELECT    -1
939 921
 
940
-  //#define E0_MAX_CURRENT  1000
922
+  //#define E0_CURRENT      1000
941 923
   //#define E0_MICROSTEPS     16
942
-  //#define E0_CHIP_SELECT    -1
943 924
 
944
-  //#define E1_MAX_CURRENT  1000
925
+  //#define E1_CURRENT      1000
945 926
   //#define E1_MICROSTEPS     16
946
-  //#define E1_CHIP_SELECT    -1
947 927
 
948
-  //#define E2_MAX_CURRENT  1000
928
+  //#define E2_CURRENT      1000
949 929
   //#define E2_MICROSTEPS     16
950
-  //#define E2_CHIP_SELECT    -1
951 930
 
952
-  //#define E3_MAX_CURRENT  1000
931
+  //#define E3_CURRENT      1000
953 932
   //#define E3_MICROSTEPS     16
954
-  //#define E3_CHIP_SELECT    -1
933
+
934
+  //#define E4_CURRENT      1000
935
+  //#define E4_MICROSTEPS     16
936
+
937
+  /**
938
+   * Use Trinamic's ultra quiet stepping mode.
939
+   * When disabled, Marlin will use spreadCycle stepping mode.
940
+   */
941
+  #define STEALTHCHOP
942
+
943
+  /**
944
+   * Let Marlin automatically control stepper current.
945
+   * This is still an experimental feature.
946
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
947
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
948
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
949
+   * Relevant g-codes:
950
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
951
+   * M906 S1 - Start adjusting current
952
+   * M906 S0 - Stop adjusting current
953
+   * M911 - Report stepper driver overtemperature pre-warn condition.
954
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
955
+   */
956
+  //#define AUTOMATIC_CURRENT_CONTROL
957
+
958
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
959
+    #define CURRENT_STEP          50  // [mA]
960
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
961
+    #define REPORT_CURRENT_CHANGE
962
+  #endif
963
+
964
+  /**
965
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
966
+   * This mode allows for faster movements at the expense of higher noise levels.
967
+   * STEALTHCHOP needs to be enabled.
968
+   * M913 X/Y/Z/E to live tune the setting
969
+   */
970
+  //#define HYBRID_THRESHOLD
971
+
972
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
973
+  #define X2_HYBRID_THRESHOLD    100
974
+  #define Y_HYBRID_THRESHOLD     100
975
+  #define Y2_HYBRID_THRESHOLD    100
976
+  #define Z_HYBRID_THRESHOLD       4
977
+  #define Z2_HYBRID_THRESHOLD      4
978
+  #define E0_HYBRID_THRESHOLD     30
979
+  #define E1_HYBRID_THRESHOLD     30
980
+  #define E2_HYBRID_THRESHOLD     30
981
+  #define E3_HYBRID_THRESHOLD     30
982
+  #define E4_HYBRID_THRESHOLD     30
983
+
984
+  /**
985
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
986
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
987
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
988
+   *
989
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
990
+   * Higher values make the system LESS sensitive.
991
+   * Lower value make the system MORE sensitive.
992
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
993
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
994
+   * M914 X/Y to live tune the setting
995
+   */
996
+  //#define SENSORLESS_HOMING
997
+
998
+  #if ENABLED(SENSORLESS_HOMING)
999
+    #define X_HOMING_SENSITIVITY  19
1000
+    #define Y_HOMING_SENSITIVITY  19
1001
+  #endif
955 1002
 
956 1003
   /**
957 1004
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -879,18 +879,6 @@
879 879
 //#define HAVE_TMC2130
880 880
 
881 881
 #if ENABLED(HAVE_TMC2130)
882
-  #define STEALTHCHOP
883
-
884
-  /**
885
-   * Let Marlin automatically control stepper current.
886
-   * This is still an experimental feature.
887
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
888
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
889
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
890
-   */
891
-  //#define AUTOMATIC_CURRENT_CONTROL
892
-  #define CURRENT_STEP          50  // [mA]
893
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
894 882
 
895 883
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
896 884
   //#define X_IS_TMC2130
@@ -913,45 +901,104 @@
913 901
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
914 902
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
915 903
 
916
-  #define X_MAX_CURRENT     1000  // rms current in mA
917
-  #define X_MICROSTEPS        16  // FULLSTEP..256
918
-  #define X_CHIP_SELECT       40  // Pin
904
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
905
+  #define X_MICROSTEPS        16  // 0..256
919 906
 
920
-  #define Y_MAX_CURRENT     1000
907
+  #define Y_CURRENT         1000
921 908
   #define Y_MICROSTEPS        16
922
-  #define Y_CHIP_SELECT       42
923 909
 
924
-  #define Z_MAX_CURRENT     1000
910
+  #define Z_CURRENT         1000
925 911
   #define Z_MICROSTEPS        16
926
-  #define Z_CHIP_SELECT       65
927 912
 
928
-  //#define X2_MAX_CURRENT  1000
913
+  //#define X2_CURRENT      1000
929 914
   //#define X2_MICROSTEPS     16
930
-  //#define X2_CHIP_SELECT    -1
931 915
 
932
-  //#define Y2_MAX_CURRENT  1000
916
+  //#define Y2_CURRENT      1000
933 917
   //#define Y2_MICROSTEPS     16
934
-  //#define Y2_CHIP_SELECT    -1
935 918
 
936
-  //#define Z2_MAX_CURRENT  1000
919
+  //#define Z2_CURRENT      1000
937 920
   //#define Z2_MICROSTEPS     16
938
-  //#define Z2_CHIP_SELECT    -1
939 921
 
940
-  //#define E0_MAX_CURRENT  1000
922
+  //#define E0_CURRENT      1000
941 923
   //#define E0_MICROSTEPS     16
942
-  //#define E0_CHIP_SELECT    -1
943 924
 
944
-  //#define E1_MAX_CURRENT  1000
925
+  //#define E1_CURRENT      1000
945 926
   //#define E1_MICROSTEPS     16
946
-  //#define E1_CHIP_SELECT    -1
947 927
 
948
-  //#define E2_MAX_CURRENT  1000
928
+  //#define E2_CURRENT      1000
949 929
   //#define E2_MICROSTEPS     16
950
-  //#define E2_CHIP_SELECT    -1
951 930
 
952
-  //#define E3_MAX_CURRENT  1000
931
+  //#define E3_CURRENT      1000
953 932
   //#define E3_MICROSTEPS     16
954
-  //#define E3_CHIP_SELECT    -1
933
+
934
+  //#define E4_CURRENT      1000
935
+  //#define E4_MICROSTEPS     16
936
+
937
+  /**
938
+   * Use Trinamic's ultra quiet stepping mode.
939
+   * When disabled, Marlin will use spreadCycle stepping mode.
940
+   */
941
+  #define STEALTHCHOP
942
+
943
+  /**
944
+   * Let Marlin automatically control stepper current.
945
+   * This is still an experimental feature.
946
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
947
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
948
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
949
+   * Relevant g-codes:
950
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
951
+   * M906 S1 - Start adjusting current
952
+   * M906 S0 - Stop adjusting current
953
+   * M911 - Report stepper driver overtemperature pre-warn condition.
954
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
955
+   */
956
+  //#define AUTOMATIC_CURRENT_CONTROL
957
+
958
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
959
+    #define CURRENT_STEP          50  // [mA]
960
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
961
+    #define REPORT_CURRENT_CHANGE
962
+  #endif
963
+
964
+  /**
965
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
966
+   * This mode allows for faster movements at the expense of higher noise levels.
967
+   * STEALTHCHOP needs to be enabled.
968
+   * M913 X/Y/Z/E to live tune the setting
969
+   */
970
+  //#define HYBRID_THRESHOLD
971
+
972
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
973
+  #define X2_HYBRID_THRESHOLD    100
974
+  #define Y_HYBRID_THRESHOLD     100
975
+  #define Y2_HYBRID_THRESHOLD    100
976
+  #define Z_HYBRID_THRESHOLD       4
977
+  #define Z2_HYBRID_THRESHOLD      4
978
+  #define E0_HYBRID_THRESHOLD     30
979
+  #define E1_HYBRID_THRESHOLD     30
980
+  #define E2_HYBRID_THRESHOLD     30
981
+  #define E3_HYBRID_THRESHOLD     30
982
+  #define E4_HYBRID_THRESHOLD     30
983
+
984
+  /**
985
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
986
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
987
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
988
+   *
989
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
990
+   * Higher values make the system LESS sensitive.
991
+   * Lower value make the system MORE sensitive.
992
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
993
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
994
+   * M914 X/Y to live tune the setting
995
+   */
996
+  //#define SENSORLESS_HOMING
997
+
998
+  #if ENABLED(SENSORLESS_HOMING)
999
+    #define X_HOMING_SENSITIVITY  19
1000
+    #define Y_HOMING_SENSITIVITY  19
1001
+  #endif
955 1002
 
956 1003
   /**
957 1004
    * You can set your own advanced settings by filling in predefined functions.

+ 80
- 33
Marlin/example_configurations/wt150/Configuration_adv.h View File

@@ -882,18 +882,6 @@
882 882
 //#define HAVE_TMC2130
883 883
 
884 884
 #if ENABLED(HAVE_TMC2130)
885
-  #define STEALTHCHOP
886
-
887
-  /**
888
-   * Let Marlin automatically control stepper current.
889
-   * This is still an experimental feature.
890
-   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
891
-   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
892
-   * Adjusting starts from X/Y/Z/E_MAX_CURRENT but will not increase over AUTO_ADJUST_MAX
893
-   */
894
-  //#define AUTOMATIC_CURRENT_CONTROL
895
-  #define CURRENT_STEP          50  // [mA]
896
-  #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
897 885
 
898 886
   // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
899 887
   //#define X_IS_TMC2130
@@ -916,45 +904,104 @@
916 904
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
917 905
   #define INTERPOLATE          1  // Interpolate X/Y/Z_MICROSTEPS to 256
918 906
 
919
-  #define X_MAX_CURRENT     1000  // rms current in mA
920
-  #define X_MICROSTEPS        16  // FULLSTEP..256
921
-  #define X_CHIP_SELECT       40  // Pin
907
+  #define X_CURRENT         1000  // rms current in mA. Multiply by 1.41 for peak current.
908
+  #define X_MICROSTEPS        16  // 0..256
922 909
 
923
-  #define Y_MAX_CURRENT     1000
910
+  #define Y_CURRENT         1000
924 911
   #define Y_MICROSTEPS        16
925
-  #define Y_CHIP_SELECT       42
926 912
 
927
-  #define Z_MAX_CURRENT     1000
913
+  #define Z_CURRENT         1000
928 914
   #define Z_MICROSTEPS        16
929
-  #define Z_CHIP_SELECT       65
930 915
 
931
-  //#define X2_MAX_CURRENT  1000
916
+  //#define X2_CURRENT      1000
932 917
   //#define X2_MICROSTEPS     16
933
-  //#define X2_CHIP_SELECT    -1
934 918
 
935
-  //#define Y2_MAX_CURRENT  1000
919
+  //#define Y2_CURRENT      1000
936 920
   //#define Y2_MICROSTEPS     16
937
-  //#define Y2_CHIP_SELECT    -1
938 921
 
939
-  //#define Z2_MAX_CURRENT  1000
922
+  //#define Z2_CURRENT      1000
940 923
   //#define Z2_MICROSTEPS     16
941
-  //#define Z2_CHIP_SELECT    -1
942 924
 
943
-  //#define E0_MAX_CURRENT  1000
925
+  //#define E0_CURRENT      1000
944 926
   //#define E0_MICROSTEPS     16
945
-  //#define E0_CHIP_SELECT    -1
946 927
 
947
-  //#define E1_MAX_CURRENT  1000
928
+  //#define E1_CURRENT      1000
948 929
   //#define E1_MICROSTEPS     16
949
-  //#define E1_CHIP_SELECT    -1
950 930
 
951
-  //#define E2_MAX_CURRENT  1000
931
+  //#define E2_CURRENT      1000
952 932
   //#define E2_MICROSTEPS     16
953
-  //#define E2_CHIP_SELECT    -1
954 933
 
955
-  //#define E3_MAX_CURRENT  1000
934
+  //#define E3_CURRENT      1000
956 935
   //#define E3_MICROSTEPS     16
957
-  //#define E3_CHIP_SELECT    -1
936
+
937
+  //#define E4_CURRENT      1000
938
+  //#define E4_MICROSTEPS     16
939
+
940
+  /**
941
+   * Use Trinamic's ultra quiet stepping mode.
942
+   * When disabled, Marlin will use spreadCycle stepping mode.
943
+   */
944
+  #define STEALTHCHOP
945
+
946
+  /**
947
+   * Let Marlin automatically control stepper current.
948
+   * This is still an experimental feature.
949
+   * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered,
950
+   * then decrease current by CURRENT_STEP until temperature prewarn is cleared.
951
+   * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX
952
+   * Relevant g-codes:
953
+   * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
954
+   * M906 S1 - Start adjusting current
955
+   * M906 S0 - Stop adjusting current
956
+   * M911 - Report stepper driver overtemperature pre-warn condition.
957
+   * M912 - Clear stepper driver overtemperature pre-warn condition flag.
958
+   */
959
+  //#define AUTOMATIC_CURRENT_CONTROL
960
+
961
+  #if ENABLED(AUTOMATIC_CURRENT_CONTROL)
962
+    #define CURRENT_STEP          50  // [mA]
963
+    #define AUTO_ADJUST_MAX     1300  // [mA], 1300mA_rms = 1840mA_peak
964
+    #define REPORT_CURRENT_CHANGE
965
+  #endif
966
+
967
+  /**
968
+   * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
969
+   * This mode allows for faster movements at the expense of higher noise levels.
970
+   * STEALTHCHOP needs to be enabled.
971
+   * M913 X/Y/Z/E to live tune the setting
972
+   */
973
+  //#define HYBRID_THRESHOLD
974
+
975
+  #define X_HYBRID_THRESHOLD     100  // [mm/s]
976
+  #define X2_HYBRID_THRESHOLD    100
977
+  #define Y_HYBRID_THRESHOLD     100
978
+  #define Y2_HYBRID_THRESHOLD    100
979
+  #define Z_HYBRID_THRESHOLD       4
980
+  #define Z2_HYBRID_THRESHOLD      4
981
+  #define E0_HYBRID_THRESHOLD     30
982
+  #define E1_HYBRID_THRESHOLD     30
983
+  #define E2_HYBRID_THRESHOLD     30
984
+  #define E3_HYBRID_THRESHOLD     30
985
+  #define E4_HYBRID_THRESHOLD     30
986
+
987
+  /**
988
+   * Use stallGuard2 to sense an obstacle and trigger an endstop.
989
+   * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
990
+   * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal.
991
+   *
992
+   * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
993
+   * Higher values make the system LESS sensitive.
994
+   * Lower value make the system MORE sensitive.
995
+   * Too low values can lead to false positives, while too high values will collide the axis without triggering.
996
+   * It is advised to set X/Y_HOME_BUMP_MM to 0.
997
+   * M914 X/Y to live tune the setting
998
+   */
999
+  //#define SENSORLESS_HOMING
1000
+
1001
+  #if ENABLED(SENSORLESS_HOMING)
1002
+    #define X_HOMING_SENSITIVITY  19
1003
+    #define Y_HOMING_SENSITIVITY  19
1004
+  #endif
958 1005
 
959 1006
   /**
960 1007
    * You can set your own advanced settings by filling in predefined functions.

Loading…
Cancel
Save