Skip to content

Instantly share code, notes, and snippets.

@azbesthu
Last active October 15, 2019 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azbesthu/39d614d294a711caa87f162b8753ef44 to your computer and use it in GitHub Desktop.
Save azbesthu/39d614d294a711caa87f162b8753ef44 to your computer and use it in GitHub Desktop.
marlin 2.0.x patch for skr 1.3 based on tevo tarantula, hr4988 stepper 16x
diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 155605f60..eaadb2093 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -103,7 +103,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT 0
+#define SERIAL_PORT -1
/**
* Select a secondary serial port on the board to use for communication with the host.
@@ -123,18 +123,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_BIGTREE_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
@@ -409,7 +409,7 @@
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_5 0
-#define TEMP_SENSOR_BED 0
+#define TEMP_SENSOR_BED 1
#define TEMP_SENSOR_CHAMBER 0
// Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -473,10 +473,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
@@ -507,7 +512,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
@@ -523,11 +528,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
@@ -636,12 +647,12 @@
#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.
-#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 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 true // Set to true to invert the logic of the endstop.
+#define Y_MAX_ENDSTOP_INVERTING true // 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.
/**
@@ -716,7 +727,7 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 500 }
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 1600, 400 }
/**
* Default Max Feed Rate (mm/s)
@@ -1019,13 +1030,13 @@
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
-#define INVERT_Y_DIR true
+#define INVERT_Y_DIR false
#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
@@ -1051,7 +1062,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
@@ -1164,7 +1175,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
@@ -1300,8 +1311,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.
@@ -1399,11 +1410,11 @@
* 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.
#if ENABLED(EEPROM_SETTINGS)
- //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
+ #define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
#endif
//
@@ -1455,7 +1466,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 }
@@ -1616,7 +1627,7 @@
* you must uncomment the following option or it won't work.
*
*/
-//#define SDSUPPORT
+#define SDSUPPORT
/**
* SD CARD: SPI SPEED
@@ -1650,13 +1661,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
@@ -1673,7 +1684,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.
@@ -1681,7 +1692,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.
@@ -1696,7 +1707,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
@@ -1713,8 +1724,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 =========================
@@ -1727,7 +1738,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 7b7ae9c22..764d25bb5 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -138,11 +138,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
/**
@@ -288,7 +288,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
/**
* PWM Fan Scaling
@@ -754,7 +754,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
@@ -986,10 +986,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
@@ -1099,7 +1099,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
@@ -1332,10 +1332,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
@@ -1434,7 +1434,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)
@@ -1642,7 +1642,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.
@@ -1679,10 +1679,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
diff --git a/platformio.ini b/platformio.ini
index 2597b4f7d..8970540f3 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -18,7 +18,9 @@
[platformio]
src_dir = Marlin
boards_dir = buildroot/share/PlatformIO/boards
-default_envs = megaatmega2560
+
+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