Marlin 1.1.9, TMC2130 V1.1, no movement December 08, 2018 09:50AM |
Registered: 7 years ago Posts: 162 |
* Stepper Drivers * * These settings allow Marlin to tune stepper driver timing and enable advanced options for * stepper drivers that support them. You may also override timing options in Configuration_adv.h. * * A4988 is assumed for unspecified drivers. * * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, * TMC5130, TMC5130_STANDALONE * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] */ #define X_DRIVER_TYPE TMC2130 #define Y_DRIVER_TYPE TMC2130 #define Z_DRIVER_TYPE TMC2130 //#define X2_DRIVER_TYPE A4988 //#define Y2_DRIVER_TYPE A4988 //#define Z2_DRIVER_TYPE A4988 #define E0_DRIVER_TYPE TMC2130 //#define E1_DRIVER_TYPE A4988 //#define E2_DRIVER_TYPE A4988 //#define E3_DRIVER_TYPE A4988 //#define E4_DRIVER_TYPE A4988
/** * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * * You'll also need the TMC2130Stepper Arduino library * (https://github.com/teemuatlut/TMC2130Stepper). * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ #if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.25 // Scales down the holding current from run current #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #define X_MICROSTEPS 1 // 0..256 #define Y_CURRENT 800 #define Y_MICROSTEPS 1 #define Z_CURRENT 800 #define Z_MICROSTEPS 1 #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define E0_CURRENT 800 #define E0_MICROSTEPS 1 #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E4_CURRENT 800 #define E4_MICROSTEPS 16 /** * Use software SPI for TMC2130. * The default SW SPI pins are defined the respective pins files, * but you can override or define them here. */ #define TMC_USE_SW_SPI //#define TMC_SW_MOSI -1 //#define TMC_SW_MISO -1 //#define TMC_SW_SCK -1 /** * Use Trinamic's ultra quiet stepping mode. * When disabled, Marlin will use spreadCycle stepping mode. */ #define STEALTHCHOP /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. * In the case of overtemperature Marlin can decrease the driver current until error condition clears. * Other detected conditions can be used to stop the current print. * 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. * M911 - Report stepper driver overtemperature pre-warn condition. * M912 - Clear stepper driver overtemperature pre-warn condition flag. * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG) */ //#define MONITOR_DRIVER_STATUS #if ENABLED(MONITOR_DRIVER_STATUS) #define CURRENT_STEP_DOWN 50 // [mA] #define REPORT_CURRENT_CHANGE #define STOP_ON_ERROR #endif /** * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. * This mode allows for faster movements at the expense of higher noise levels. * STEALTHCHOP needs to be enabled. * M913 X/Y/Z/E to live tune the setting */ //#define HYBRID_THRESHOLD #define X_HYBRID_THRESHOLD 100 // [mm/s] #define X2_HYBRID_THRESHOLD 100 #define Y_HYBRID_THRESHOLD 100 #define Y2_HYBRID_THRESHOLD 100 #define Z_HYBRID_THRESHOLD 3 #define Z2_HYBRID_THRESHOLD 3 #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. * X, Y, and Z homing will always be done in spreadCycle mode. * * X/Y/Z_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/Z_HOME_BUMP_MM to 0. * M914 X/Y/Z to live tune the setting */ //#define SENSORLESS_HOMING // TMC2130 only #if ENABLED(SENSORLESS_HOMING) #define X_HOMING_SENSITIVITY 8 #define Y_HOMING_SENSITIVITY 8 #define Z_HOMING_SENSITIVITY 8 #define X_HOME_BUMP_MM 0 #define Y_HOME_BUMP_MM 0 #define Z_HOME_BUMP_MM 0 #endif /** * Enable M122 debugging command for TMC stepper drivers. * M122 S0/1 will enable continous reporting. */ #define TMC_DEBUG /** * M915 Z Axis Calibration * * - Adjust Z stepper current, * - Drive the Z axis to its physical maximum, and * - Home Z to account for the lost steps. * * Use M915 Snn to specify the current. * Use M925 Znn to add extra Z height to Z_MAX_POS. */ //#define TMC_Z_CALIBRATION #if ENABLED(TMC_Z_CALIBRATION) #define CALIBRATION_CURRENT 250 #define CALIBRATION_EXTRA_HEIGHT 10 #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] * [github.com] * * Example: * #define TMC_ADV() { \ * stepperX.diag0_temp_prewarn(1); \ * stepperY.interpolate(0); \ * } */ #define TMC_ADV() { } #endif // TMC2130 || TMC2208
// Steppers // #define X_STEP_PIN 54 #define X_DIR_PIN 55 #define X_ENABLE_PIN 38 #ifndef X_CS_PIN #define X_CS_PIN 44 #endif #define Y_STEP_PIN 60 #define Y_DIR_PIN 61 #define Y_ENABLE_PIN 56 #ifndef Y_CS_PIN #define Y_CS_PIN 64 #endif #define Z_STEP_PIN 46 #define Z_DIR_PIN 48 #define Z_ENABLE_PIN 62 #ifndef Z_CS_PIN #define Z_CS_PIN 40 #endif #define E0_STEP_PIN 26 #define E0_DIR_PIN 28 #define E0_ENABLE_PIN 24 #ifndef E0_CS_PIN #define E0_CS_PIN 42 #endif #define E1_STEP_PIN 36 #define E1_DIR_PIN 34 #define E1_ENABLE_PIN 30 #ifndef E1_CS_PIN #define E1_CS_PIN 44 #endif
SENDING:M122 X Y Z E0 Enabled false false false false Set current 800 800 800 800 RMS current 795 795 795 795 MAX current 1121 1121 1121 1121 Run current 25/31 25/31 25/31 25/31 Hold current 6/31 6/31 6/31 6/31 CS actual 31/31 31/31 31/31 31/31 PWM scale 255 255 255 255 vsense 1=.18 1=.18 1=.18 1=.18 stealthChop true true true true msteps 0 0 0 0 tstep 4294967295 4294967295 4294967295 4294967295 pwm threshold 0 0 0 0 [mm/s] - - - - OT prewarn true true true true OT prewarn has been triggered false false false false off time 15 15 15 15 blank time 54 54 54 54 hysteresis -end 12 12 12 12 -start 8 8 8 8 Stallguard thrs 0 0 0 0 DRVSTATUS X Y Z E0 stallguard X X X X sg_result 1023 1023 1023 1023 fsactive X X X X stst X X X X olb X X X X ola X X X X s2gb X X X X s2ga X X X X otpw X X X X ot X X X X Driver registers: X = 0xFF:FF:FF:FF Y = 0xFF:FF:FF:FF Z = 0xFF:FF:FF:FF E0 = 0xFF:FF:FF:FF
Re: Marlin 1.1.9, TMC2130 V1.1, no movement December 08, 2018 10:04AM |
Admin Registered: 13 years ago Posts: 7,008 |
Quote
HugoW
Driver registers: X = 0xFF:FF:FF:FF
Y = 0xFF:FF:FF:FF
Z = 0xFF:FF:FF:FF
E0 = 0xFF:FF:FF:FF
#if ENABLED(TMC_USE_SW_SPI) #ifndef TMC_SW_MOSI #define TMC_SW_MOSI 66 #endif #ifndef TMC_SW_MISO #define TMC_SW_MISO 44 #endif #ifndef TMC_SW_SCK #define TMC_SW_SCK 64 #endif #endif
Re: Marlin 1.1.9, TMC2130 V1.1, no movement December 08, 2018 10:48AM |
Registered: 7 years ago Posts: 162 |
*/ //#define TMC_USE_SW_SPI #define TMC_SW_MOSI D51 #define TMC_SW_MISO D50 #define TMC_SW_SCK D52Taking out the standard pins and defining where they really are.
SENDING:M122 X Y Z E0 Enabled true true false false Set current 800 800 800 800 RMS current 795 795 795 795 MAX current 1121 1121 1121 1121 Run current 25/31 25/31 25/31 25/31 Hold current 6/31 6/31 6/31 6/31 CS actual 6/31 6/31 6/31 6/31 PWM scale 22 23 0 0 vsense 1=.18 1=.18 1=.18 1=.18 stealthChop true true true true msteps 256 256 256 256 tstep 1048575 1048575 1048575 1048575 pwm threshold 0 0 0 0 [mm/s] - - - - OT prewarn false false false false OT prewarn has been triggered false false false false off time 5 5 5 5 blank time 24 24 24 24 hysteresis -end 2 2 2 2 -start 3 3 3 3 Stallguard thrs 0 0 0 0 DRVSTATUS X Y Z E0 stallguard sg_result 0 0 0 0 fsactive stst X X X X olb ola s2gb s2ga otpw ot Driver registers: X = 0x80:06:00:00 Y = 0x80:06:00:00 Z = 0x80:06:00:00 E0 = 0x80:06:00:00
SENDING:M122 X Y Z E0 Enabled false false false false Set current 800 800 800 800 RMS current 795 795 795 795 MAX current 1121 1121 1121 1121 Run current 25/31 25/31 25/31 25/31 Hold current 6/31 6/31 6/31 6/31 CS actual 6/31 6/31 6/31 6/31 PWM scale 1 1 1 1 vsense 1=.18 1=.18 1=.18 1=.18 stealthChop true true true true msteps 256 256 256 256 tstep 1048575 1048575 1048575 1048575 pwm threshold 0 0 0 0 [mm/s] - - - - OT prewarn false false false false OT prewarn has been triggered false false false false off time 5 5 5 5 blank time 24 24 24 24 hysteresis -end 2 2 2 2 -start 3 3 3 3 Stallguard thrs 0 0 0 0 DRVSTATUS X Y Z E0 stallguard sg_result 0 0 0 0 fsactive stst X X X X olb ola s2gb s2ga otpw ot Driver registers: X = 0x80:06:00:00 Y = 0x80:06:00:00 Z = 0x80:06:00:00 E0 = 0x80:06:00:00X and Y went from enabled true to false for some reason.
Re: Marlin 1.1.9, TMC2130 V1.1, no movement December 08, 2018 10:59AM |
Admin Registered: 13 years ago Posts: 7,008 |
Re: Marlin 1.1.9, TMC2130 V1.1, no movement December 08, 2018 11:14AM |
Registered: 7 years ago Posts: 162 |
SENDING:M122 X Y Z E0 Enabled false false false false Set current 800 800 800 800 RMS current 1436 1436 1436 1436 MAX current 2025 2025 2025 2025 Run current 25/31 25/31 25/31 25/31 Hold current 6/31 6/31 6/31 6/31 CS actual 0/31 0/31 0/31 0/31 PWM scale 0 0 0 0 vsense 0=.325 0=.325 0=.325 0=.325 stealthChop false false false false msteps 256 256 256 256 tstep 0 0 0 0 pwm threshold 0 0 0 0 [mm/s] - - - - OT prewarn false false false false OT prewarn has been triggered false false false false off time 0 0 0 0 blank time 16 16 16 16 hysteresis -end -3 -3 -3 -3 -start 1 1 1 1 Stallguard thrs 0 0 0 0 DRVSTATUS X Y Z E0 stallguard sg_result 0 0 0 0 fsactive stst olb ola s2gb s2ga otpw ot Driver registers: X = 0x00:00:00:00 Y = 0x00:00:00:00 Z = 0x00:00:00:00 E0 = 0x00:00:00:00
SENDING:M122 X Y Z E0 Enabled false false false false Set current 800 800 800 800 RMS current 1436 1436 1436 1436 MAX current 2025 2025 2025 2025 Run current 25/31 25/31 25/31 25/31 Hold current 6/31 6/31 6/31 6/31 CS actual 0/31 0/31 0/31 0/31 PWM scale 0 0 0 0 vsense 0=.325 0=.325 0=.325 0=.325 stealthChop false false false false msteps 256 256 256 256 tstep 1048575 1048575 1048575 1048575 pwm threshold 0 0 0 0 [mm/s] - - - - OT prewarn false false false false OT prewarn has been triggered false false false false off time 0 0 0 0 blank time 16 16 16 16 hysteresis -end -3 -3 -3 -3 -start 1 1 1 1 Stallguard thrs 0 0 0 0 DRVSTATUS X Y Z E0 stallguard sg_result 0 0 0 0 fsactive stst X X X X olb ola s2gb s2ga otpw ot Driver registers: X = 0x80:00:00:00 Y = 0x80:00:00:00 Z = 0x80:00:00:00 E0 = 0x80:00:00:00
SENDING:M122 X Y Z E0 Enabled false false false false Set current 800 800 800 800 RMS current 795 795 795 795 MAX current 1121 1121 1121 1121 Run current 25/31 25/31 25/31 25/31 Hold current 6/31 6/31 6/31 6/31 CS actual 6/31 6/31 6/31 6/31 PWM scale 0 0 0 0 vsense 1=.18 1=.18 1=.18 1=.18 stealthChop true true true true msteps 256 256 256 256 tstep 1048575 1048575 1048575 1048575 pwm threshold 0 0 0 0 [mm/s] - - - - OT prewarn false false false false OT prewarn has been triggered false false false false off time 5 5 5 5 blank time 24 24 24 24 hysteresis -end 2 2 2 2 -start 3 3 3 3 Stallguard thrs 0 0 0 0 DRVSTATUS X Y Z E0 stallguard sg_result 0 0 0 0 fsactive stst X X X X olb ola s2gb s2ga otpw ot Driver registers: X = 0x80:06:00:00 Y = 0x80:06:00:00 Z = 0x80:06:00:00 E0 = 0x80:06:00:00
SENDING:M122 X Y Z E0 Enabled false false false false Set current 800 800 800 800 RMS current 795 795 795 795 MAX current 1121 1121 1121 1121 Run current 25/31 25/31 25/31 25/31 Hold current 6/31 6/31 6/31 6/31 CS actual 6/31 6/31 6/31 6/31 PWM scale 1 1 1 1 vsense 1=.18 1=.18 1=.18 1=.18 stealthChop true true true true msteps 256 256 256 256 tstep 1048575 1048575 1048575 1048575 pwm threshold 0 0 0 0 [mm/s] - - - - OT prewarn false false false false OT prewarn has been triggered false false false false off time 5 5 5 5 blank time 24 24 24 24 hysteresis -end 2 2 2 2 -start 3 3 3 3 Stallguard thrs 0 0 0 0 DRVSTATUS X Y Z E0 stallguard sg_result 0 0 0 0 fsactive stst X X X X olb ola s2gb s2ga otpw ot Driver registers: X = 0x80:06:00:00 Y = 0x80:06:00:00 Z = 0x80:06:00:00 E0 = 0x80:06:00:00
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 // :{ 0:'Low', 1:'High' } #define X_ENABLE_ON 1 #define Y_ENABLE_ON 1 #define Z_ENABLE_ON 1 #define E_ENABLE_ON 1 // For all extruders
SENDING:M122 X Y Z E0 Enabled true true true true Set current 800 800 800 800 RMS current 795 795 795 795 MAX current 1121 1121 1121 1121 Run current 25/31 25/31 25/31 25/31 Hold current 6/31 6/31 6/31 6/31 CS actual 6/31 6/31 6/31 6/31 PWM scale 20 20 20 20 vsense 1=.18 1=.18 1=.18 1=.18 stealthChop true true true true msteps 256 256 256 256 tstep 1048575 1048575 1048575 1048575 pwm threshold 0 0 0 0 [mm/s] - - - - OT prewarn false false false false OT prewarn has been triggered false false false false off time 5 5 5 5 blank time 24 24 24 24 hysteresis -end 2 2 2 2 -start 3 3 3 3 Stallguard thrs 0 0 0 0 DRVSTATUS X Y Z E0 stallguard sg_result 0 0 0 0 fsactive stst X X X X olb ola s2gb s2ga otpw ot Driver registers: X = 0x80:06:00:00 Y = 0x80:06:00:00 Z = 0x80:06:00:00 E0 = 0x80:06:00:00
Re: Marlin 1.1.9, TMC2130 V1.1, no movement December 08, 2018 11:39AM |
Admin Registered: 13 years ago Posts: 7,008 |
Re: Marlin 1.1.9, TMC2130 V1.1, no movement December 08, 2018 12:30PM |
Registered: 7 years ago Posts: 162 |
Re: Marlin 1.1.9, TMC2130 V1.1, no movement December 08, 2018 12:39PM |
Registered: 7 years ago Posts: 162 |
Re: Marlin 1.1.9, TMC2130 V1.1, no movement December 09, 2018 06:36AM |
Registered: 7 years ago Posts: 162 |
Re: Marlin 1.1.9, TMC2130 V1.1, no movement December 09, 2018 09:01AM |
Registered: 7 years ago Posts: 162 |
Re: Marlin 1.1.9, TMC2130 V1.1, no movement December 09, 2018 10:28AM |
Registered: 7 years ago Posts: 162 |
Re: Marlin 1.1.9, TMC2130 V1.1, no movement January 30, 2019 08:38AM |
Registered: 5 years ago Posts: 1 |
;poweron M80 ;M502 - factory reset to enable-steppers M502 ;M501 - Restore Settings to enable steppers M501
M80 M906 ... (from M501) M569 ... (from M501 if exist) M913 ... (from M501 if exist) M914 ... (from M501 if exist)
Re: Marlin 1.1.9, TMC2130 V1.1, no movement February 02, 2019 07:06AM |
Registered: 5 years ago Posts: 7 |
Y driver error detected: overtemperature short to ground (coil A) short to ground (coil X Y Enabled false false Set current 800 800 RMS current 795 795 MAX current 1121 1121 Run current 25/31 25/31 Hold current 12/31 12/31 CS actual 12/31 31/31 PWM scale 5 255 vsense 1=.18 1=.18 stealthChop true true msteps 16 0 tstep 1048575 4294967295 pwm threshold 0 0 [mm/s] - - OT prewarn false true OT prewarn has been triggered false false off time 5 15 blank time 24 54 hysteresis -end 2 12 -start 3 8 Stallguard thrs 0 0 DRVSTATUS X Y stallguard X sg_result 0 1023 fsactive X stst X X olb X ola X s2gb X s2ga X otpw X ot X Driver registers: X = 0x80:0C:00:00 Y = 0xFF:FF:FF:FF
#define TMC_USE_SW_SPI #define TMC_SW_MOSI 51 #define TMC_SW_MISO 50 #define TMC_SW_SCK 52
Re: Marlin 1.1.9, TMC2130 V1.1, no movement February 02, 2019 07:48AM |
Admin Registered: 13 years ago Posts: 7,008 |
Re: Marlin 1.1.9, TMC2130 V1.1, no movement February 03, 2019 03:02PM |
Registered: 5 years ago Posts: 7 |
Re: Marlin 1.1.9, TMC2130 V1.1, no movement February 03, 2019 06:12PM |
Admin Registered: 13 years ago Posts: 7,008 |