Кремень FMZ Реклама
Kremen FMHM Реклама

Пытаюсь запустить TMC5160

Tevgeniy
Идет загрузка
Загрузка
30.05.2019
6694
11
Вопросы и ответы
Статья относится к принтерам:
RepRap
Прибыли мне вчера 4 драйвера TMC5160. Вот никак их не могу запустить. Плата SKR V1.3. Принтер реп рап CoreXY. Двигатели на XY Nema 23. На Z и E Nema 17. Напряжение питания на 24В. До этого стояли и A4988 и DRV8825 все работало отлично, только громко. Плату по инструкции от китайцев поставил в режим SPI - четыре перемычки по левому ряду под драйвером. Конфиг делал по их инструкции. При этом включаешь STEALTHCHOP вообще не крутятся. Выключаешь STEALTHCHOP моторы XY гудят и дергаются Вытаскиваешь драйвер Е начинают работать, но не так тихо (пробовал все режимы - 16,32,64,128,256). Только Z тихо работает на Nema 17. Токи ставил разные 1000,2000,3000 мА. В чем может быть причина, куда еще копать?

Настройки Configuration_adv.h следующие:

#if HAS_TRINAMIC

#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 3100 // (mA) RMS current. Multiply by 1.414 for peak current.

#define X_MICROSTEPS 256 // 0..256

#define X_RSENSE 0.075


#endif

#if AXIS_IS_TMC(X2)

#define X2_CURRENT 800

#define X2_MICROSTEPS 256

#define X2_RSENSE 0.11

#endif

#if AXIS_IS_TMC(Y)

#define Y_CURRENT 3100

#define Y_MICROSTEPS 64

#define Y_RSENSE 0.075


#endif

#if AXIS_IS_TMC(Y2)

#define Y2_CURRENT 800

#define Y2_MICROSTEPS 16

#define Y2_RSENSE 0.11

#endif

#if AXIS_IS_TMC(Z)

#define Z_CURRENT 1000

#define Z_MICROSTEPS 256

#define Z_RSENSE 0.0075


#endif

#if AXIS_IS_TMC(Z2)

#define Z2_CURRENT 800

#define Z2_MICROSTEPS 16

#define Z2_RSENSE 0.11

#endif

#if AXIS_IS_TMC(Z3)

#define Z3_CURRENT 800

#define Z3_MICROSTEPS 16

#define Z3_RSENSE 0.11

#endif

#if AXIS_IS_TMC(E0)

#define E0_CURRENT 1000

#define E0_MICROSTEPS 64

#define E0_RSENSE 0.0075


#endif

#if AXIS_IS_TMC(E1)

#define E1_CURRENT 800

#define E1_MICROSTEPS 16

#define E1_RSENSE 0.11

#endif

#if AXIS_IS_TMC(E2)

#define E2_CURRENT 800

#define E2_MICROSTEPS 16

#define E2_RSENSE 0.11

#endif

#if AXIS_IS_TMC(E3)

#define E3_CURRENT 800

#define E3_MICROSTEPS 16

#define E3_RSENSE 0.11

#endif

#if AXIS_IS_TMC(E4)

#define E4_CURRENT 800

#define E4_MICROSTEPS 16

#define E4_RSENSE 0.11

#endif

#if AXIS_IS_TMC(E5)

#define E5_CURRENT 800

#define E5_MICROSTEPS 16

#define E5_RSENSE 0.11

#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 -1

//#define Y_CS_PIN -1

//#define Z_CS_PIN -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 -1

//#define E1_CS_PIN -1

//#define E2_CS_PIN -1

//#define E3_CS_PIN -1

//#define E4_CS_PIN -1

//#define E5_CS_PIN -1

/**

* Use software SPI for TMC2130.

* 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 -1

//#define TMC_SW_MISO -1

//#define TMC_SW_SCK -1

/**

* 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, 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_PRUSAMK3_24V // Imported parameters from the official Prusa 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. 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 - 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, 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 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

/**

* TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only

* Use StallGuard2 to sense an obstacle and trigger an endstop.

* 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 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

/**

* Use StallGuard2 to probe the bed with the nozzle.

*

* CAUTION: This could cause damage to machines that use a lead screw or threaded rod

* to move the Z axis. Take extreme care when attempting to enable this feature.

*/

//#define SENSORLESS_PROBING // TMC2130 only

#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)

#define X_STALL_SENSITIVITY 8

#define Y_STALL_SENSITIVITY 8

//#define Z_STALL_SENSITIVITY 8

#endif

/**

* 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

* https://github.com/teemuatlut/TMCStepper

*

* Example:

* #define TMC_ADV() {

* stepperX.diag0_temp_prewarn(1);

* stepperY.interpolate(0);

* }

*/

#define TMC_ADV() { }

#endif // HAS_TRINAMIC

Настройки Configuration.h следующие:

//============================= Mechanical Settings =========================

//===========================================================================

// @section machine

// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics

// either in the usual order or reversed

#define COREXY

//#define COREXZ

//#define COREYZ

//#define COREYX

//#define COREZX

//#define COREZY

**

* 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, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,

* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,

* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,

* TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,

* TMC5160, TMC5160_STANDALONE

* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']

*/

#define X_DRIVER_TYPE TMC5160

#define Y_DRIVER_TYPE TMC5160

#define Z_DRIVER_TYPE TMC5160


//#define X2_DRIVER_TYPE A4988

//#define Y2_DRIVER_TYPE A4988

//#define Z2_DRIVER_TYPE A4988

//#define Z3_DRIVER_TYPE A4988

#define E0_DRIVER_TYPE TMC5160

//#define E1_DRIVER_TYPE A4988

//#define E2_DRIVER_TYPE A4988

//#define E3_DRIVER_TYPE A4988

//#define E4_DRIVER_TYPE A4988

//#define E5_DRIVER_TYPE A4988

/**

* Default Axis Steps Per Unit (steps/mm)

* Override with M92

* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]

*/

#define DEFAULT_AXIS_STEPS_PER_UNIT { 1280, 1280, 11008, 1160 }

/**

* Default Max Feed Rate (mm/s)

* Override with M203

* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]

*/

#define DEFAULT_MAX_FEEDRATE { 300, 300, 20, 50 }

/**

* Default Max Acceleration (change/s) change = mm/s

* (Maximum start speed for accelerated moves)

* Override with M201

* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]

*/

#define DEFAULT_MAX_ACCELERATION { 1500, 1500, 100, 1500 }

Default Acceleration (change/s) change = mm/s

* Override with M204

*

* M204 P Acceleration

* M204 R Retract Acceleration

* M204 T Travel Acceleration

*/

#define DEFAULT_ACCELERATION 1500 // X, Y, Z and E acceleration for printing moves

#define DEFAULT_RETRACT_ACCELERATION 1500 // E acceleration for retracts

#define DEFAULT_TRAVEL_ACCELERATION 1500 // X, Y, Z acceleration for travel (non printing) moves
Ответы на вопросы