Skip to content

Instantly share code, notes, and snippets.

@azbesthu
Created June 25, 2020 21:20
Show Gist options
  • Save azbesthu/0b053e4727d4b87e1daffbdfdeffd71e to your computer and use it in GitHub Desktop.
Save azbesthu/0b053e4727d4b87e1daffbdfdeffd71e to your computer and use it in GitHub Desktop.
diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index f02e69ee5..025375c0f 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -110,7 +110,7 @@
* Select a secondary serial port on the board to use for communication with the host.
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-//#define SERIAL_PORT_2 -1
+#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -121,18 +121,18 @@
*
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
-#define BAUDRATE 250000
+#define BAUDRATE 115200
// Enable the Bluetooth serial interface on AT90USB devices
//#define BLUETOOTH
// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
- #define MOTHERBOARD BOARD_RAMPS_14_EFB
+ #define MOTHERBOARD BOARD_BTT_SKR_V1_3
#endif
// Name displayed in the LCD "Ready" message and Info menu
-//#define CUSTOM_MACHINE_NAME "3D Printer"
+#define CUSTOM_MACHINE_NAME "SKR1.3"
// Printer's unique ID, used by some programs to differentiate between machines.
// Choose your own or use a service like http://www.uuidgenerator.net/version4
@@ -414,7 +414,7 @@
#define TEMP_SENSOR_5 0
#define TEMP_SENSOR_6 0
#define TEMP_SENSOR_7 0
-#define TEMP_SENSOR_BED 0
+#define TEMP_SENSOR_BED 1
#define TEMP_SENSOR_PROBE 0
#define TEMP_SENSOR_CHAMBER 0
@@ -483,10 +483,15 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+ // Tarantula
+ #define DEFAULT_Kp 22.04
+ #define DEFAULT_Ki 2.01
+ #define DEFAULT_Kd 71.71
+
// Ultimaker
- #define DEFAULT_Kp 22.2
- #define DEFAULT_Ki 1.08
- #define DEFAULT_Kd 114
+// #define DEFAULT_Kp 22.2
+// #define DEFAULT_Ki 1.08
+// #define DEFAULT_Kd 114
// MakerGear
//#define DEFAULT_Kp 7.0
@@ -517,7 +522,7 @@
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*/
-//#define PIDTEMPBED
+#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
@@ -533,11 +538,17 @@
//#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Sends debug data to the serial port.
+// Tarantula glass
+#define DEFAULT_bedKp 45.94
+#define DEFAULT_bedKi 2.21
+#define DEFAULT_bedKd 637.74
+
+
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
- #define DEFAULT_bedKp 10.00
- #define DEFAULT_bedKi .023
- #define DEFAULT_bedKd 305.4
+ //#define DEFAULT_bedKp 10.00
+ //#define DEFAULT_bedKi .023
+ //#define DEFAULT_bedKd 305.4
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
@@ -646,12 +657,13 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
+// 2209: sensorless homing needs false
+#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
-#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
+#define Z_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.
/**
@@ -670,15 +682,15 @@
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
*/
-//#define X_DRIVER_TYPE A4988
-//#define Y_DRIVER_TYPE A4988
-//#define Z_DRIVER_TYPE A4988
+#define X_DRIVER_TYPE TMC2209
+#define Y_DRIVER_TYPE TMC2209
+#define Z_DRIVER_TYPE TMC2209
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
-//#define E0_DRIVER_TYPE A4988
+#define E0_DRIVER_TYPE TMC2209
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
@@ -730,7 +742,8 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2...]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 500 }
+//#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 415 }
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 1280, 1280, 6400, 6640 }
/**
* Default Max Feed Rate (mm/s)
@@ -1056,14 +1069,15 @@
// @section machine
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
-#define INVERT_X_DIR false
+// 2209 inverted from a4988
+#define INVERT_X_DIR true
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
-#define INVERT_E0_DIR false
+#define INVERT_E0_DIR true
#define INVERT_E1_DIR false
#define INVERT_E2_DIR false
#define INVERT_E3_DIR false
@@ -1093,7 +1107,7 @@
// The size of the print bed
#define X_BED_SIZE 200
-#define Y_BED_SIZE 200
+#define Y_BED_SIZE 220
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
@@ -1206,7 +1220,7 @@
//#define AUTO_BED_LEVELING_LINEAR
//#define AUTO_BED_LEVELING_BILINEAR
//#define AUTO_BED_LEVELING_UBL
-//#define MESH_BED_LEVELING
+#define MESH_BED_LEVELING
/**
* Normally G28 leaves leveling disabled on completion. Enable
@@ -1343,8 +1357,8 @@
// Manually set the home position. Leave these undefined for automatic settings.
// For DELTA this is the top-center of the Cartesian print volume.
-//#define MANUAL_X_HOME_POS 0
-//#define MANUAL_Y_HOME_POS 0
+#define MANUAL_X_HOME_POS 0
+#define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 0
// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
@@ -1442,7 +1456,7 @@
* M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
* M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
*/
-//#define EEPROM_SETTINGS // Persistent storage with M500 and M501
+#define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
@@ -1494,7 +1508,7 @@
* P1 Raise the nozzle always to Z-park height.
* P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
*/
-//#define NOZZLE_PARK_FEATURE
+#define NOZZLE_PARK_FEATURE
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise }
@@ -1640,14 +1654,14 @@
*
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
*/
-#define DISPLAY_CHARSET_HD44780 JAPANESE
+#define DISPLAY_CHARSET_HD44780 WESTERN
/**
* Info Screen Style (0:Classic, 1:Prusa)
*
* :[0:'Classic', 1:'Prusa']
*/
-#define LCD_INFO_SCREEN_STYLE 0
+#define LCD_INFO_SCREEN_STYLE 1
/**
* SD CARD
@@ -1656,7 +1670,7 @@
* you must uncomment the following option or it won't work.
*
*/
-//#define SDSUPPORT
+#define SDSUPPORT
/**
* SD CARD: SPI SPEED
@@ -1690,13 +1704,13 @@
// This option overrides the default number of encoder pulses needed to
// produce one step. Should be increased for high-resolution encoders.
//
-//#define ENCODER_PULSES_PER_STEP 4
+#define ENCODER_PULSES_PER_STEP 4
//
// Use this option to override the number of step signals required to
// move between next/prev menu items.
//
-//#define ENCODER_STEPS_PER_MENU_ITEM 1
+#define ENCODER_STEPS_PER_MENU_ITEM 1
/**
* Encoder Direction Options
@@ -1713,7 +1727,7 @@
//
// Set this option if CLOCKWISE causes values to DECREASE
//
-//#define REVERSE_ENCODER_DIRECTION
+#define REVERSE_ENCODER_DIRECTION
//
// This option reverses the encoder direction for navigating LCD menus.
@@ -1721,7 +1735,7 @@
// If CLOCKWISE normally moves DOWN this makes it go UP.
// If CLOCKWISE normally moves UP this makes it go DOWN.
//
-//#define REVERSE_MENU_DIRECTION
+#define REVERSE_MENU_DIRECTION
//
// This option reverses the encoder direction for Select Screen.
@@ -1736,7 +1750,7 @@
//
// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
//
-//#define INDIVIDUAL_AXIS_HOMING_MENU
+#define INDIVIDUAL_AXIS_HOMING_MENU
//
// SPEAKER/BUZZER
@@ -1753,8 +1767,8 @@
// Note: Test audio output with the G-Code:
// M300 S<frequency Hz> P<duration ms>
//
-//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
-//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+#define LCD_FEEDBACK_FREQUENCY_HZ 1000
//=============================================================================
//======================== LCD / Controller Selection =========================
@@ -1767,7 +1781,7 @@
//
// Note: Usually sold with a white PCB.
//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index 00f89662c..17567e56a 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -150,11 +150,11 @@
*/
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
- #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
#if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP)
- //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
#endif
/**
@@ -359,7 +359,7 @@
// When first starting the main fan, run it at full speed for the
// given number of milliseconds. This gets the fan spinning reliably
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
-//#define FAN_KICKSTART_TIME 100
+#define FAN_KICKSTART_TIME 100
// Some coolers may require a non-zero "off" state.
//#define FAN_OFF_PWM 1
@@ -591,6 +591,7 @@
// @section homing
// Homing hits each endstop, retracts by these distances, then does a slower bump.
+// 2209
#define X_HOME_BUMP_MM 5
#define Y_HOME_BUMP_MM 5
#define Z_HOME_BUMP_MM 2
@@ -869,7 +870,7 @@
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
-//#define ADAPTIVE_STEP_SMOOTHING
+#define ADAPTIVE_STEP_SMOOTHING
/**
* Custom Microstepping
@@ -1119,10 +1120,10 @@
#endif
// This allows hosts to request long names for files and folders with M33
- //#define LONG_FILENAME_HOST_SUPPORT
+ #define LONG_FILENAME_HOST_SUPPORT
// Enable this option to scroll long filenames in the SD card menu
- //#define SCROLL_LONG_FILENAMES
+ #define SCROLL_LONG_FILENAMES
// Leave the heaters on after Stop Print (not recommended!)
//#define SD_ABORT_NO_COOLDOWN
@@ -1230,7 +1231,7 @@
*/
#if HAS_GRAPHICAL_LCD
// Show SD percentage next to the progress bar
- //#define DOGM_SD_PERCENT
+ #define DOGM_SD_PERCENT
// Enable to save many cycles by drawing a hollow frame on the Info Screen
#define XYZ_HOLLOW_FRAME
@@ -1515,10 +1516,10 @@
* See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
* Mention @Sebastianv650 on GitHub to alert the author of any issues.
*/
-//#define LIN_ADVANCE
+#define LIN_ADVANCE
#if ENABLED(LIN_ADVANCE)
//#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants
- #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
+ #define LIN_ADVANCE_K 0.03 // Unit: mm compression per 1mm/s extruder speed
//#define LA_DEBUG // If enabled, this will generate debug information output over USB.
#endif
@@ -1657,7 +1658,7 @@
#endif
// Moves (or segments) with fewer steps than this will be joined with the next move
-#define MIN_STEPS_PER_SEGMENT 6
+#define MIN_STEPS_PER_SEGMENT 1
/**
* Minimum delay before and after setting the stepper DIR (in ns)
@@ -1716,7 +1717,7 @@
// The number of linear motions that can be in the plan at any give time.
// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
#if ENABLED(SDSUPPORT)
- #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
+ #define BLOCK_BUFFER_SIZE 128 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif
@@ -1868,7 +1869,7 @@
* Requires NOZZLE_PARK_FEATURE.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/
-//#define ADVANCED_PAUSE_FEATURE
+#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
@@ -1906,10 +1907,10 @@
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ #define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
//#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
@@ -2040,14 +2041,13 @@
* https://github.com/teemuatlut/TMCStepper
*/
#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 900 // (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_MICROSTEPS 256 // 0..256
#define X_RSENSE 0.11
#define X_CHAIN_POS -1 // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
#endif
@@ -2061,9 +2061,9 @@
#endif
#if AXIS_IS_TMC(Y)
- #define Y_CURRENT 800
+ #define Y_CURRENT 900
#define Y_CURRENT_HOME Y_CURRENT
- #define Y_MICROSTEPS 16
+ #define Y_MICROSTEPS 256
#define Y_RSENSE 0.11
#define Y_CHAIN_POS -1
#endif
@@ -2077,9 +2077,9 @@
#endif
#if AXIS_IS_TMC(Z)
- #define Z_CURRENT 800
+ #define Z_CURRENT 900
#define Z_CURRENT_HOME Z_CURRENT
- #define Z_MICROSTEPS 16
+ #define Z_MICROSTEPS 256
#define Z_RSENSE 0.11
#define Z_CHAIN_POS -1
#endif
@@ -2109,8 +2109,8 @@
#endif
#if AXIS_IS_TMC(E0)
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #define E0_CURRENT 900
+ #define E0_MICROSTEPS 256
#define E0_RSENSE 0.11
#define E0_CHAIN_POS -1
#endif
@@ -2267,7 +2267,7 @@
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
* M122 - Report driver parameters (Requires TMC_DEBUG)
*/
- //#define MONITOR_DRIVER_STATUS
+ #define MONITOR_DRIVER_STATUS
#if ENABLED(MONITOR_DRIVER_STATUS)
#define CURRENT_STEP_DOWN 50 // [mA]
@@ -2328,9 +2328,9 @@
#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
// TMC2209: 0...255. TMC2130: -64...63
- #define X_STALL_SENSITIVITY 8
+ #define X_STALL_SENSITIVITY 70
#define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY
- #define Y_STALL_SENSITIVITY 8
+ #define Y_STALL_SENSITIVITY 70
//#define Z_STALL_SENSITIVITY 8
//#define SPI_ENDSTOPS // TMC2130 only
//#define IMPROVE_HOMING_RELIABILITY
@@ -2346,7 +2346,7 @@
* Enable M122 debugging command for TMC stepper drivers.
* M122 S0/1 will enable continous reporting.
*/
- //#define TMC_DEBUG
+ #define TMC_DEBUG
/**
* You can set your own advanced settings by filling in predefined functions.
diff --git a/platformio.ini b/platformio.ini
index f578ff864..ce542ae4e 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -18,7 +18,8 @@
[platformio]
src_dir = Marlin
boards_dir = buildroot/share/PlatformIO/boards
-default_envs = mega2560
+
+default_envs = LPC1768
[common]
default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment