Skip to content

Commit

Permalink
Applied changes for TMC2130
Browse files Browse the repository at this point in the history
Updated SPI pins for the board and for the motor drivers
Updated pins for fans, leds and other IOs
Inverted axis as TMC rotates motors the other way
Updated speed and acceleration due to axis skip issues from TMC
Enabled nozzle clean feature
Updated custom menu g-code
  • Loading branch information
vascojdb committed Nov 26, 2018
1 parent b2a9c54 commit f4b285b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 29 deletions.
30 changes: 15 additions & 15 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
*/
//#define LARGE_BED
#define SDSUPPORT
//#define CHANGE_Y_DIRECTION // If your bed homes in the wrong direction (it should move front to back) enable this.
//#define CHANGE_X_DIRECTION // If your X carriage homes in the wrong direction (it should move right to left) enable this.
//#define CHANGE_Z_DIRECTION // If your Z homes in the wrong direction (it should move top to bottom) enable this.
#define CHANGE_Y_DIRECTION // If your bed homes in the wrong direction (it should move front to back) enable this.
#define CHANGE_X_DIRECTION // If your X carriage homes in the wrong direction (it should move right to left) enable this.
#define CHANGE_Z_DIRECTION // If your Z homes in the wrong direction (it should move top to bottom) enable this.
//#define HOTEND_E3DV6 // Genuine E3D v6 hotend.
//#define FULL_GRAPHIC_SMART // Enable this if you have a RepRap Discount Full Graphic Smart Controller (The
// stock controller is a RepRap Discount Smart Controller)
Expand Down Expand Up @@ -836,14 +836,14 @@
* 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_STANDALONE
#define Y_DRIVER_TYPE TMC2130_STANDALONE
#define Z_DRIVER_TYPE TMC2130_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_STANDALONE
#define E1_DRIVER_TYPE TMC2130_STANDALONE
#define E0_DRIVER_TYPE TMC2130
#define E1_DRIVER_TYPE TMC2130
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
//#define E4_DRIVER_TYPE A4988
Expand Down Expand Up @@ -908,9 +908,9 @@
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
#if ENABLED(DUAL_EXTRUDER)
#define DEFAULT_MAX_FEEDRATE { 300, 300, 7, 50, 50 }
#define DEFAULT_MAX_FEEDRATE { 150, 150, 7, 25, 25 }
#else
#define DEFAULT_MAX_FEEDRATE { 300, 300, 7, 50 }
#define DEFAULT_MAX_FEEDRATE { 150, 150, 7, 25 }
#endif

/**
Expand All @@ -920,9 +920,9 @@
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
#if ENABLED(DUAL_EXTRUDER)
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000, 10000 }
#define DEFAULT_MAX_ACCELERATION { 2000, 1800, 100, 10000, 10000 }
#else
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
#define DEFAULT_MAX_ACCELERATION { 2000, 1800, 100, 10000 }
#endif

/**
Expand All @@ -934,8 +934,8 @@
* M204 T Travel Acceleration
*/
#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves

/**
* Default Jerk (mm/s)
Expand Down Expand Up @@ -1704,7 +1704,7 @@
* Attention: EXPERIMENTAL. G-code arguments may change.
*
*/
//#define NOZZLE_CLEAN_FEATURE
#define NOZZLE_CLEAN_FEATURE

#if ENABLED(NOZZLE_CLEAN_FEATURE)
// Default number of pattern repetitions
Expand Down
24 changes: 12 additions & 12 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
*/
#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
#define CONTROLLER_FAN_PIN 11 // Set a custom pin for the controller fan
#define CONTROLLER_FAN_PIN 65 // Set a custom pin for the controller fan
#define CONTROLLERFAN_SECS 10 // Duration in seconds for the fan to run after all motors are disabled
#define CONTROLLERFAN_SPEED 255 // 255 == full speed
#endif
Expand Down Expand Up @@ -237,8 +237,8 @@
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#define E0_AUTO_FAN_PIN 65
#define E1_AUTO_FAN_PIN 65
#define E0_AUTO_FAN_PIN 66
#define E1_AUTO_FAN_PIN 66
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
Expand All @@ -262,10 +262,10 @@
*/
#define CASE_LIGHT_ENABLE
#if ENABLED(CASE_LIGHT_ENABLE)
#define CASE_LIGHT_PIN 12 // Override the default pin if needed
#define CASE_LIGHT_PIN 44 // Override the default pin if needed
#define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
#define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
#define CASE_LIGHT_DEFAULT_ON false // Set default power-up state on
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 50 // Set default power-up brightness (0-255, requires PWM pin)
#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu
//#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
Expand Down Expand Up @@ -1177,7 +1177,7 @@
* STEALTHCHOP needs to be enabled.
* M913 X/Y/Z/E to live tune the setting
*/
//#define HYBRID_THRESHOLD
#define HYBRID_THRESHOLD

#define X_HYBRID_THRESHOLD 100 // [mm/s]
#define X2_HYBRID_THRESHOLD 100
Expand Down Expand Up @@ -1215,7 +1215,7 @@
* Enable M122 debugging command for TMC stepper drivers.
* M122 S0/1 will enable continous reporting.
*/
//#define TMC_DEBUG
#define TMC_DEBUG
/**
* M915 Z Axis Calibration
Expand Down Expand Up @@ -1495,19 +1495,19 @@
#define USER_GCODE_1 "G91\nG1 Z+30 F10000\nG90\nM84"

#define USER_DESC_2 "Start cooling"
#define USER_GCODE_2 "G1 Y150 F10000\nM42 P66 S255"
#define USER_GCODE_2 "G1 Y150 F10000\nM42 P11 S255"

#define USER_DESC_3 "End cooling"
#define USER_GCODE_3 "M42 P66 S0"
#define USER_GCODE_3 "M42 P11 S0"

#define USER_DESC_4 "Clean nozzle"
#define USER_GCODE_4 "G12 P1 S4 T3"

#define USER_DESC_5 "Shutdown"
#define USER_GCODE_5 "G90\nM104 S0\nM140 S0\nG1 X0 Y30 Z20 F10000\nM42 P66 S0\nM355 S0 P0\nM84"

// #define USER_DESC_6 "Home & Info"
// #define USER_GCODE_6 "G28\nM503"
#define USER_DESC_6 "Service"
#define USER_GCODE_6 "G90\nG1 X100 Y100 Z70 F10000\nM84"
#endif

/**
Expand Down
16 changes: 14 additions & 2 deletions Marlin/pins_MKS_GEN_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,23 @@
//

#ifndef X_CS_PIN
#define X_CS_PIN 59
#define X_CS_PIN 63
#endif

#ifndef Y_CS_PIN
#define Y_CS_PIN 63
#define Y_CS_PIN 40
#endif

#ifndef Z_CS_PIN
#define Z_CS_PIN 42
#endif

#ifndef E0_CS_PIN
#define E0_CS_PIN 59
#endif

#ifndef E1_CS_PIN
#define E1_CS_PIN 64
#endif

#include "pins_RAMPS.h"

0 comments on commit f4b285b

Please sign in to comment.