TMC2130 spreadCycle configuration July 30, 2017 03:48AM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 04, 2017 03:00PM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 04, 2017 03:02PM |
Registered: 7 years ago Posts: 18 |
#define HAVE_TMC2130 #if ENABLED(HAVE_TMC2130) // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY #define X_IS_TMC2130 //#define X2_IS_TMC2130 #define Y_IS_TMC2130 //#define Y2_IS_TMC2130 //#define Z_IS_TMC2130 //#define Z2_IS_TMC2130 //#define E0_IS_TMC2130 //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 //#define E4_IS_TMC2130 /** * Stepper driver settings */ #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 #define X_CURRENT 636 // rms current in mA. Multiply by 1.41 for peak current. #define X_MICROSTEPS 32 // 0..256 #define Y_CURRENT 636 #define Y_MICROSTEPS 32 #define Z_CURRENT 1000 #define Z_MICROSTEPS 16 //#define X2_CURRENT 1000 //#define X2_MICROSTEPS 16 //#define Y2_CURRENT 1000 //#define Y2_MICROSTEPS 16 //#define Z2_CURRENT 1000 //#define Z2_MICROSTEPS 16 //#define E0_CURRENT 1000 //#define E0_MICROSTEPS 16 //#define E1_CURRENT 1000 //#define E1_MICROSTEPS 16 //#define E2_CURRENT 1000 //#define E2_MICROSTEPS 16 //#define E3_CURRENT 1000 //#define E3_MICROSTEPS 16 //#define E4_CURRENT 1000 //#define E4_MICROSTEPS 16 /** * Use Trinamic's ultra quiet stepping mode. * When disabled, Marlin will use spreadCycle stepping mode. */ //#define STEALTHCHOP /** * Let Marlin automatically control stepper current. * This is still an experimental feature. * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, * then decrease current by CURRENT_STEP until temperature prewarn is cleared. * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX * Relevant g-codes: * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. * M906 S1 - Start adjusting current * M906 S0 - Stop adjusting current * M911 - Report stepper driver overtemperature pre-warn condition. * M912 - Clear stepper driver overtemperature pre-warn condition flag. */ //#define AUTOMATIC_CURRENT_CONTROL #if ENABLED(AUTOMATIC_CURRENT_CONTROL) #define CURRENT_STEP 50 // [mA] #define AUTO_ADJUST_MAX 636 // [mA], 1300mA_rms = 1840mA_peak #define REPORT_CURRENT_CHANGE #endif /** * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. * This mode allows for faster movements at the expense of higher noise levels. * STEALTHCHOP needs to be enabled. * M913 X/Y/Z/E to live tune the setting */ //#define HYBRID_THRESHOLD #define X_HYBRID_THRESHOLD 80 // [mm/s] #define X2_HYBRID_THRESHOLD 100 #define Y_HYBRID_THRESHOLD 80 #define Y2_HYBRID_THRESHOLD 100 #define Z_HYBRID_THRESHOLD 4 #define Z2_HYBRID_THRESHOLD 4 #define E0_HYBRID_THRESHOLD 30 #define E1_HYBRID_THRESHOLD 30 #define E2_HYBRID_THRESHOLD 30 #define E3_HYBRID_THRESHOLD 30 #define E4_HYBRID_THRESHOLD 30 /** * Use stallGuard2 to sense an obstacle and trigger an endstop. * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. * * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. * Higher values make the system LESS sensitive. * Lower value make the system MORE sensitive. * Too low values can lead to false positives, while too high values will collide the axis without triggering. * It is advised to set X/Y_HOME_BUMP_MM to 0. * M914 X/Y to live tune the setting */ #define SENSORLESS_HOMING #if ENABLED(SENSORLESS_HOMING) #define X_HOMING_SENSITIVITY 19 #define Y_HOMING_SENSITIVITY 19 #endif /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page * [github.com] * * Example: * #define TMC2130_ADV() { \ * stepperX.diag0_temp_prewarn(1); \ * stepperX.interpolate(0); \ * } */ /*#define TMC2130_ADV() { \ }*/ #define TMC2130_ADV() { \ stepperX.external_ref(1); \ stepperY.external_ref(1); \ stepperX.blank_time(24);\ stepperY.blank_time(24);\ stepperX.off_time(2);\ stepperY.off_time(2);\ stepperX.hysterisis_start(0);\ stepperY.hysterisis_start(0);\ stepperX.hysterisis_low(13); \ stepperY.hysterisis_low(13); \ stepperX.run_current(31);\ stepperY.run_current(31);\ stepperX.hold_current(12);\ stepperY.hold_current(12);\ stepperX.power_down_delay(2); \ stepperY.power_down_delay(2); \ stepperX.coolstep_min_speed(300);\ stepperY.coolstep_min_speed(300);\ stepperX.sg_min(4);\ stepperY.sg_min(4);\ stepperX.sg_max(10);\ stepperY.sg_max(10);\ stepperX.smart_min_current(1);\ stepperY.smart_min_current(1);\ stepperX.sg_step_width(8);\ stepperY.sg_step_width(8);\ stepperX.sg_current_decrease(32);\ stepperY.sg_current_decrease(32);\ }
Re: TMC2130 spreadCycle configuration August 04, 2017 06:13PM |
Registered: 8 years ago Posts: 51 |
Re: TMC2130 spreadCycle configuration August 04, 2017 11:47PM |
Registered: 9 years ago Posts: 552 |
Quote
butchja
I increased my motors supply voltage by a cheap ebay step up converter from 12V to 26V. To do so I cutted motor supply pin to my ramps and fed it directly from above by wire. I have removed my diode protector boards because they have reference to my ramp's 12V.
Re: TMC2130 spreadCycle configuration August 05, 2017 04:30AM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 05, 2017 03:23PM |
Registered: 10 years ago Posts: 8 |
Re: TMC2130 spreadCycle configuration August 05, 2017 04:32PM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 05, 2017 04:49PM |
Registered: 10 years ago Posts: 8 |
Re: TMC2130 spreadCycle configuration August 06, 2017 04:24AM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 06, 2017 04:40AM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 06, 2017 04:44AM |
Registered: 10 years ago Posts: 8 |
Re: TMC2130 spreadCycle configuration August 06, 2017 05:28AM |
Registered: 7 years ago Posts: 18 |
C:\Users\x\AppData\Local\Temp\arduino_build_245800\sketch\serial.cpp: In function 'void serial_spaces(uint8_t)': serial.cpp:36: error: 'PROPORTIONAL_FONT_RATIO' was not declared in this scope void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (count--) MYSERIAL.write(' '); } ^
C:\Users\x\AppData\Local\Temp\arduino_build_245800\sketch\stepper.cpp: In static member function 'static void Stepper::init()': stepper.cpp:1021: error: 'TMC_ADV' was not declared in this scope TMC_ADV() ^
Re: TMC2130 spreadCycle configuration August 06, 2017 05:43AM |
Registered: 10 years ago Posts: 8 |
Re: TMC2130 spreadCycle configuration August 06, 2017 11:08AM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 07, 2017 02:55PM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 07, 2017 04:27PM |
Registered: 10 years ago Posts: 8 |
Re: TMC2130 spreadCycle configuration August 07, 2017 05:31PM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 08, 2017 06:25AM |
Registered: 10 years ago Posts: 8 |
Re: TMC2130 spreadCycle configuration August 13, 2017 06:46AM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 13, 2017 10:07AM |
Registered: 10 years ago Posts: 8 |
Re: TMC2130 spreadCycle configuration August 15, 2017 11:44AM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration August 15, 2017 01:08PM |
Registered: 10 years ago Posts: 8 |
Re: TMC2130 spreadCycle configuration August 15, 2017 04:49PM |
Registered: 7 years ago Posts: 18 |
Re: TMC2130 spreadCycle configuration May 03, 2018 07:18AM |
Registered: 6 years ago Posts: 4 |
'stepperX' does not name a typeI get the same messages for stepperY and stepperZ. I also tried the default example mentioned in the Marlin code:
/ * Example: */ #define TMC_ADV() { \ stepperX.diag0_temp_prewarn(1); \ stepperY.interpolate(0); \ }The same error appers with this code as well. Do I have to define or include something else to use this stepper-types? And is there some kind of guide line how to configure the drivers the right way, or do I simply try things out?
Re: TMC2130 spreadCycle configuration May 03, 2018 10:08AM |
Registered: 6 years ago Posts: 4 |
TMC_ADV () { \I added them and removed all empty lines. hysteresis_start also needs to be changed to hstrt(..) and hysteresis_low to hend(..). Now compiling works without an error.