TMC Verbindungsfehler Marlin 2.0 TMC2130 Ramps 1.6plus 11. April 2021 12:44 |
Registrierungsdatum: 3 Jahre zuvor Beiträge: 13 |
#define X_DRIVER_TYPE TMC2130 #define Y_DRIVER_TYPE TMC2130 #define Z_DRIVER_TYPE TMC2130 #define E0_DRIVER_TYPE TMC2130 #define E1_DRIVER_TYPE TMC2130
if HAS_TRINAMIC_CONFIG #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 #if AXIS_IS_TMC(X) #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 #define X_CHAIN_POS -1 // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ... #endif #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_CURRENT_HOME X2_CURRENT #define X2_MICROSTEPS 16 #define X2_RSENSE 0.11 #define X2_CHAIN_POS -1 #endif #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_CURRENT_HOME Y_CURRENT #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 #define Y_CHAIN_POS -1 #endif #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_CURRENT_HOME Y2_CURRENT #define Y2_MICROSTEPS 16 #define Y2_RSENSE 0.11 #define Y2_CHAIN_POS -1 #endif #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_CURRENT_HOME Z_CURRENT #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 #define Z_CHAIN_POS -1 #endif #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_CURRENT_HOME Z2_CURRENT #define Z2_MICROSTEPS 16 #define Z2_RSENSE 0.11 #define Z2_CHAIN_POS -1 #endif #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_CURRENT_HOME Z3_CURRENT #define Z3_MICROSTEPS 16 #define Z3_RSENSE 0.11 #define Z3_CHAIN_POS -1 #endif #if AXIS_IS_TMC(Z4) #define Z4_CURRENT 800 #define Z4_CURRENT_HOME Z4_CURRENT #define Z4_MICROSTEPS 16 #define Z4_RSENSE 0.11 #define Z4_CHAIN_POS -1 #endif #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 #define E0_CHAIN_POS -1 #endif #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E1_RSENSE 0.11 #define E1_CHAIN_POS -1 #endif #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E2_RSENSE 0.11 #define E2_CHAIN_POS -1 #endif #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E3_RSENSE 0.11 #define E3_CHAIN_POS -1 #endif #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E4_RSENSE 0.11 #define E4_CHAIN_POS -1 #endif #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 #define E5_MICROSTEPS 16 #define E5_RSENSE 0.11 #define E5_CHAIN_POS -1 #endif #if AXIS_IS_TMC(E6) #define E6_CURRENT 800 #define E6_MICROSTEPS 16 #define E6_RSENSE 0.11 #define E6_CHAIN_POS -1 #endif #if AXIS_IS_TMC(E7) #define E7_CURRENT 800 #define E7_MICROSTEPS 16 #define E7_RSENSE 0.11 #define E7_CHAIN_POS -1 #endif /** * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here. * The default pins can be found in your board's pins file. */ #define X_CS_PIN 63 //-1 #define Y_CS_PIN 40 //-1 #define Z_CS_PIN 42 //-1 //#define X2_CS_PIN -1 //#define Y2_CS_PIN -1 //#define Z2_CS_PIN -1 //#define Z3_CS_PIN -1 #define E0_CS_PIN 65 //-1 #define E1_CS_PIN 66 //-1 //#define E2_CS_PIN -1 //#define E3_CS_PIN -1 //#define E4_CS_PIN -1 //#define E5_CS_PIN -1 //#define E6_CS_PIN -1 //#define E7_CS_PIN -1 /** * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160). * 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 51 //-1 #define TMC_SW_MISO 50 //-1 #define TMC_SW_SCK 52 //-1 /** * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses. * Set the address using jumpers on pins MS1 and MS2. * Address | MS1 | MS2 * 0 | LOW | LOW * 1 | HIGH | LOW * 2 | LOW | HIGH * 3 | HIGH | HIGH * * Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers * on the same serial port, either here or in your board's pins file. */ #define X_SLAVE_ADDRESS 0 #define Y_SLAVE_ADDRESS 0 #define Z_SLAVE_ADDRESS 0 #define X2_SLAVE_ADDRESS 0 #define Y2_SLAVE_ADDRESS 0 #define Z2_SLAVE_ADDRESS 0 #define Z3_SLAVE_ADDRESS 0 #define Z4_SLAVE_ADDRESS 0 #define E0_SLAVE_ADDRESS 0 #define E1_SLAVE_ADDRESS 0 #define E2_SLAVE_ADDRESS 0 #define E3_SLAVE_ADDRESS 0 #define E4_SLAVE_ADDRESS 0 #define E5_SLAVE_ADDRESS 0 #define E6_SLAVE_ADDRESS 0 #define E7_SLAVE_ADDRESS 0 /** * Software enable * * Use for drivers that do not use a dedicated enable pin, but rather handle the same * function through a communication line such as SPI or UART. */ //#define SOFTWARE_DRIVER_ENABLE /** * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only * Use Trinamic's ultra quiet stepping mode. * When disabled, Marlin will use spreadCycle stepping mode. */ #define STEALTHCHOP_XY #define STEALTHCHOP_Z #define STEALTHCHOP_E /** * Optimize spreadCycle chopper parameters by using predefined parameter sets * or with the help of an example included in the library. * Provided parameter sets are * CHOPPER_DEFAULT_12V * CHOPPER_DEFAULT_19V * CHOPPER_DEFAULT_24V * CHOPPER_DEFAULT_36V * CHOPPER_09STEP_24V // 0.9 degree steppers (24V) * CHOPPER_PRUSAMK3_24V // Imported parameters from the official Průša firmware for MK3 (24V) * CHOPPER_MARLIN_119 // Old defaults from Marlin v1.1.9 * * Define you own with * { , , hysteresis_start[1..8] } */ #define CHOPPER_TIMING CHOPPER_DEFAULT_24V /** * Monitor Trinamic drivers * for error conditions like overtemperature and short to ground. * To manage over-temp Marlin can decrease the driver current until the 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 - 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 /** * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only * 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_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD. * 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 Z3_HYBRID_THRESHOLD 3 #define Z4_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 #define E5_HYBRID_THRESHOLD 30 #define E6_HYBRID_THRESHOLD 30 #define E7_HYBRID_THRESHOLD 30 /** * Use StallGuard to home / probe X, Y, Z. * * TMC2130, TMC2160, TMC2209, TMC2660, TMC5130, and TMC5160 only * Connect the stepper 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_STALL_SENSITIVITY is the default stall threshold. * Use M914 X Y Z to set the stall threshold at runtime: * * Sensitivity TMC2209 Others * HIGHEST 255 -64 (Too sensitive => False positive) * LOWEST 0 63 (Too insensitive => No trigger) * * It is recommended to set HOMING_BUMP_MM to { 0, 0, 0 }. * * SPI_ENDSTOPS *** Beta feature! *** TMC2130 Only *** * Poll the driver through SPI to determine load when homing. * Removes the need for a wire from DIAG1 to an endstop pin. * * IMPROVE_HOMING_RELIABILITY tunes acceleration and jerk when * homing and adds a guard period for endstop triggering. * * Comment *_STALL_SENSITIVITY to disable sensorless homing for that axis. */ //#define SENSORLESS_HOMING // StallGuard capable drivers only #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // TMC2209: 0...255. TMC2130: -64...63 #define X_STALL_SENSITIVITY 8 #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY #define Y_STALL_SENSITIVITY 8 #define Y2_STALL_SENSITIVITY Y_STALL_SENSITIVITY //#define Z_STALL_SENSITIVITY 8 //#define Z2_STALL_SENSITIVITY Z_STALL_SENSITIVITY //#define Z3_STALL_SENSITIVITY Z_STALL_SENSITIVITY //#define Z4_STALL_SENSITIVITY Z_STALL_SENSITIVITY //#define SPI_ENDSTOPS // TMC2130 only //#define IMPROVE_HOMING_RELIABILITY #endif /** * TMC Homing stepper phase. * * Improve homing repeatability by homing to stepper coil's nearest absolute * phase position. Trinamic drivers use a stepper phase table with 1024 values * spanning 4 full steps with 256 positions each (ergo, 1024 positions). * Full step positions (128, 384, 640, 896) have the highest holding torque. * * Values from 0..1023, -1 to disable homing phase for that axis. */ //#define TMC_HOME_PHASE { 896, 896, 896 } /** * Beta feature! * Create a 50/50 square wave step pulse optimal for stepper drivers. */ //#define SQUARE_WAVE_STEPPING /** * Enable M122 debugging command for TMC stepper drivers. * M122 S0/1 will enable continous reporting. */ //#define TMC_DEBUG /** * 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 TMC_ADV() { \ * stepperX.diag0_otpw(1); \ * stepperY.intpol(0); \ * } */ #define TMC_ADV() { } #endif // HAS_TRINAMIC_CONFIG
// // Steppers // #define X_STEP_PIN 54 #define X_DIR_PIN 55 #define X_ENABLE_PIN 38 #ifndef X_CS_PIN #define X_CS_PIN 63 //53 //Tim #endif #define Y_STEP_PIN 60 #define Y_DIR_PIN 61 #define Y_ENABLE_PIN 56 #ifndef Y_CS_PIN #define Y_CS_PIN 40 //49 //Tim #endif #ifndef Z_STEP_PIN #define Z_STEP_PIN 46 #endif #define Z_DIR_PIN 48 #define Z_ENABLE_PIN 62 #ifndef Z_CS_PIN #define Z_CS_PIN 42 //40 //Tim #endif #define E0_STEP_PIN 26 #define E0_DIR_PIN 28 #define E0_ENABLE_PIN 24 #ifndef E0_CS_PIN #define E0_CS_PIN 65 //42 //Tim #endif #define E1_STEP_PIN 36 #define E1_DIR_PIN 34 #define E1_ENABLE_PIN 30 #ifndef E1_CS_PIN #define E1_CS_PIN 66 //44 //Tim #endif ... // // TMC software SPI // #if ENABLED(TMC_USE_SW_SPI) #ifndef TMC_SW_MOSI #define TMC_SW_MOSI 51 //66 //Tim #endif #ifndef TMC_SW_MISO #define TMC_SW_MISO 50 //44 //Tim #endif #ifndef TMC_SW_SCK #define TMC_SW_SCK 52 //64 //Tim #endif #endif
Re: TMC Verbindungsfehler Marlin 2.0 TMC2130 Ramps 1.6plus 13. April 2021 17:08 |
Registrierungsdatum: 3 Jahre zuvor Beiträge: 13 |
#define X_DRIVER_TYPE TMC2130_STANDALONE #define Y_DRIVER_TYPE TMC2130_STANDALONE #define Z_DRIVER_TYPE TMC2130_STANDALONE #define E0_DRIVER_TYPE TMC2130_STANDALONE #define E1_DRIVER_TYPE TMC2130_STANDALONE
TMC Verbindungsfehler Marlin 2.0 TMC2130/TMC5160 SPI Ramps 1.6 Plus 03. July 2021 12:05 |
Registrierungsdatum: 2 Jahre zuvor Beiträge: 2 |